]> git.pld-linux.org Git - packages/cpphs.git/commitdiff
- updated to 1.17.1, pl, unified, added prof bcond
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 24 Dec 2013 14:00:09 +0000 (15:00 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 24 Dec 2013 14:00:09 +0000 (15:00 +0100)
cpphs.spec

index 30f5a23e9ec36961cab0c7e24e195193e99eaa57..fd462d8c9512acd5f35f82b0c254c01a432ca3aa 100644 (file)
@@ -1,23 +1,48 @@
+#
+# Conditional build:
+%bcond_without prof    # profiling library
+#
 %define                pkgname cpphs
 Summary:       A liberalised re-implementation of cpp, the C pre-processor
+Summary(pl.UTF-8):     Swobodniejsza reimplementacja cpp (preprocesora C)
 Name:          cpphs
-Version:       1.16
+Version:       1.17.1
 Release:       1
 License:       LGPL
 Group:         Development/Languages
-Source0:       http://hackage.haskell.org/packages/archive/cpphs/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 2224334a779369978d1259996c6539d1
+#Source0Download: http://hackage.haskell.org/package/cpphs
+Source0:       http://hackage.haskell.org/package/cpphs-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: ef8982c386255b7b485110027690717c
 URL:           http://haskell.org/cpphs/
 BuildRequires: ghc >= 6.12.3
+BuildRequires: ghc-base >= 3
+BuildRequires: ghc-base < 6
+BuildRequires: ghc-directory
+BuildRequires: ghc-old-locale
+BuildRequires: ghc-old-time
+%if %{with prof}
+BuildRequires: ghc-prof >= 6.12.3
+BuildRequires: ghc-base-prof >= 3
+BuildRequires: ghc-base-prof < 6
+BuildRequires: ghc-directory-prof
+BuildRequires: ghc-old-locale-prof
+BuildRequires: ghc-old-time-prof
+%endif
 BuildRequires: rpmbuild(macros) >= 1.608
+Requires(post,postun): /usr/bin/ghc-pkg
 %requires_eq   ghc
+Requires:      ghc-base >= 3
+Requires:      ghc-base < 6
+Requires:      ghc-directory
+Requires:      ghc-old-locale
+Requires:      ghc-old-time
 Obsoletes:     cpphs-doc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # debuginfo is not useful for ghc
 %define                _enable_debug_packages  0
 
-# don't compress haddoc files
+# don't compress haddock files
 %define                _noautocompressdoc      *.haddock
 
 %description
@@ -30,15 +55,30 @@ and compatible with traditional (K&R) pre-processors. Additional
 features include: a plain-text mode; an option to unlit literate code
 files; and an option to turn off macro-expansion.
 
+%description -l pl.UTF-8
+Cpphs to reimplementacja preprocesora C, która jest bardziej zgodna z
+Haskellem, a jednocześnie sama napisana w Haskellu, więc może być
+rozprowadzania z kompilatorami.
+
+Ta wersja preprocesora C jest w większości kompletna pod względem
+funkcjonalności i zgodna z tradycyjnymi preprocesorami (K&R).
+Dodatkowe funkcje obejmują m.in.: tryb zwykłego tekstu, opcję do
+wyłączania rozwijania makr.
+
 %package prof
 Summary:       Profiling cpphs library for GHC
-Summary(pl.UTF-8):     Biblioteka profilująca cpphs dla GHC.
+Summary(pl.UTF-8):     Biblioteka profilująca cpphs dla GHC
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      ghc-base-prof >= 3
+Requires:      ghc-base-prof < 6
+Requires:      ghc-directory-prof
+Requires:      ghc-old-locale-prof
+Requires:      ghc-old-time-prof
 
 %description prof
-Profiling cpphs library for GHC.  Should be installed when
-GHC's profiling subsystem is needed.
+Profiling cpphs library for GHC. Should be installed when GHC's
+profiling subsystem is needed.
 
 %description prof -l pl.UTF-8
 Biblioteka profilująca cpphs dla GHC. Powinna być zainstalowana
@@ -48,7 +88,8 @@ kiedy potrzebujemy systemu profilującego z GHC.
 %setup -q
 
 %build
-runhaskell Setup.hs configure -v2 --enable-library-profiling \
+runhaskell Setup.hs configure -v2 \
+       %{?with_prof:--enable-library-profiling} \
        --prefix=%{_prefix} \
        --libdir=%{_libdir} \
        --libexecdir=%{_libexecdir} \
@@ -69,7 +110,7 @@ cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 
 runhaskell Setup.hs register \
-       --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
+       --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -87,22 +128,20 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
 
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
-%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
-
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HScpphs-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}.a
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.hi
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.hi
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.hi
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/*.hi
 
 %files prof
 %defattr(644,root,root,755)
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}_p.a
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.p_hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.p_hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/*.p_hi
This page took 0.078639 seconds and 4 git commands to generate.