Browse Source

updated howm-vl.spec: supported vine-default

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@2432 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
1298f220cc
5 changed files with 171 additions and 18 deletions
  1. 16 0
      h/howm/howm-init.el
  2. 56 0
      h/howm/howm-install.sh
  3. 35 0
      h/howm/howm-remove.sh
  4. 40 18
      h/howm/howm-vl.spec
  5. 24 0
      h/howm/vine-default-howm.el

+ 16 - 0
h/howm/howm-init.el

@@ -0,0 +1,16 @@
+;;
+;; howm-init.el
+;;
+;; 	for Vine Linux with emacsen-common
+;; 	Munehiro Yamamoto <munepi@vinelinux.org>
+
+(defcustom vine-default-howm t
+  "A boolean for vine-default-howm"
+  :type 'boolean)
+
+(add-hook 'vine-default-setup-hook
+	  (lambda()
+	    (if vine-default-howm
+		(require 'vine-default-howm))))
+
+;;; end of file

+ 56 - 0
h/howm/howm-install.sh

@@ -0,0 +1,56 @@
+#!/bin/sh
+
+FLAVOR=$1
+PACKAGE="howm"
+
+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
+
+ELDIR=${EPREFIX}/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=${EPREFIX}/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
+
+SITELISP=/usr/share/${FLAVOR}/site-lisp
+
+COMPILE="-batch -q -f batch-byte-compile"
+
+case "${FLAVOR}" in
+    emacs)
+	;;
+
+    *)
+	echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ... "
+
+	rm -rf ${ELCDIR}
+	install -m 755 -d ${ELCDIR}
+	cp ${ELDIR}/*.el ${ELCDIR}
+
+	(
+	    cd ${ELCDIR}
+	    ${FLAVOR} ${COMPILE} *.el > ${ELCDIR}/CompilationLog 2>&1
+	    rm *.el ${PACKAGE}-init.elc vine-default-${PACKAGE}.elc
+	    install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
+	)
+
+	gzip -9 ${ELCDIR}/CompilationLog
+
+	if [ ! -d ${STARTDIR} ]; then
+	    install -m 755 -d ${STARTDIR}
+	fi
+
+	ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/50${STARTFILE};
+
+	echo " done."
+	;;
+esac
+
+exit 0;

+ 35 - 0
h/howm/howm-remove.sh

@@ -0,0 +1,35 @@
+#!/bin/sh
+
+FLAVOR=$1
+PACKAGE="howm"
+
+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
+
+ELDIR=${EPREFIX}/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=${EPREFIX}/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el";
+
+case "${FLAVOR}" in
+    emacs)
+        ;;
+
+    *)
+        echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+
+        rm -rf ${ELCDIR}
+	rm -f ${STARTDIR}/50${STARTFILE}*;
+
+        echo " done."
+        ;;
+esac
+
+exit 0;

+ 40 - 18
h/howm/howm-vl.spec

@@ -1,19 +1,20 @@
-Name: howm
-Version: 1.3.9
-Release: 1%{?_dist_release}
-Summary: a note-taking tool on Emacs
-Summary(ja): Emacs で断片的なメモをどんどんとるための環境
-License: GPL
-Group: Applications/Editors/Emacs
-URL: http://howm.sourceforge.jp/
-Source0: %{name}-%{version}.tar.gz
-Source1: %{name}-install.sh
-Source2: %{name}-remove.sh
-Patch0: howm-1.3.9-check-make-local-hook.patch
-
-BuildRoot: %{_tmppath}/%{name}-root
-BuildArch: noarch
-Prereq: emacsen
+Name:		howm
+Version:	1.3.9.1
+Release:	1%{?_dist_release}
+Summary:	a note-taking tool on Emacs
+Summary(ja):	Emacs で断片的なメモをどんどんとるための環境
+License:	GPL
+Group:		Applications/Editors/Emacs
+URL:		http://howm.sourceforge.jp/
+Source0:	%{name}-%{version}.tar.gz
+Source1:	%{name}-install.sh
+Source2:	%{name}-remove.sh
+Source3:	%{name}-init.el
+Source4:	vine-default-%{name}.el
+
+BuildRoot:	%{_tmppath}/%{name}-root
+BuildArch:	noarch
+Requires(post,preun): emacsen
 
 %description
 Howm is a note-taking tool on Emacs. It is similar to emacs-wiki;
@@ -27,7 +28,6 @@ Emacs で断片的なメモをどんどんとるための環境です. 分類機
 
 %prep
 %setup -q
-%patch0 -p1 -b .orig
 
 %build
 %__rm -rf */Makefile.am */Makefile.in
@@ -38,7 +38,17 @@ Emacs で断片的なメモをどんどんとるための環境です. 分類機
 %__mkdir_p %{buildroot}%{emacsen_pkgdir}/install
 %__mkdir_p %{buildroot}%{emacsen_pkgdir}/remove
 
+#
+# install el files
+#
+
 %__install -m 0644 *.el %{buildroot}%{_datadir}/emacs/site-lisp/%{name}
+%__install -m 0644 %{SOURCE3} %{SOURCE4} \
+    ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/
+
+#
+# install script (bytecompile el and install elc, remove)
+#
 
 %_installemacsenscript %{name} %{SOURCE1}
 
@@ -48,6 +58,10 @@ Emacs で断片的なメモをどんどんとるための環境です. 分類機
 %__rm -rf %{buildroot}
 
 %post 
+#
+# bytecompile and install
+#
+
 if [ "$1" = 2 ]; then
 %_emacsenPackageRemove %{name}
 
@@ -72,7 +86,15 @@ fi
 %{emacsen_pkgdir}/remove/%{name}
 
 %changelog
-* Fri Jan 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.9-1
+* Sun Jan 02 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.9.1-1
+- new upstream release
+- dropped howm-1.3.9-check-make-local-hook.patch
+  - this patch merged into upstream
+- changed to Requires(post,preun): emacsen
+  - Prereq tag is already deprecated
+- supported vine-default
+
+* Sun Jan 02 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.9-1
 - new upstream release
 - supported emacs-24.0.50
   - applied howm-1.3.9-check-make-local-hook.patch

+ 24 - 0
h/howm/vine-default-howm.el

@@ -0,0 +1,24 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  -*- coding: utf-8-unix -*-
+;;  FSF Emacs 23 用 Vine Linux howm 設定
+;;    Munehiro Yamamoto <munepi@vinelinux.org>
+;;	$Id: vine-default-howm.el,v 1.1 2011/01/02 21:20:59 munepi Exp $	
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; howm
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(autoload 'howm-menu "howm-mode" "Hitori Otegaru Wiki Modoki" t)
+
+(setq howm-process-coding-system 'utf-8)
+(setq howm-menu-lang 'ja)
+;; (global-set-key "\C-c,," 'howm-menu)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(provide 'vine-default-howm)
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End: