Переглянути джерело

added auto-complete-mode-vl.spec

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@4651 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 роки тому
батько
коміт
4b7ca63ba6

+ 17 - 0
a/auto-complete-mode/auto-complete-init.el

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

+ 42 - 0
a/auto-complete-mode/auto-complete-install.sh

@@ -0,0 +1,42 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/auto-complete
+
+##set -x
+
+FLAVOR=$1
+PACKAGE=auto-complete
+
+FLAGS="-Q -L . -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="auto-complete-config.el auto-complete.el fuzzy.el popup.el"
+AC_DICT="ac-dict"
+
+case "${FLAVOR}" in
+    *) 
+	echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
+	install -m 755 -d ${ELCDIR}
+	cd ${ELDIR}
+	cp *.el ${ELCDIR}
+	sed -e "s|@@FLAVOR@@|${FLAVOR}|g" vine-default-${PACKAGE}.el.in > ${ELCDIR}/vine-default-${PACKAGE}.el
+	rm -rf ${ELCDIR}/${AC_DICT}
+	cp -ra ${AC_DICT} ${ELCDIR}/
+	FILES="${SOURCES}"
+	cd ${ELCDIR}
+	${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
+	rm -f ${SOURCES}
+	gzip -9 ${ELCDIR}/CompilationLog
+
+	rm -f ${PACKAGE}-init.{el,elc}
+	rm -f vine-default-${PACKAGE}.elc
+
+	ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
+	echo " done."
+	;;
+esac
+
+exit 0 ;

+ 123 - 0
a/auto-complete-mode/auto-complete-mode-vl.spec

@@ -0,0 +1,123 @@
+%define _noVersionedDependencies	1
+%define prereq_ge()  %(LC_ALL="C" rpm -q --queryformat 'Requires(post)::%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
+%define	origname auto-complete
+%define origver  1.3.1
+
+Summary:      The most intelligent auto-completion extension for GNU Emacs
+Summary(ja):  GNU Emacs のための最も賢い自動補完機能
+Name:         %{origname}-mode
+Version:      %{origver}
+Release:      1%{?_dist_release}
+
+Source0:      http://cx4a.org/pub/auto-complete/auto-complete-%{version}.tar.bz2
+Source1:      %{origname}-install.sh
+Source2:      %{origname}-remove.sh
+Source3:      vine-default-%{origname}.el.in
+Source4:      %{origname}-init.el
+
+License:      GPLv3
+Group:        Applications/Editors/Emacs
+URL:          http://cx4a.org/software/auto-complete/
+BuildRoot:    %{_tmppath}/%{name}-%{version}-root
+BuildArch:    noarch
+
+Requires:     emacsen
+Requires(post): emacsen
+#%prereq_ge    emacsen-common
+
+Distribution: Vine Linux
+Vendor:       Project Vine
+Packager:     munepi
+
+%description
+Auto Complete Mode is the most intelligent auto-completion extension for GNU 
+Emacs. Auto Complete Mode renews an old completion interface and provides an 
+environment that makes users could be more concentrate on their own works.
+
+Features
+ * Visual interface
+ * Reduce overhead of completion by using statistic method
+ * Extensibility
+
+
+%description -l ja
+Auto Complete ModeはGNU Emacsのための最も賢い自動補完機能です。
+従来の使いづらい補完インターフェースを一新し、
+ユーザーがより本質的な作業に集中できる環境を提供します。
+
+特徴
+ * 視覚的な操作感
+ * 統計的手法による補完オーバーヘッドの削減
+ * 拡張性
+
+%prep
+
+%setup -q -n %{origname}-%{origver}
+
+%build
+
+%install
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+[ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
+
+%__mkdir_p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
+%__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}
+%__cp -ra dict %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/ac-dict || exit 1
+
+
+#
+# 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 COPYING.FDL.txt COPYING.GPLv3.txt README.txt TODO.txt
+%doc doc etc
+%{_datadir}/emacs/site-lisp/%{origname}
+%{emacsen_pkgdir}/install/%{origname}
+%{emacsen_pkgdir}/remove/%{origname}
+
+
+%changelog
+* Thu Aug 25 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.1-1
+- first release for Vine Linux

+ 32 - 0
a/auto-complete-mode/auto-complete-remove.sh

@@ -0,0 +1,32 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/auto-complete
+
+FLAVOR=$1
+PACKAGE=auto-complete
+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