3 %bcond_without prof # profiling library
5 %define pkgname asn1-encoding
6 Summary: ASN1 data reader and writer in RAW, BER and DER forms
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/asn1-encoding
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 98bc3d5b717eb6b5f47c2d676c9eaaf4
15 URL: http://hackage.haskell.org/package/asn1-encoding
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-asn1-types >= 0.3.0
18 BuildRequires: ghc-hourglass >= 0.2.6
20 BuildRequires: ghc-prof
21 BuildRequires: ghc-asn1-types-prof >= 0.3.0
22 BuildRequires: ghc-hourglass-prof >= 0.2.6
24 BuildRequires: rpmbuild(macros) >= 1.608
26 Requires(post,postun): /usr/bin/ghc-pkg
27 Requires: ghc-asn1-types >= 0.3.0
28 Requires: ghc-hourglass >= 0.2.6
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 # debuginfo is not useful for ghc
32 %define _enable_debug_packages 0
34 # don't compress haddock files
35 %define _noautocompressdoc *.haddock
38 ASN1 data reader and writer in raw form with supports for high level
39 forms of ASN1 (BER, and DER).
42 Summary: Profiling %{pkgname} library for GHC
43 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
46 Requires: ghc-asn1-types-prof >= 0.3.0
47 Requires: ghc-hourglass-prof >= 0.2.6
50 Profiling %{pkgname} library for GHC. Should be installed when
51 GHC's profiling subsystem is needed.
53 %description prof -l pl.UTF-8
54 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
55 kiedy potrzebujemy systemu profilującego z GHC.
58 %setup -q -n %{pkgname}-%{version}
61 runhaskell Setup.hs configure -v2 \
62 %{?with_prof:--enable-library-profiling} \
65 --libexecdir=%{_libexecdir} \
66 --docdir=%{_docdir}/%{name}-%{version}
68 runhaskell Setup.hs build
69 runhaskell Setup.hs haddock --executables
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
75 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
77 # work around automatic haddock docs installation
78 %{__rm} -rf %{name}-%{version}-doc
79 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
80 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
82 runhaskell Setup.hs register \
83 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
86 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc %{name}-%{version}-doc/*
97 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
98 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
99 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
101 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
103 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
104 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1/*.hi
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1/*.dyn_hi
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1/BinaryEncoding
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1/BinaryEncoding/*.hi
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1/BinaryEncoding/*.dyn_hi
113 %defattr(644,root,root,755)
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1/*.p_hi
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ASN1/BinaryEncoding/*.p_hi