summaryrefslogtreecommitdiffstats
path: root/funpl
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2011-09-08 18:45:19 +0200
committerMichel Alexandre Salim <salimma@fedoraproject.org>2011-09-08 18:45:19 +0200
commit3d21cda53717e8e8612ef1b07b1ddd55788a1c2a (patch)
tree5bf68750538463468c7a2c153e8c63935e6e3fbb /funpl
parent686408b8e26277e5cca240542d3ca324771959c5 (diff)
downloadspecs-3d21cda53717e8e8612ef1b07b1ddd55788a1c2a.tar.gz
specs-3d21cda53717e8e8612ef1b07b1ddd55788a1c2a.tar.xz
specs-3d21cda53717e8e8612ef1b07b1ddd55788a1c2a.zip
ghc-language-c: update & rebase using latest cabal2spec
Diffstat (limited to 'funpl')
-rw-r--r--funpl/ghc-language-c.spec160
1 files changed, 56 insertions, 104 deletions
diff --git a/funpl/ghc-language-c.spec b/funpl/ghc-language-c.spec
index ba5e286..fcbfcaf 100644
--- a/funpl/ghc-language-c.spec
+++ b/funpl/ghc-language-c.spec
@@ -1,78 +1,62 @@
+# For Haskell Packaging Guidelines see:
+# - https://fedoraproject.org/wiki/Packaging:Haskell
+# - https://fedoraproject.org/wiki/PackagingDrafts/Haskell
+
%global pkg_name language-c
-%bcond_without doc
-%bcond_without prof
+# common part of summary for all the subpackages
+%global common_summary Haskell library for C code analysis and generation
-#ghc does not emit debug information
-%global debug_package %{nil}
+# main description used for all the subpackages
+%global common_description Language C is a Haskell library for the analysis and generation of C\
+code. It features a complete, well tested parser and pretty printer\
+for all of C99 and a large set of GNU extensions.
Name: ghc-%{pkg_name}
-Version: 0.3.1.1
+Version: 0.4.2
Release: 1%{?dist}
-Summary: A Haskell library for the analysis and generation of C code
+Summary: %{common_summary}
-Group: Development/Libraries
+Group: System Environment/Libraries
License: BSD
+# BEGIN: cabal2spec-0.24
URL: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-# fedora ghc archs:
-ExclusiveArch: %{ix86} x86_64 ppc alpha
-BuildRequires: ghc ghc-rpm-macros happy alex
-%if %{with doc}
-BuildRequires: ghc-doc
-%endif
-%if %{with prof}
-BuildRequires: ghc-prof
-%endif
+ExclusiveArch: %{ghc_arches}
+BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-rpm-macros
+BuildRequires: hscolour
+# END: cabal2spec-0.24
+# BR any C devel dependency here
+# list ghc-*-prof dependencies:
+BuildRequires: alex
+BuildRequires: happy
+BuildRequires: ghc-containers-prof
+BuildRequires: ghc-directory-prof
+BuildRequires: ghc-filepath-prof
+BuildRequires: ghc-pretty-prof
+BuildRequires: ghc-process-prof
+BuildRequires: ghc-syb-prof
%description
-Language C is a haskell library for the analysis and generation of C
-code. It features a complete, well tested parser and pretty printer
-for all of C99 and a large set of GNU extensions.
-
-
-%package devel
-Summary: Haskell %{pkg_name} library
-Group: Development/Libraries
-Requires: ghc = %{ghc_version}
-Requires(post): ghc = %{ghc_version}
-Requires(preun): ghc = %{ghc_version}
-
-%description devel
-Language C is a haskell library for the analysis and generation of C
-code. It features a complete, well tested parser and pretty printer
-for all of C99 and a large set of GNU extensions.
-
-This package contains the development files for %{name}
-built for ghc-%{ghc_version}.
+%{common_description}
-%if %{with doc}
-%package doc
-Summary: Documentation for %{name}
+%package -n ghc-%{pkg_name}-devel
+Summary: Development files for %{common_summary}
Group: Development/Libraries
-Requires: ghc-doc = %{ghc_version}
-Requires(post): ghc-doc = %{ghc_version}
-Requires(postun): ghc-doc = %{ghc_version}
-
-%description doc
-This package contains development documentation files for the
-%{name} library.
-%endif
+# BEGIN: cabal2spec-0.24
+%{?ghc_devel_requires}
+Obsoletes: ghc-%{pkg_name}-prof < %{version}-%{release}
+Provides: ghc-%{pkg_name}-prof = %{version}-%{release}
+# END: cabal2spec-0.24
+# remember to require any C devel dependency here
+# Haskell devel dependencies are autogenerated by ghc-deps.sh
+%description -n ghc-%{pkg_name}-devel
+%{common_description}
-%if %{with prof}
-%package prof
-Summary: Profiling libraries for %{name}
-Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
-Requires: ghc-prof = %{ghc_version}
-
-%description prof
-This package contains profiling libraries for %{name}
-built for ghc-%{ghc_version}.
-%endif
+This package contains the development files.
%prep
@@ -80,66 +64,34 @@ built for ghc-%{ghc_version}.
%build
-%cabal_configure --ghc %{?with_prof:-p}
-%cabal build
-%if %{with doc}
-%cabal haddock
-%endif
-%ghc_gen_scripts
+%ghc_lib_build
%install
-rm -rf $RPM_BUILD_ROOT
-%cabal_install
-%ghc_install_scripts
-%ghc_gen_filelists %{name}
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+%ghc_lib_install
-%post devel
-%ghc_register_pkg
+%post -n ghc-%{pkg_name}-devel
+%ghc_pkg_recache
-%if %{with doc}
-%post doc
-%ghc_reindex_haddock
-%endif
-
+%postun -n ghc-%{pkg_name}-devel
+%ghc_pkg_recache
-%preun devel
-if [ "$1" -eq 0 ] ; then
- %ghc_unregister_pkg
-fi
-
-%if %{with doc}
-%postun doc
-if [ "$1" -eq 0 ] ; then
- %ghc_reindex_haddock
-fi
-%endif
-
-
-%files devel -f %{name}-devel.files
-%defattr(-,root,root,-)
-%{_docdir}/%{name}-%{version}
-
-
-%if %{with doc}
-%files doc -f %{name}-doc.files
+%if %{undefined ghc_without_shared}
+%files -n ghc-%{pkg_name} -f ghc-%{pkg_name}.files
%defattr(-,root,root,-)
%endif
-%if %{with prof}
-%files prof -f %{name}-prof.files
+%files -n ghc-%{pkg_name}-devel -f ghc-%{pkg_name}-devel.files
%defattr(-,root,root,-)
-%endif
%changelog
-* Fri Oct 23 2009 Michel Salim <salimma@fedoraproject.org> - 0.3.1.1-1
-- Initial package
+* Thu Sep 8 2011 Michel Salim <salimma@fedoraproject.org> - 0.4.2-1
+- Override license, summary and description
+
+* Thu Sep 8 2011 Fedora Haskell SIG <haskell-devel@lists.fedoraproject.org> - 0.4.2-0
+- initial packaging for Fedora automatically generated by cabal2spec-0.24