rpms/ghc/devel ghc-rpm-requires, NONE, 1.1 ghc-rpm-macros.ghc, 1.13, 1.14 ghc.spec, 1.80, 1.81
Jens Petersen
petersen at fedoraproject.org
Sun Apr 19 04:28:54 UTC 2009
- Previous message (by thread): rpms/gigolo/devel gigolo.spec, 1.3, 1.4 sources, 1.4, 1.5 .cvsignore, 1.4, 1.5
- Next message (by thread): rpms/ibus-table-extraphrase/devel ibus-table-extraphrase.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: petersen
Update of /cvs/pkgs/rpms/ghc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18443
Modified Files:
ghc-rpm-macros.ghc ghc.spec
Added Files:
ghc-rpm-requires
Log Message:
- add ghc-requires rpm script to generate ghc version dependencies
(thanks to Till Maas)
- update macros.ghc:
- add %%ghcrequires to call above script
- pkg_libdir and pkg_docdir no longer to appear in packages and replaced
by ghcpkgdir and ghcdocdir inside macros.ghc
- make filelist also for docs
--- NEW FILE ghc-rpm-requires ---
#! /bin/bash
# Author: Till Maas <opensource at till.name>
#
# Use this script as follows in your spec to get versioned
# ghc requires for post and preun:
#
# %{expand:%(/usr/lib/ghc-script-requires.sh ghc post preun)}
ghc_num_ver=$(ghc --numeric-version)
PKG=$1 ; shift
# rpm will run this script once before the BuildRequires are installed
# then it has to report nothing to avoid rpm complainng about the empty version
# after the "ghc ="
if [ -n "${ghc_num_ver}" ]; then
echo "Requires: $PKG = ${ghc_num_ver}"
for script in "$@"; do
echo "Requires(${script}): $PKG = ${ghc_num_ver}"
done
fi
Index: ghc-rpm-macros.ghc
===================================================================
RCS file: /cvs/pkgs/rpms/ghc/devel/ghc-rpm-macros.ghc,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ghc-rpm-macros.ghc 27 Feb 2009 01:05:09 -0000 1.13
+++ ghc-rpm-macros.ghc 19 Apr 2009 04:28:22 -0000 1.14
@@ -1,7 +1,7 @@
%cabal %{_bindir}/runghc Setup
%cabal_configure \
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{pkg_docdir} --libsubdir='$compiler/$pkgid'
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid'
%cabal_makefile \
%cabal makefile -f cabal-rpm.mk \
@@ -10,22 +10,29 @@
%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v
+%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version}
+%ghcpkgdir %{_libdir}/ghc-%(ghc --numeric-version)/%{?pkg_name}%{!?pkg_name:%name}-%{version}
+
%ghc_gen_filelists() \
-rm -f %1-devel.files %1-prof.files \
+rm -f %1-devel.files %1-prof.files %1-doc.files \
echo '%defattr(-,root,root,-)' > %1-devel.files \
-find ${RPM_BUILD_ROOT}%{pkg_libdir} -type d | sed 's/^/%dir /' >> %1-devel.files \
-find ${RPM_BUILD_ROOT}%{pkg_libdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \
+find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \
+find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \
echo '%defattr(-,root,root,-)' > %1-prof.files \
-find ${RPM_BUILD_ROOT}%{pkg_libdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \
+find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \
sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \
+echo '%defattr(-,root,root,-)' > %1-doc.files \
+echo '%{ghcdocdir}' >> %1-doc.files \
%{nil}
%ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script
-%ghc_install_scripts install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{pkg_libdir}
+%ghc_install_scripts install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{ghcpkgdir}
-%ghc_register_pkg %{pkg_libdir}/register.sh >/dev/null || :
+%ghc_register_pkg %{ghcpkgdir}/register.sh >/dev/null || :
-%ghc_unregister_pkg %{pkg_libdir}/unregister.sh >/dev/null || :
+%ghc_unregister_pkg %{ghcpkgdir}/unregister.sh >/dev/null || :
%ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :
+
+%ghcrequires() %{expand:%(/usr/lib/rpm/ghc-requires %*)}
Index: ghc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghc/devel/ghc.spec,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- ghc.spec 8 Apr 2009 21:39:16 -0000 1.80
+++ ghc.spec 19 Apr 2009 04:28:22 -0000 1.81
@@ -16,7 +16,7 @@
Name: ghc
Version: 6.10.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Glasgow Haskell Compilation system
# fedora ghc has only been bootstrapped on the following archs:
ExclusiveArch: %{ix86} x86_64 ppc alpha
@@ -24,7 +24,10 @@
Group: Development/Languages
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
Source1: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2
+# /etc/rpm/macros.ghc
Source2: ghc-rpm-macros.ghc
+# /usr/lib/rpm/ghc-requires
+Source3: ghc-rpm-requires
URL: http://haskell.org/ghc/
# libedit-devel > 2.11-2 correctly requires ncurses-devel
Requires: gcc, gmp-devel, libedit-devel > 2.11-2
@@ -125,6 +128,9 @@
# install rpm macros
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm
cp -p %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc
+# rpm script for ghc version deps
+mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm
+cp -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm/ghc-requires
SRC_TOP=$PWD
rm -f rpm-*-filelist rpm-*.files
@@ -191,6 +197,7 @@
%{_bindir}/*
%{_sysconfdir}/rpm/macros.ghc
%config(noreplace) %{_libdir}/ghc-%{version}/package.conf
+%attr(755,root,root) %{_prefix}/lib/rpm/ghc-requires
%if %{with prof}
%files prof -f rpm-prof-filelist
@@ -216,6 +223,15 @@
%endif
%changelog
+* Sun Apr 19 2009 Jens Petersen <petersen at redhat.com> - 6.10.2-2
+- add ghc-requires rpm script to generate ghc version dependencies
+ (thanks to Till Maas)
+- update macros.ghc:
+ - add %%ghcrequires to call above script
+ - pkg_libdir and pkg_docdir obsoleted in packages and replaced
+ by ghcpkgdir and ghcdocdir inside macros.ghc
+ - make filelist also for docs
+
* Wed Apr 08 2009 Bryan O'Sullivan <bos at serpentine.com> - 6.10.2-1
- Update to 6.10.2
- Previous message (by thread): rpms/gigolo/devel gigolo.spec, 1.3, 1.4 sources, 1.4, 1.5 .cvsignore, 1.4, 1.5
- Next message (by thread): rpms/ibus-table-extraphrase/devel ibus-table-extraphrase.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list