]> git.pld-linux.org Git - packages/ghc-uuid-types.git/blob - ghc-uuid-types.spec
- new
[packages/ghc-uuid-types.git] / ghc-uuid-types.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname uuid-types
6 Summary:        Type definitions for Universally Unique Identifiers
7 Name:           ghc-%{pkgname}
8 Version:        1.0.3
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/uuid-types
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  8eb681871f48a2f7fd739fad9e91c341
15 Patch0:         hashable-1.3.patch
16 URL:            http://hackage.haskell.org/package/uuid-types
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-hashable
19 BuildRequires:  ghc-random
20 %if %{with prof}
21 BuildRequires:  ghc-prof
22 BuildRequires:  ghc-hashable-prof
23 BuildRequires:  ghc-random-prof
24 %endif
25 BuildRequires:  rpmbuild(macros) >= 1.608
26 %requires_eq    ghc
27 Requires(post,postun):  /usr/bin/ghc-pkg
28 Requires:       ghc-hashable
29 Requires:       ghc-random
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 # debuginfo is not useful for ghc
33 %define         _enable_debug_packages  0
34
35 # don't compress haddock files
36 %define         _noautocompressdoc      *.haddock
37
38 %description
39 This library contains type definitions for Universally Unique
40 Identifiers and basic conversion functions.
41 See http://en.wikipedia.org/wiki/UUID for the general idea.
42
43 %package prof
44 Summary:        Profiling %{pkgname} library for GHC
45 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48 Requires:       ghc-hashable-prof
49 Requires:       ghc-random-prof
50
51 %description prof
52 Profiling %{pkgname} library for GHC.  Should be installed when
53 GHC's profiling subsystem is needed.
54
55 %description prof -l pl.UTF-8
56 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
57 kiedy potrzebujemy systemu profilującego z GHC.
58
59 %prep
60 %setup -q -n %{pkgname}-%{version}
61 %patch0 -p1
62
63 %build
64 runhaskell Setup.hs configure -v2 \
65         %{?with_prof:--enable-library-profiling} \
66         --prefix=%{_prefix} \
67         --libdir=%{_libdir} \
68         --libexecdir=%{_libexecdir} \
69         --docdir=%{_docdir}/%{name}-%{version}
70
71 runhaskell Setup.hs build
72 runhaskell Setup.hs haddock --executables
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
77
78 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
79
80 # work around automatic haddock docs installation
81 %{__rm} -rf %{name}-%{version}-doc
82 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
83 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
84
85 runhaskell Setup.hs register \
86         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post
92 %ghc_pkg_recache
93
94 %postun
95 %ghc_pkg_recache
96
97 %files
98 %defattr(644,root,root,755)
99 %doc CHANGES %{name}-%{version}-doc/*
100 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
101 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
104 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
105
106 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/*.hi
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/*.dyn_hi
110 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types/*.hi
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types/*.dyn_hi
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types/Internal
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types/Internal/*.hi
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types/Internal/*.dyn_hi
116
117 %if %{with prof}
118 %files prof
119 %defattr(644,root,root,755)
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/*.p_hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types/*.p_hi
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/UUID/Types/Internal/*.p_hi
124 %endif
This page took 0.099736 seconds and 3 git commands to generate.