Browse Source

NEW xdvi-search-el: renamed from a subpackage xdvik-search to xdvi-search-el; ready for TeX Live

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1534 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
167d62f174

+ 99 - 0
x/xdvi-search-el/xdvi-search-el-vl.spec

@@ -0,0 +1,99 @@
+%define pkgname xdvik
+%define revision 1.37
+
+Summary: TeX src-special files for emacsen
+Summary(ja): TeX src-special を Emacsen 上で使用するための elisp
+Name: xdvi-search-el
+Version: 2009
+Release: 1%{?_dist_release}
+## This file xdvi-search.el is contained in TeX Live 2009
+Source0: xdvi-search.el
+
+Source100: %{pkgname}-install.sh
+Source101: %{pkgname}-remove.sh
+Source102: %{pkgname}-init.el
+
+URL: http://xdvi.sourceforge.jp/
+
+License: GPL
+Group: Applications/Editors/Emacs
+Requires(post,preun): emacsen-common
+
+Obsoletes: xdvik-search <= 22.84.14
+
+BuildArch: noarch
+Buildroot: %{_tmppath}/%{name}-root
+
+Vendor: Project Vine
+Distribution: Vine Linux
+
+%description
+TeX src-special files for emacsen
+[See]
+http://xdvi.sourceforge.net/xdvi-search.el
+
+%description -l ja
+TeX src-special を Emacsen上で使用するための elisp です。
+[参照]
+http://xdvi.sourceforge.net/xdvi-search.el
+http://www.nn.iij4u.or.jp/~tutimura/tex/src-special.html
+
+
+%prep
+
+%build
+
+%install
+[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && %__rm -rf $RPM_BUILD_ROOT
+
+%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{pkgname}
+%__mkdir_p ${RPM_BUILD_ROOT}%{_prefix}/lib/emacsen-common/packages/install
+%__mkdir_p ${RPM_BUILD_ROOT}%{_prefix}/lib/emacsen-common/packages/remove
+
+%__install -m 644 %{SOURCE0} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{pkgname}/
+%__install -m 644 %{SOURCE102} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{pkgname}/
+
+# install  script( bytecompile el and install elc , remove )
+
+%_installemacsenscript %{pkgname} %{SOURCE100}
+
+%_removeemacsenscript  %{pkgname} %{SOURCE101}
+
+
+%post
+if [ "$1" = 2 ]; then
+
+  %_emacsenPackageRemove %{pkgname}
+
+fi
+
+%_addemacsenlist %{pkgname}
+
+%_emacsenPackageInstall %{pkgname}
+       
+
+%preun
+if [ "$1" = 0 ]; then
+
+  %_emacsenPackageRemove %{pkgname}
+
+  %_removeemacsenlist %{pkgname}
+
+fi
+
+
+
+%clean
+%__rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%{_datadir}/emacs/site-lisp/%{pkgname}
+%{_prefix}/lib/emacsen-common/packages/install/%{pkgname}
+%{_prefix}/lib/emacsen-common/packages/remove/%{pkgname}
+
+
+%changelog
+* Sat Aug 07 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1
+- ported from xdvik-22.84.14-6
+- TeX Live 2009

+ 8 - 0
x/xdvi-search-el/xdvik-init.el

@@ -0,0 +1,8 @@
+;; TeX source special $B$N$?$a$N@_Dj(B
+(require 'xdvi-search) ; $BI,?\(B
+(custom-set-variables
+ '(server-switch-hook (quote (raise-frame)))) ; $BAk$r>e$K(B
+(custom-set-faces)
+(add-hook 'yatex-mode-hook
+		  '(lambda ()
+			 (define-key YaTeX-mode-map "\C-c\C-j" 'xdvi-jump-to-line)))

+ 52 - 0
x/xdvi-search-el/xdvik-install.sh

@@ -0,0 +1,52 @@
+#! /bin/sh -e
+#  /usr/lib/emacsen-common/packages/install/xdvik
+# [ This particular script hasn't been tested, so be careful. ]
+
+set -e
+
+FLAVOR=$1
+PACKAGE="xdvik"
+
+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=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el";
+
+SITELISP=/usr/share/${FLAVOR}/site-lisp
+
+case "${FLAVOR}" in
+    *)
+    echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
+
+    rm -rf ${ELCDIR}
+    install -m 755 -d ${ELCDIR}
+
+    # Byte compile them
+    ${FLAVOR} -batch -f batch-byte-compile ${ELDIR}/xdvi-search.el \
+        >> ${ELCDIR}/CompilationLog 2>&1
+    cp ${ELDIR}/xdvi-search.elc ${ELCDIR}
+
+    gzip -9 ${ELCDIR}/CompilationLog
+
+    rm -f ${ELDIR}/*.elc
+    rm -f ${ELCDIR}/*.el
+
+    ln -f -s ${ELDIR}/${STARTFILE} ${STARTDIR}/60${STARTFILE};
+
+    echo " done."
+    ;;
+
+esac
+
+exit 0;

+ 38 - 0
x/xdvi-search-el/xdvik-remove.sh

@@ -0,0 +1,38 @@
+#!/bin/sh
+# /usr/lib/emacsen-common/packages/remove/xdvik
+# [ This particular script hasn't been tested either, so be careful. ]
+set -e
+
+FLAVOR=$1
+PACKAGE="xdvik"
+
+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=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el";
+
+SITELISP=/usr/share/${FLAVOR}/site-lisp
+
+
+case "${FLAVOR}" in
+	emacs)
+	;;
+	*)
+	echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+        rm -f ${STARTDIR}/[0-9][0-9]${STARTFILE}*;
+		rm -rf ${ELCDIR}
+	echo " done."
+	;;
+esac
+
+exit 0;