]> git.pld-linux.org Git - packages/ghc-asn1-encoding.git/blob - ghc-asn1-encoding.spec
c08473f748021f15500c4796aa6c8229522b52fa
[packages/ghc-asn1-encoding.git] / ghc-asn1-encoding.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname asn1-encoding
6 Summary:        ASN1 data reader and writer in RAW, BER and DER forms
7 Name:           ghc-%{pkgname}
8 Version:        0.9.6
9 Release:        1
10 License:        BSD
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
19 %if %{with prof}
20 BuildRequires:  ghc-prof
21 BuildRequires:  ghc-asn1-types-prof >= 0.3.0
22 BuildRequires:  ghc-hourglass-prof >= 0.2.6
23 %endif
24 BuildRequires:  rpmbuild(macros) >= 1.608
25 %requires_eq    ghc
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)
30
31 # debuginfo is not useful for ghc
32 %define         _enable_debug_packages  0
33
34 # don't compress haddock files
35 %define         _noautocompressdoc      *.haddock
36
37 %description
38 ASN1 data reader and writer in raw form with supports for high level
39 forms of ASN1 (BER, and DER).
40
41 %package prof
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
48
49 %description prof
50 Profiling %{pkgname} library for GHC.  Should be installed when
51 GHC's profiling subsystem is needed.
52
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.
56
57 %prep
58 %setup -q -n %{pkgname}-%{version}
59
60 %build
61 runhaskell Setup.hs configure -v2 \
62         %{?with_prof:--enable-library-profiling} \
63         --prefix=%{_prefix} \
64         --libdir=%{_libdir} \
65         --libexecdir=%{_libexecdir} \
66         --docdir=%{_docdir}/%{name}-%{version}
67
68 runhaskell Setup.hs build
69 runhaskell Setup.hs haddock --executables
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
74
75 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
76
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}
81
82 runhaskell Setup.hs register \
83         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %post
89 %ghc_pkg_recache
90
91 %postun
92 %ghc_pkg_recache
93
94 %files
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
102
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
110
111 %if %{with prof}
112 %files prof
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
117 %endif
This page took 0.081157 seconds and 2 git commands to generate.