]> git.pld-linux.org Git - packages/ghc-zlib.git/commitdiff
- updated packaging to new template (ghc 6.12.3+)
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 27 Aug 2010 20:29:25 +0000 (20:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ghc-zlib.spec -> 1.3

ghc-zlib.spec

index c3551540ece75bbfbdcffe3684041ee2c053e41f..33b3e0b7a231407b6ca1b1f328286dde17631e20 100644 (file)
@@ -8,11 +8,11 @@ Group:                Development/Languages
 Source0:       http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
 # Source0-md5: 19859e241dc18ef1501a5d44d8523507
 URL:           http://hackage.haskell.org/package/%{pkgname}/
-BuildRequires: ghc >= 6.10
+BuildRequires: ghc >= 6.12.3
 %requires_eq   ghc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                libsubdir       ghc-%(/usr/bin/ghc --numeric-version)/%{pkgname}-%{version}
+%define                ghcdir          ghc-%(/usr/bin/ghc --numeric-version)
 
 %description
 This package provides a pure interface for compressing and
@@ -33,7 +33,6 @@ runhaskell Setup.hs configure -v2 \
        --prefix=%{_prefix} \
        --libdir=%{_libdir} \
        --libexecdir=%{_libexecdir} \
-       --libsubdir=%{libsubdir} \
        --docdir=%{_docdir}/%{name}-%{version}
 
 runhaskell Setup.hs build
@@ -41,6 +40,8 @@ runhaskell Setup.hs haddock --executables
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
+
 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
 
 # work around automatic haddock docs installation
@@ -48,20 +49,19 @@ rm -rf %{name}-%{version}-doc
 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
 
 runhaskell Setup.hs register \
-       --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{libsubdir}/%{pkgname}.conf
+       --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/usr/bin/ghc-pkg update %{_libdir}/%{libsubdir}/%{pkgname}.conf
+/usr/bin/ghc-pkg recache
 
 %postun
-if [ "$1" = "0" ]; then
-       /usr/bin/ghc-pkg unregister %{pkgname}-%{version}
-fi
+/usr/bin/ghc-pkg recache
 
 %files
 %defattr(644,root,root,755)
 %doc %{name}-%{version}-doc/html
-%{_libdir}/%{libsubdir}
+%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}
This page took 0.071223 seconds and 4 git commands to generate.