%global pkg emacs-goodies %global pkgname Emacs-goodies %global goodies_dir %{buildroot}%{emacs_lispdir}/goodies/ %global gnus_dir %{buildroot}%{emacs_lispdir}/gnus-bonus/ %global INSTALL /usr/bin/install %global installinfo /sbin/install-info %global ver 30.8 %global rel 1 %if %($(pkg-config emacs) ; echo $?) %global emacs_version 23.1.1 %global emacs_lispdir %{_datadir}/emacs/site-lisp %global emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d %else %global emacs_version %(pkg-config emacs --modversion) %global emacs_lispdir %(pkg-config emacs --variable sitepkglispdir) %global emacs_startdir %(pkg-config emacs --variable sitestartdir) %endif Name: %{pkg} Version: %{ver} Release: %{rel}%{?dist} Summary: Miscellaneous add-ons for Emacs Group: Applications/Editors License: GPLv2+ URL: http://packages.debian.org/sid/lisp/emacs-goodies-el Source0: http://ftp.de.debian.org/debian/pool/main/e/emacs-goodies-el/emacs-goodies-el_30.8.orig.tar.gz Patch0: emacs-goodies-el.texi.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: emacs emacs-el texinfo Requires: emacs(bin) >= %{emacs_version} %description This is emacs-goodies 30.8, provides add-ons for GNU Emacs and gnus. %package el Summary: Emacs-goodies source files for %{pkgname} under GNU Emacs Group: Applications/Editors Requires: %{name} = %{version}-%{release} %description el This package contains the elisp source files for Emaca-goodies under GNU Emacs. You do not need to install this package to run Emacs-goodies. Install the emacs-goodies package to install add-ons with GNU Emacs. %prep %setup -q -n %{pkg}-el-%{version} %patch0 -p1 -b .fix rm -rf elisp/debian-el/ rm -rf elisp/dpkg-dev-el/ rm -rf elisp/devscripts-el/ %build mkdir -p elisp/%{pkg}-el/info cd elisp/%{pkg}-el/ chmod +x %{pkg}-loaddefs.make ./%{pkg}-loaddefs.make emacs --no-site-file --batch --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile *.el makeinfo emacs-goodies-el.texi iconv -f iso8859-1 -t utf-8 info/emacs-goodies.info > info/emacs-goodies.info.utf mv info/emacs-goodies.info.utf info/emacs-goodies.info cd ../gnus-bonus-el/ emacs --no-site-file --batch --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile *.el %install rm -rf %{buildroot} %{INSTALL} -m 755 -d %{goodies_dir} %{INSTALL} -m 755 -d %{buildroot}%{emacs_startdir} %{INSTALL} -m 644 elisp/%{pkg}-el/%{pkg}-el.el %{buildroot}%{emacs_startdir} %{INSTALL} -m 644 elisp/%{pkg}-el/*.elc %{goodies_dir} %{INSTALL} -m 644 elisp/%{pkg}-el/*.el %{goodies_dir} %{INSTALL} -m 755 -d %{gnus_dir} %{INSTALL} -m 644 elisp/gnus-bonus-el/*.elc %{gnus_dir} %{INSTALL} -m 644 elisp/gnus-bonus-el/*.el %{gnus_dir} %{INSTALL} -m 755 -d %{buildroot}%{_infodir}/ %{INSTALL} -m 644 elisp/%{pkg}-el/info/%{pkg}.info %{buildroot}%{_infodir}/ %clean rm -rf %{buildroot} %post %{installinfo} %{_infodir}/%{pkg}.info %{_infodir}/dir %preun if [ "$1" = 0 ]; then %{installinfo} --delete %{_infodir}/%{pkg}.info %{_infodir}/dir fi %files %defattr(-,root,root,-) %{emacs_lispdir}/goodies/*.elc %{emacs_startdir}/emacs-goodies-el.el %{emacs_lispdir}/gnus-bonus/*.elc %{_infodir}/%{pkg}.info.gz %dir %{emacs_lispdir}/goodies %dir %{emacs_lispdir}/gnus-bonus %files el %defattr(-,root,root,-) %{emacs_lispdir}/goodies/*.el %{emacs_lispdir}/gnus-bonus/*.el %changelog * Thu Oct 22 2009 Arun SAG - 30.8-1 - Updated to 30.8-1 - License corrected to GPLv2+ * Tue Sep 15 2009 Arun SAG - 30.5-1 - Initial release 30.5-1