From cc872ab6e8667e177c54f51d04939e755c1bdfa4 Mon Sep 17 00:00:00 2001 From: "Donald A. Peterson" Date: Tue, 27 May 2003 18:25:42 +0000 Subject: [PATCH] Remove % from configure/makeinstall comments near top to avoid premature expansion svn: r1598 --- gramps2/gramps.spec | 62 ++++++++++++++++++++---------------------- gramps2/gramps.spec.in | 4 +-- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/gramps2/gramps.spec b/gramps2/gramps.spec index 7cd6c550c..a4ac980bc 100644 --- a/gramps2/gramps.spec +++ b/gramps2/gramps.spec @@ -1,6 +1,11 @@ %define ver 0.9.1 %define rel 1 %define prefix /usr +%define localstatedir /var/lib +# Ensure that internal RPM macros for configure & makeinstall +# will expand properly +%define _prefix %prefix +%define _localstatedir %localstatedir Summary: Genealogical Research and Analysis Management Programming System. Name: gramps @@ -11,7 +16,7 @@ Group: Applications/Genealogy Source: http://download.sourceforge.net/gramps/gramps-%{ver}.tar.gz BuildRoot: /var/tmp/%{name}-%{version}-root -URL: http://gramps.sourceforge.net +URL: http://gramps.sourceforge.net/ Requires: python >= 2.2 Requires: gnome-python2 >= 1.99 @@ -23,6 +28,7 @@ Requires: pygtk2-libglade >= 1.99 BuildRequires: scrollkeeper >= 0.3.5 BuildRequires: automake >= 1.6 BuildRequires: autoconf >= 2.52 +BuildRequires: rpm >= 4.1 %description gramps (Genealogical Research and Analysis Management Programming @@ -34,65 +40,57 @@ based plugin system. %build if [ ! -f configure ]; then - CFLAGS="$MYCFLAGS" ./autogen.sh $MYARCH_FLAGS --prefix=%prefix + CFLAGS="$MYCFLAGS" ./autogen.sh $MYARCH_FLAGS --prefix=%prefix \ + --localstatedir=%localstatedir --bindir=%{_bindir} \ + --mandir=%{_mandir} --libdir=%{_libdir} --datadir=%{_datadir} \ + --includedir=%{_includedir} --sysconfdir=%{_sysconfdir} else - CFLAGS="$MYCFLAGS" ./configure $MYARCH_FLAGS --prefix=%prefix + CFLAGS="$MYCFLAGS" %configure fi make - %install rm -rf $RPM_BUILD_ROOT -make GNOME_DATADIR=$RPM_BUILD_ROOT%{prefix}/share prefix=$RPM_BUILD_ROOT%{prefix} install +%makeinstall +%find_lang gramps +rm -rf $RPM_BUILD_ROOT/%{_localstatedir}/scrollkeeper/ %clean rm -rf $RPM_BUILD_ROOT -%files +%files -f gramps.lang %defattr(-, root, root) %doc README COPYING TODO INSTALL COPYING-DOCS +%doc %{_mandir}/man1/* +%doc %{_datadir}/gnome/help/* %{prefix}/bin/gramps -%{_datadir}/gramps/gnome/help/gramps/C/* %{_datadir}/gnome/apps/Applications/gramps.desktop %{_datadir}/pixmaps/gramps.png -%{_datadir}/locale/*/LC_MESSAGES/gramps.mo -%{_datadir}/gramps/*.xpm -%{_datadir}/gramps/*.jpg -%{_datadir}/gramps/gramps.desktop -%{_datadir}/gramps/*.png -%{_datadir}/gramps/*.py -%{_datadir}/gramps/*.pyo -%{_datadir}/gramps/*.glade -%{_datadir}/gramps/*.so -%{_datadir}/gramps/docgen/*.py -%{_datadir}/gramps/docgen/*.pyo -%{_datadir}/gramps/filters/*.py -%{_datadir}/gramps/filters/*.pyo -%{_datadir}/gramps/plugins/*.py -%{_datadir}/gramps/plugins/*.pyo -%{_datadir}/gramps/plugins/*.glade -%{_datadir}/gramps/data/gedcom.xml -%{_datadir}/gramps/data/templates/*.tpkg -%{_datadir}/gramps/data/templates/*.xml -%{_datadir}/gramps/example/* +%{_datadir}/gramps/* %{_datadir}/omf/gramps -%{prefix}/man/man1/gramps.1* - - %post -if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q -o %{_datadir}/omf/gramps; fi +if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi %postun -if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q; fi +if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi %changelog +* Mon May 20 2003 Donald Peterson +- Override RPMs default of localstatedir to /var/lib.. + This is done in accordance with GNOME and FHS compliance guidelines + (http://fedora.mplug.org/docs/rpm-packaging-guidelines.html) +- Use %find_lang macro to get NLS files +- Set %doc tags on appropriate files +- Remove temporary scrollkeeper-created files from install before packaging + to avoid rpm 4.1 complaints. (These aren't needed in the distribution.) +- Use default scrollkeeper-update scripts * Mon Mar 24 2003 Alex Roitman - update scrollkeeper dependencies and add post and postun to enable install on a machine without scrollkeeper * Fri Jun 14 2002 Donald Peterson diff --git a/gramps2/gramps.spec.in b/gramps2/gramps.spec.in index a4864b9a7..9c0dac1de 100644 --- a/gramps2/gramps.spec.in +++ b/gramps2/gramps.spec.in @@ -2,7 +2,7 @@ %define rel @RELEASE@ %define prefix /usr %define localstatedir /var/lib -# Ensure that internal RPM macros for %configure & %makeinstall +# Ensure that internal RPM macros for configure & makeinstall # will expand properly %define _prefix %prefix %define _localstatedir %localstatedir @@ -48,7 +48,7 @@ else CFLAGS="$MYCFLAGS" %configure fi -CFLAGS="$RPM_OPT_FLAGS" make +make %install rm -rf $RPM_BUILD_ROOT