[gap] Add an RPM macro file for GAP packages. Fix the location of config.h.

Jerry James jjames at fedoraproject.org
Tue Jan 31 20:12:22 UTC 2012


commit 652a29890a5bf4fe6af0304dd7a2b2ae6878fe79
Author: Jerry James <loganjerry at gmail.com>
Date:   Tue Jan 31 13:12:10 2012 -0700

    Add an RPM macro file for GAP packages.
    Fix the location of config.h.

 gap.spec |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/gap.spec b/gap.spec
index 0c9bc49..8b8cc19 100644
--- a/gap.spec
+++ b/gap.spec
@@ -6,7 +6,7 @@
 
 Name:           gap
 Version:        %(echo %upstreamver | sed -r "s/r|p/./g")
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Computational discrete algebra
 
 Group:          Applications/Engineering
@@ -225,6 +225,14 @@ find doc -name \*.dvi -o -name \*.toc | xargs gzip --best
 find -O3 small -mindepth 2 -type f | xargs gzip --best -f
 gzip --best prim/grps/*.g trans/*.grp
 
+# Create an RPM macro file for GAP packages
+cat > macros.%{name} << EOF
+%%_gap_version %{version}
+%%_gap_upstream_version %{upstreamver}
+%%_gap_dir %{gapdir}
+%%_gap_arch_dir %{gaparchdir}
+EOF
+
 %install
 # Get the value of the GAParch variable
 source ./sysinfo.gap
@@ -253,8 +261,9 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/workspace
 
 # Install the header and object files where the GAP compiler can find them
 mkdir -p $RPM_BUILD_ROOT%{gaparchdir}/src
-cp -p src/*.h bin/$GAParch/config.h $RPM_BUILD_ROOT%{gaparchdir}/src
+cp -p src/*.h $RPM_BUILD_ROOT%{gaparchdir}/src
 mkdir -p $RPM_BUILD_ROOT%{gaparchdir}/bin/$GAParch
+cp -p bin/$GAParch/config.h $RPM_BUILD_ROOT%{gaparchdir}/bin/$GAParch
 cp -p bin/$GAParch/*.o $RPM_BUILD_ROOT%{gaparchdir}/bin/$GAParch
 
 # Make an empty directory to hold the GAP packages
@@ -279,6 +288,10 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
 desktop-file-install --mode=644 --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
   %{SOURCE4}
 
+# Install the RPM macro file
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
+cp -p macros.%{name} $RPM_BUILD_ROOT%{_sysconfdir}/rpm
+
 # Install the VIM support
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/indent
 cp -p etc/gap_indent.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/indent
@@ -377,6 +390,7 @@ make testinstall
 %{gaparchdir}/src/
 %{gapdir}/tst/
 %{_mandir}/man1/gac.1*
+%config(noreplace) %{_sysconfdir}/rpm/macros.%{name}
 
 %files prim-groups
 %{gapdir}/prim/
@@ -411,6 +425,10 @@ make testinstall
 %{_xemacs_sitelispdir}/gap*.el
 
 %changelog
+* Tue Jan 31 2012 Jerry James <loganjerry at gmail.com> - 4.4.12-4
+- Add an RPM macro file for GAP packages
+- Fix the location of config.h
+
 * Wed Jan 11 2012 Jerry James <loganjerry at gmail.com> - 4.4.12-3
 - Fix problems found on review
 


More information about the scm-commits mailing list