rpms/cpphs/devel cpphs.spec,1.7,1.8

Jens Petersen petersen at fedoraproject.org
Tue Dec 22 09:13:29 UTC 2009


Author: petersen

Update of /cvs/extras/rpms/cpphs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30975

Modified Files:
	cpphs.spec 
Log Message:
- update spec for ghc-6.12.1
- added shared library support: needs ghc-rpm-macros 0.3.1




Index: cpphs.spec
===================================================================
RCS file: /cvs/extras/rpms/cpphs/devel/cpphs.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- cpphs.spec	18 Sep 2009 00:49:18 -0000	1.7
+++ cpphs.spec	22 Dec 2009 09:13:29 -0000	1.8
@@ -1,21 +1,21 @@
 %bcond_without doc
 %bcond_without prof
+%bcond_without shared
 
 # ghc does not emit debug information
 %global debug_package %{nil}
 
 Name:           cpphs
 Version:        1.9
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        C pre-processor for Haskell
 Group:          Development/Languages
 License:        GPL+ and LGPLv2+
 URL:            http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{name}
 Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # fedora ghc archs:
 ExclusiveArch:  %{ix86} x86_64 ppc alpha
-BuildRequires:  ghc, ghc-rpm-macros
+BuildRequires:  ghc, ghc-rpm-macros >= 0.3.1
 %if %{with doc}
 BuildRequires:  ghc-doc
 %endif
@@ -33,14 +33,26 @@ compatible with traditional (K&R) pre-pr
 include: a plain-text mode; an option to unlit literate code files; and
 an option to turn off macro-expansion.
 
+%if %{with shared}
+%package -n ghc-%{name}
+Summary:        Haskell library for %{name}
+Group:          System Environment/Libraries
+License:        LGPLv2+
+
+%description -n ghc-%{name}
+Haskell %{name} library for ghc.
+%endif
 
 %package -n ghc-%{name}-devel
-Summary:        Haskell library for %{name}
+Summary:        Haskell %{name} library development files
 Group:          Development/Libraries
 License:        LGPLv2+
 Requires:       ghc = %{ghc_version}
 Requires(post): ghc = %{ghc_version}
-Requires(preun): ghc = %{ghc_version}
+Requires(postun): ghc = %{ghc_version}
+%if %{with shared}
+Requires:       %{name} = %{version}-%{release}
+%endif
 
 %description -n ghc-%{name}-devel
 Haskell %{name} library for ghc.
@@ -78,19 +90,18 @@ This package contains profiling librarie
 
 
 %build
-%cabal_configure --ghc %{?with_prof:-p}
+%cabal_configure --ghc %{?with_prof:-p} %{?with_shared:--ghc-option=-dynamic}
 %cabal build
 %if %{with doc}
 %cabal haddock
 %endif
-%ghc_gen_scripts
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 %cabal_install
-%ghc_install_scripts
-%ghc_gen_filelists ghc-%{name}
+%cabal_pkg_conf
+
+%ghc_gen_filelists %{name}
 
 
 %clean
@@ -98,7 +109,7 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %post -n ghc-%{name}-devel
-%ghc_register_pkg
+ghc-pkg recache
 
 
 %if %{with doc}
@@ -108,9 +119,7 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %preun -n ghc-%{name}-devel
-if [ "$1" -eq 0 ] ; then
-  %ghc_unregister_pkg
-fi
+ghc-pkg recache
 
 
 %if %{with doc}
@@ -127,9 +136,18 @@ fi
 %{_bindir}/%{name}
 
 
+%if %{with shared}
+%files -n ghc-%{name} -f ghc-%{name}.files
+%defattr(-,root,root,-)
+%doc LICENCE-LGPL
+%endif
+
+
 %files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
 %defattr(-,root,root,-)
+%if %{without shared}
 %doc LICENCE-LGPL
+%endif
 
 
 %if %{with doc}
@@ -145,6 +163,10 @@ fi
 
 
 %changelog
+* Tue Dec 22 2009 Jens Petersen <petersen at redhat.com> - 1.9-2
+- update spec for ghc-6.12.1
+- added shared library support: needs ghc-rpm-macros 0.3.1
+
 * Fri Sep 18 2009 Jens Petersen <petersen at redhat.com> - 1.9-1
 - update to 1.9
 




More information about the fedora-extras-commits mailing list