%global pkg lookup %global pkgname Lookup Name: emacs-%{pkg} Version: 1.4.1 Release: 2%{?dist} Summary: Search Interface with Electronic Dictionaries for Emacs Group: Applications/Text License: GPLv2+ URL: http://openlab.ring.gr.jp/edict/lookup/ Source0: http://openlab.ring.gr.jp/edict/lookup/dist/%{pkg}-%{version}.tar.gz Patch0: lookup-lisp-makefile-am.patch BuildArch: noarch BuildRequires: emacs, automake Requires: emacs(bin) >= %{_emacs_version} Requires(post): info Requires(preun): info %description Lookup is an integrated search interface with electronic dictionaries for the Emacs text editor. You can use various kinds of dictionaries, such as CD-ROM books and online dictionaries, in an efficient and effective manner. %package -n %{name}-el Summary: Elisp source files for %{pkgname} under GNU Emacs Group: Applications/Text Requires: %{name} = %{version}-%{release} %description -n %{name}-el This package contains the elisp source files for %{pkgname} under GNU Emacs. You do not need to install this package to run %{pkgname}. Install the %{name} package to use %{pkgname} with GNU Emacs. %prep %setup -q -n %{pkg}-%{version} %patch0 -p0 iconv -f ISO-2022-JP -t UTF-8 README > README.UTF-8 mv README.UTF-8 README pushd texi for i in *.texi; do iconv -f ISO-2022-JP -t UTF-8 $i > $i.UTF-8 mv $i.UTF-8 $i done cd - autoreconf -f -i %build %configure make %{?_smp_mflags} cat > %{name}-init.el <<"EOF" (autoload 'lookup "lookup" nil t) (autoload 'lookup-region "lookup" nil t) (autoload 'lookup-pattern "lookup" nil t) EOF %install %__mkdir_p $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{pkg} make install lispdir=$RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{pkg} \ infodir=$RPM_BUILD_ROOT%{_infodir} rm -f $RPM_BUILD_ROOT%{_infodir}/dir # don't package but instead update in pre and post %__mkdir_p $RPM_BUILD_ROOT%{_emacs_sitestartdir} install -m 644 %{name}-init.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}/%{pkg}-init.el %post /sbin/install-info %{_infodir}/lookup.info.gz %{_infodir}/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/lookup.info.gz \ %{_infodir}/dir || : fi %files %defattr(-,root,root,-) %doc AUTHORS NEWS README %doc %{_infodir}/*.gz %{_emacs_sitelispdir}/%{pkg}/*.elc %{_emacs_sitestartdir}/*.el %dir %{_emacs_sitelispdir}/%{pkg} %files -n %{name}-el %defattr(-,root,root,-) %{_emacs_sitelispdir}/%{pkg}/*.el %changelog * Fri Oct 29 2010 Daiki Ueno - 1.4.1-2 - convert encoding of *.texi to UTF-8. * Thu Oct 28 2010 Daiki Ueno - 1.4.1-1 - repackage version 1.4.1 maintained by the edict project, instead of 1.99 beta. * Tue Apr 6 2010 Daiki Ueno - 1.99.95-1 - initial packaging for Fedora.