Browse Source

new: simple-hatena-mode 0.15-1.svn8462

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@778 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 14 years ago
parent
commit
79f6dc5ead

+ 16 - 0
s/simple-hatena-mode/simple-hatena-mode-init.el

@@ -0,0 +1,16 @@
+;;
+;; simple-hatena-mode-init.el
+;;
+;;      for Vine Linux with emacsen-common
+;;      IWAI, Masaharu <iwai@alib.jp>
+
+(defcustom vine-default-simple-hatena-mode t
+  "A boolean for vine-default-simple-hatena-mode"
+  :type 'boolean)
+
+(add-hook 'vine-default-setup-hook
+          (lambda()
+            (if vine-default-simple-hatena-mode
+                (require 'vine-default-simple-hatena-mode))))
+
+;;; end of file

+ 35 - 0
s/simple-hatena-mode/simple-hatena-mode-install.sh

@@ -0,0 +1,35 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/simple-hatena-mode
+
+FLAVOR=$1
+PACKAGE=simple-hatena-mode
+
+FLAGS="${SITEFLAG} -q -batch -f batch-byte-compile"
+
+ELDIR="/usr/share/emacs/site-lisp/${PACKAGE}"
+ELCDIR="/usr/share/${FLAVOR}/site-lisp/${PACKAGE}"
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
+
+SOURCES="simple-hatena-mode.el"
+
+case "${FLAVOR}" in
+    emacs)
+    ;;
+    *) 
+    echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
+    install -m 755 -d ${ELCDIR}
+    cd ${ELDIR}
+    cp *.el ${ELCDIR}
+    FILES="${SOURCES}"
+    cd ${ELCDIR}
+    ${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
+    rm -f ${SOURCES}
+    gzip -9 ${ELCDIR}/CompilationLog
+
+    ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
+    echo " done."
+    ;;
+esac
+
+exit 0 ;

+ 32 - 0
s/simple-hatena-mode/simple-hatena-mode-remove.sh

@@ -0,0 +1,32 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/simple-hatena-mode
+
+FLAVOR=$1
+PACKAGE=simple-hatena-mode
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
+
+if [ "X${FLAVOR}" = "X" ]; then
+    echo Need argument to determin FLAVOR of emacs;
+    exit 1
+fi
+
+if [ "X${PACKAGE}" = "X" ]; then
+    echo Internal error: need package name;
+    exit 1;
+fi
+
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+case "${FLAVOR}" in
+    emacs)
+    ;;
+    *)
+    echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+    rm -rf ${ELCDIR}
+    rm -f ${STARTDIR}/95${STARTFILE}*
+    echo " done."
+    ;;
+esac
+
+exit 0

+ 112 - 0
s/simple-hatena-mode/simple-hatena-mode-vl.spec

@@ -0,0 +1,112 @@
+%define origver  0.15
+%define rel      1
+%define svn_rev  8462
+
+%define _noVersionedDependencies	1
+%define prereq_ge()  %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
+%define	origname simple-hatena-mode
+
+Summary:      Emacs interface to Hatena::Diary Writer
+Summary(ja):  はてなダイアリーライターの Emacs インタフェース
+Name:         %{origname}
+Version:      %{origver}
+Release:      %{rel}.svn%{svn_rev}%{?_dist_release}
+
+Source0:      http://svn.coderepos.org/share/lang/elisp/simple-hatena-mode/trunk/simple-hatena-mode.el
+Source1:      %{origname}-install.sh
+Source2:      %{origname}-remove.sh
+Source3:      vine-default-%{origname}.el
+Source4:      %{origname}-init.el
+Source5:      http://www.gnu.org/licenses/gpl-2.0.txt
+
+License:      GPLv2+
+Group:        Applications/Editors/Emacs
+URL:          http://coderepos.org/share/wiki/SimpleHatenaMode
+BuildRoot:    %{_tmppath}/%{name}-%{version}-root
+BuildArch:    noarch
+
+Requires:     emacsen
+PreReq:       emacsen
+%prereq_ge    emacsen-common
+
+Requires:     hatena-diary-writer
+Requires:     html-helper-mode
+
+Distribution: Vine Linux
+Vendor:       Project Vine
+Packager:     iwaim
+
+%description
+Emacs interface to Hatena::Diary Writer
+
+%description -l ja
+はてなダイアリーライターの Emacs インタフェース
+
+%prep
+
+%setup -q -T -c %{origname}-%{origver}
+%{__cp} -a %{SOURCE0} %{SOURCE5} .
+
+%install
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+[ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
+
+mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
+mkdir -p %{buildroot}%{emacsen_pkgdir}/install
+mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
+
+#
+# install el files
+#
+
+%{__cp} -p *.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
+
+
+#
+# install script (bytecompile el and install elc , remove)
+#
+
+%_installemacsenscript %{origname} %{SOURCE1}
+
+%_removeemacsenscript  %{origname} %{SOURCE2}
+
+
+%clean
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+
+%post
+#
+# bytecompile and install
+#
+if [ "$1" = 2 ]; then
+
+%_emacsenPackageRemove %{origname}
+
+fi
+
+%_addemacsenlist %{origname}
+
+%_emacsenPackageInstall %{origname}
+
+
+%preun
+if [ "$1" = 0 ]; then
+
+%_emacsenPackageRemove %{origname}
+
+%_removeemacsenlist %{origname}
+
+fi
+
+
+%files
+%defattr(-,root,root)
+%doc gpl-2.0.txt
+%{_datadir}/emacs/site-lisp/%{origname}
+%{emacsen_pkgdir}/install/%{origname}
+%{emacsen_pkgdir}/remove/%{origname}
+
+
+%changelog
+* Wed Apr 07 2010 IWAI, Masaharu <iwai@alib.jp> 0.15-1.svn8462
+- first release for Vine Linux

+ 53 - 0
s/simple-hatena-mode/vine-default-simple-hatena-mode.el

@@ -0,0 +1,53 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  -*- coding: utf-8-unix -*-
+;;  FSF Emacs 23 用 Vine Linux simple-hatena-mode 設定
+;;    IWAI, Masaharu <iwai@alib.jp>
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; simple-hatena-mode の設定
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'simple-hatena-mode)
+
+;; はてダラスクリプトのパス(デフォルト値: hw.pl)
+(setq simple-hatena-bin "/usr/bin/hw.pl")
+
+;; はてダラデータを置くディレクトリ(デフォルト値: ~/.hatena)
+;(setq simple-hatena-root "~/.mydiary")
+
+;; はてダラで使うデフォルトのはてなid(デフォルト値: nil)
+;(setq simple-hatena-default-id "")
+
+;; はてダラで使うデフォルトのグループ名(デフォルト値: nil)
+;(setq simple-hatena-default-group "vine")
+
+;; はてなダイアリーライターのユーザエージェントオプション(デフォルト値:
+;; simple-hatena-mode/vヴァージョン番号)
+;(setq simple-hatena-option-useragent "Hatena::Diary::Writer")
+
+;; はてなダイアリーライターのパーマリンクに、タイムスタンプを使うかどう
+;; かを指定する(デフォルト値: t)
+;(setq simple-hatena-use-timestamp-permalink-flag nil)
+
+;; 日付を計算する際に用いるオフセット。たとえば以下のように6に設定する
+;; と、午前6時まで前日の日付として扱われる(デフォルト値: nil)
+;(setq simple-hatena-time-offset 6)
+
+;; はてなダイアリーライターのデバッグモードオプション(デフォルト値: nil)
+;(setq simple-hatena-option-debug-flag t)
+
+;; はてなダイアリーライターのタイムアウトオプション(デフォルト値: 30秒)
+;(setq simple-hatena-option-timeout 60)
+
+;; はてなダイアリーライターのクッキーオプション(デフォルト値: t)
+;(setq simple-hatena-option-cookie-flag nil)
+
+;; はてダラを実行するプロセスのバッファ名(デフォルト値: *SimpleHatena*)
+;(setq simple-hatena-process-buffer-name "*OtherBufferName*")
+
+(provide 'vine-default-simple-hatena-mode)
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End: