rpms/a2ps/devel a2ps.spec,1.81,1.82

Tim Waugh (twaugh) fedora-extras-commits at redhat.com
Wed Feb 13 10:41:20 UTC 2008


Author: twaugh

Update of /cvs/pkgs/rpms/a2ps/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9114

Modified Files:
	a2ps.spec 
Log Message:
* Tue Feb 12 2008 Patrice Dumas <pertusus at free.fr> 4.13b-71
- use a predictable stamp inside the etc/README file
- follow emacs packaging guidelines



Index: a2ps.spec
===================================================================
RCS file: /cvs/pkgs/rpms/a2ps/devel/a2ps.spec,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- a2ps.spec	12 Feb 2008 18:37:08 -0000	1.81
+++ a2ps.spec	13 Feb 2008 10:40:38 -0000	1.82
@@ -1,7 +1,19 @@
+# emacs packaging macros
+%if %($(pkg-config emacs) ; echo $?)
+%define emacs_version 22.1
+%define emacs_lispdir %{_datadir}/emacs/site-lisp
+%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
+%else
+%define emacs_version %(pkg-config emacs --modversion)
+%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
+%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
+%endif
+
+
 Summary: Converts text and other types of files to PostScript(TM)
 Name: a2ps
 Version: 4.13b
-Release: 70%{?dist}
+Release: 71%{?dist}
 License: GPLv2+
 Group: Applications/Publishing
 #Source0: ftp://ftp.enst.fr/pub/unix/a2ps/%{name}-%{version}.tar.gz 
@@ -46,7 +58,7 @@
 Patch31: a2ps-mb.patch
 Patch34: a2ps-external-libtool.patch
 Requires: fileutils sh-utils info
-BuildRequires: emacs, flex, libtool, texinfo, groff
+BuildRequires: emacs, emacs-el, flex, libtool, texinfo, groff
 BuildRequires: ImageMagick
 BuildRequires: groff-perl
 BuildRequires: cups
@@ -56,7 +68,6 @@
 #BuildRequires: gv
 Url: http://www.inf.enst.fr/~demaille/a2ps/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: %{name}-libs = %{version}-%{release}
 Requires: psutils, ImageMagick, texinfo-tex, gzip, bzip2, groff-perl
 Requires: tetex-dvips, tetex-latex, tetex-fonts, file
 Requires(post): coreutils
@@ -66,10 +77,16 @@
 Provides: a2ps-i18n = 0.1-1
 
 
-%package libs
-Summary: a2ps libraries
-Group: System Environment/Libraries
-License: GPLv2+
+%package -n emacs-%{name}
+Summary: Emacs bindings for a2ps files
+Group: Applications/Editors
+Requires: emacs(bin) >= %{emacs_version}
+
+
+%package -n emacs-%{name}-el
+Summary: Elisp source files for emacs-%{name} under GNU Emacs
+Group: Applications/Editors
+Requires:       emacs-%{name} = %{version}-%{release}
 
 
 %description
@@ -79,12 +96,19 @@
 and medias.
 
 
-%description libs
-The libraries for a2ps.
+%description -n emacs-%{name}
+Postscript printing hook for a2ps and major mode for a2ps style sheets
+for emacs.
+
+
+%description -n emacs-%{name}-el
+This package contains the elisp source files for emacs-%{name} under GNU 
+Emacs. You do not need to install this package to run emacs-%{name}. Install 
+the emacs-%{name} package to use emacs-%{name} with GNU Emacs.
+
 
 %prep
 %setup -q -n %{name}-4.13 -a 1
-exit 1
 
 # use __timestamp_configure.in to hold the configure.in timestamp
 touch -r configure.in __timestamp_configure.in
@@ -177,6 +201,11 @@
 touch -r fonts/Makefile.in src/Makefile.in etc/Makefile.in lib/Makefile.in
 
 %build
+# preset the date in README.in to avoid the timestamp of the build time
+sed -e "s!@date@!`date -r NEWS`!" etc/README.in > etc/README.in.tmp
+touch -r etc/README.in etc/README.in.tmp
+mv etc/README.in.tmp etc/README.in
+
 chmod 644 {po/ja.po,encoding/euc-jp.edf,README.eucJP}.euc
 chmod 644 encoding/euc-kr.edf.euckr
 EMACS=emacs %configure \
@@ -200,7 +229,10 @@
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
+make DESTDIR=%{buildroot} install INSTALL='install -p'
+
+# reset the timestamp for the generated etc/README file
+touch -r etc/README.in %{buildroot}%{_datadir}/a2ps/README
 
 mkdir -p %{buildroot}%{_sysconfdir}/a2ps
 
@@ -212,14 +244,6 @@
 popd
 popd
 
-### FIXME ###
-inst()
-{
-mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/
-for f in contrib/emacs/*.el; do \
-  install -p -m 0644 $f %{buildroot}%{_datadir}/emacs/site-lisp/ ; done
-}
-
 # Don't ship the library file or header (bug #203536).
 rm -f %{buildroot}%{_libdir}/*.{so,a,la}
 rm -f %{buildroot}%{_includedir}/*
@@ -275,15 +299,23 @@
 %{_datadir}/a2ps/ps
 %{_datadir}/a2ps/sheets
 %{_datadir}/ogonkify/
-%{_datadir}/emacs/site-lisp/*
 %dir %{_datadir}/a2ps/afm
 %dir %{_datadir}/a2ps
-
-%files libs
-%defattr(-,root,root)
 %{_libdir}/*.so*
 
+%files -n emacs-%{name}
+%defattr(-,root,root,-)
+%{emacs_lispdir}/*.elc
+
+%files -n emacs-%{name}-el
+%defattr(-,root,root,-)
+%{emacs_lispdir}/*.el
+
 %changelog
+* Tue Feb 12 2008 Patrice Dumas <pertusus at free.fr> 4.13b-71
+- use a predictable stamp inside the etc/README file
+- follow emacs packaging guidelines
+
 * Tue Feb 12 2008 Tim Waugh <twaugh at redhat.com> 4.13b-70
 - Separate out libs sub-package for multilib (bug #340571).
 




More information about the fedora-extras-commits mailing list