]> git.pld-linux.org Git - packages/ghc-alex-meta.git/blob - ghc-alex-meta.spec
- pl, unified, added prof bcond
[packages/ghc-alex-meta.git] / ghc-alex-meta.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname alex-meta
6 Summary:        Quasi-quoter for Alex lexers
7 Summary(pl.UTF-8):      Quasi-quoter dla analizatorów leksykalnych narzędzia Alex
8 Name:           ghc-%{pkgname}
9 Version:        0.3.0.5
10 Release:        3
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/alex-meta
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  a2c39f21b06d2c186ff5b66f53dffc17
16 URL:            http://hackage.haskell.org/package/alex-meta
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-QuickCheck >= 2
19 BuildRequires:  ghc-array
20 BuildRequires:  ghc-base >= 4.2
21 BuildRequires:  ghc-base < 5
22 BuildRequires:  ghc-containers
23 BuildRequires:  ghc-haskell-src-meta >= 0.5.1.2
24 BuildRequires:  ghc-haskell-src-meta < 1.0
25 BuildRequires:  ghc-template-haskell >= 2.5
26 BuildRequires:  ghc-template-haskell < 2.9
27 %if %{with prof}
28 BuildRequires:  ghc-prof >= 6.12.3
29 BuildRequires:  ghc-QuickCheck-prof >= 2
30 BuildRequires:  ghc-array-prof
31 BuildRequires:  ghc-base-prof >= 4.2
32 BuildRequires:  ghc-base-prof < 5
33 BuildRequires:  ghc-containers-prof
34 BuildRequires:  ghc-haskell-src-meta-prof >= 0.5.1.2
35 BuildRequires:  ghc-haskell-src-meta-prof < 1.0
36 BuildRequires:  ghc-template-haskell-prof >= 2.5
37 BuildRequires:  ghc-template-haskell-prof < 2.9
38 %endif
39 BuildRequires:  rpmbuild(macros) >= 1.608
40 Requires(post,postun):  /usr/bin/ghc-pkg
41 %requires_releq ghc
42 Requires:       ghc-array
43 Requires:       ghc-base >= 4.2
44 Requires:       ghc-base < 5
45 Requires:       ghc-containers
46 Requires:       ghc-haskell-src-meta >= 0.5.1.2
47 Requires:       ghc-haskell-src-meta < 1.0
48 Requires:       ghc-template-haskell >= 2.5
49 Requires:       ghc-template-haskell < 2.9
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 # debuginfo is not useful for ghc
53 %define         _enable_debug_packages  0
54
55 # don't compress haddock files
56 %define         _noautocompressdoc      *.haddock
57
58 %description
59 Quasi-quoter for Alex lexers.
60
61 %description -l pl.UTF-8
62 Quasi-quoter dla analizatorów leksykalnych narzędzia Alex.
63
64 %package prof
65 Summary:        Profiling %{pkgname} library for GHC
66 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC.
67 Group:          Development/Libraries
68 Requires:       %{name} = %{version}-%{release}
69 Requires:       ghc-array-prof
70 Requires:       ghc-base-prof >= 4.2
71 Requires:       ghc-base-prof < 5
72 Requires:       ghc-containers-prof
73 Requires:       ghc-haskell-src-meta-prof >= 0.5.1.2
74 Requires:       ghc-haskell-src-meta-prof < 1.0
75 Requires:       ghc-template-haskell-prof >= 2.5
76 Requires:       ghc-template-haskell-prof < 2.9
77
78 %description prof
79 Profiling %{pkgname} library for GHC.  Should be installed when
80 GHC's profiling subsystem is needed.
81
82 %description prof -l pl.UTF-8
83 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
84 kiedy potrzebujemy systemu profilującego z GHC.
85
86 %prep
87 %setup -q -n %{pkgname}-%{version}
88
89 %build
90 runhaskell Setup.hs configure -v2 \
91         %{?with_prof:--enable-library-profiling} \
92         --prefix=%{_prefix} \
93         --libdir=%{_libdir} \
94         --libexecdir=%{_libexecdir} \
95         --docdir=%{_docdir}/%{name}-%{version}
96
97 runhaskell Setup.hs build
98 runhaskell Setup.hs haddock --executables
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
103
104 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
105
106 # work around automatic haddock docs installation
107 %{__rm} -rf %{name}-%{version}-doc
108 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
109 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
110
111 runhaskell Setup.hs register \
112         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post
118 %ghc_pkg_recache
119
120 %postun
121 %ghc_pkg_recache
122
123 %files
124 %defattr(644,root,root,755)
125 %doc %{name}-%{version}-doc/*
126 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSalex-meta-%{version}.o
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSalex-meta-%{version}.a
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
131 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
133 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Ranged
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Ranged/*.hi
135 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex.hi
137 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex/*.hi
139
140 %files prof
141 %defattr(644,root,root,755)
142 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSalex-meta-%{version}_p.a
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Ranged/*.p_hi
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex.p_hi
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex/*.p_hi
This page took 0.045166 seconds and 3 git commands to generate.