diff --git a/_service b/_service
new file mode 100644
index 0000000..e294c3d
--- /dev/null
+++ b/_service
@@ -0,0 +1,3 @@
+
+ /packages/archive/zlib/0.5.3.1/zlib-0.5.3.1.tar.gzhackage.haskell.org
+
\ No newline at end of file
diff --git a/_service:download_url:zlib-0.5.3.1.tar.gz b/_service:download_url:zlib-0.5.3.1.tar.gz
new file mode 100644
index 0000000..04aec7e
--- /dev/null
+++ b/_service:download_url:zlib-0.5.3.1.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:382a16d09d47ba9c742d552b80cf3902c81556fc69a8d6983af98b47263545c2
+size 125087
diff --git a/ghc-zlib.changes b/ghc-zlib.changes
new file mode 100644
index 0000000..a349496
--- /dev/null
+++ b/ghc-zlib.changes
@@ -0,0 +1,15 @@
+-------------------------------------------------------------------
+Thu Dec 15 09:33:05 UTC 2011 - peter.trommler@ohm-hochschule.de
+
+- Added requires zlib-devel
+
+-------------------------------------------------------------------
+Thu Dec 15 09:08:25 UTC 2011 - peter.trommler@ohm-hochschule.de
+
+- Add arches for OBS.
+
+-------------------------------------------------------------------
+Thu Dec 15 09:06:35 UTC 2011 - peter.trommler@ohm-hochschule.de
+
+- Initial packaging.
+
diff --git a/ghc-zlib.spec b/ghc-zlib.spec
index 00f2039..5730e32 100644
--- a/ghc-zlib.spec
+++ b/ghc-zlib.spec
@@ -1,98 +1,71 @@
-%define pkg_name zlib
-%define ghc_version %(ghc --numeric-version)
+# For Haskell Packaging Guidelines see:
+# - https://fedoraproject.org/wiki/Packaging:Haskell
+# - https://fedoraproject.org/wiki/PackagingDrafts/Haskell
-%define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
-%define pkg_docdir %{_datadir}/doc/ghc/libraries/%{pkg_name}-%{version}
+# Copyright (c) 2012 Peter Trommler peter.trommler@ohm-hochschule.de
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
-# ghc does not emit debug information
-%define debug_package %{nil}
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
-Name: ghc-%{pkg_name}
-Version: 0.5.2.0
-Release: 0
-Summary: Compression and decompression in the gzip and zlib formats
-Group: Development/Libraries
-License: BSD3
-URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
-Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: ghc, ghc-doc, ghc-prof
+%global pkg_name zlib
+
+# common part of summary for all the subpackages
+%global common_summary Haskell %{pkg_name} library
+
+# main description used for all the subpackages
+%global common_description A %{pkg_name} library for Haskell.
+
+Name: ghc-zlib
+Version: 0.5.3.1
+Release: 1
+Summary: %{common_summary}
+
+Group: Development/Libraries/Other
+License: @LICENSE@
+# BEGIN cabal2spec
+URL: http://hackage.haskell.org/package/%{pkg_name}
+Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
+ExclusiveArch: %{ix86} x86_64 %{ghc_arches}
+BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-rpm-macros
+%if %{undefined without_hscolour}
+BuildRequires: hscolour
+%endif
+# END cabal2spec
+# BR any C devel dependency here
+# list ghc-*-prof dependencies:
+BuildRequires: ghc-bytestring-devel
BuildRequires: zlib-devel
-BuildRequires: licenses
%description
-This package provides a pure interface for compressing and decompressing streams
-of data represented as lazy ByteStrings. It uses the zlib C library so it has
-high performance. It supports the "zlib", "gzip" and "raw" compression formats.
-
-It provides a convenient high level API suitable for most tasks and for the few
-cases where more control is needed it provides access to the full zlib feature
-set.
-
-This package provides the Haskell %{pkg_name} library for ghc.
+%{common_description}
-%package devel
-Summary: Haskell %{pkg_name} library
-Group: Development/Libraries
-Requires: ghc = %{ghc_version}
-Requires(post): ghc = %{ghc_version}
-Requires(preun): ghc = %{ghc_version}
-Requires: ghc-bytestring-devel
+%package -n ghc-%{pkg_name}-devel
+Summary: Development files for %{common_summary}
+Group: Development/Libraries/Other
+# BEGIN cabal2spec
+%{?ghc_devel_requires}
+Obsoletes: ghc-%{pkg_name}-prof < %{version}-%{release}
+Provides: ghc-%{pkg_name}-prof = %{version}-%{release}
+# END cabal2spec
+# remember to require any C devel dependency here
+# Haskell devel dependencies are autogenerated by ghc-deps.sh
Requires: zlib-devel
-Requires: licenses
-%description devel
-This package provides a pure interface for compressing and decompressing streams
-of data represented as lazy ByteStrings. It uses the zlib C library so it has
-high performance. It supports the "zlib", "gzip" and "raw" compression formats.
+%description -n ghc-%{pkg_name}-devel
+%{common_description}
-It provides a convenient high level API suitable for most tasks and for the few
-cases where more control is needed it provides access to the full zlib feature
-set.
-
-This package contains the development files for %{name}
-built for ghc-%{ghc_version}.
-
-
-%package doc
-Summary: Documentation for %{name}
-Group: Development/Libraries
-Requires: ghc-doc = %{ghc_version}
-Requires(post): ghc-doc = %{ghc_version}
-Requires(postun): ghc-doc = %{ghc_version}
-Requires: ghc-bytestring-doc
-
-%description doc
-This package provides a pure interface for compressing and decompressing streams
-of data represented as lazy ByteStrings. It uses the zlib C library so it has
-high performance. It supports the "zlib", "gzip" and "raw" compression formats.
-
-It provides a convenient high level API suitable for most tasks and for the few
-cases where more control is needed it provides access to the full zlib feature
-set.
-
-This package contains development documentation files for the %{name} library.
-
-
-%package prof
-Summary: Profiling libraries for %{name}
-Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
-Requires: ghc-prof = %{ghc_version}
-Requires: ghc-bytestring-prof
-Requires: zlib-devel
-
-%description prof
-This package provides a pure interface for compressing and decompressing streams
-of data represented as lazy ByteStrings. It uses the zlib C library so it has
-high performance. It supports the "zlib", "gzip" and "raw" compression formats.
-
-It provides a convenient high level API suitable for most tasks and for the few
-cases where more control is needed it provides access to the full zlib feature
-set.
-
-This package contains profiling libraries for %{name}.
+This package contains the development files.
%prep
@@ -100,64 +73,32 @@ This package contains profiling libraries for %{name}.
%build
-%cabal_configure --ghc %{!?without_prof:-p}
-%cabal build
-%cabal haddock
-%ghc_gen_scripts
+#%%define cabal_configure_options -f "opt1 -opt2 ..."
+%ghc_lib_build
%install
-%cabal_install
-%ghc_install_scripts
-%ghc_gen_filelists %{name}
-for FILE in LICENSE ; do
- MD5SUM=$(md5sum $FILE | sed 's/ .*//')
- if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then
- ln -sf /usr/share/doc/licenses/md5/$MD5SUM $FILE
- fi
-done
+%ghc_lib_install
-%post devel
-%ghc_register_pkg
+%post -n ghc-%{pkg_name}-devel
+%ghc_pkg_recache
-%post doc
-%ghc_reindex_haddock
+%postun -n ghc-%{pkg_name}-devel
+%ghc_pkg_recache
-%preun devel
-if [ "$1" -eq 0 ] ; then
- %ghc_unregister_pkg
-fi
-
-
-%postun doc
-if [ "$1" -eq 0 ] ; then
- %ghc_reindex_haddock
-fi
-
-
-%files devel -f %{name}-devel.files
+%if %{undefined ghc_without_shared}
+%files -n ghc-%{pkg_name} -f ghc-%{pkg_name}.files
%defattr(-,root,root,-)
-%{_docdir}/%{name}-%{version}
+%endif
-%files doc
-%defattr(-,root,root,-)
-%{pkg_docdir}
-
-
-%files prof -f %{name}-prof.files
+%files -n ghc-%{pkg_name}-devel -f ghc-%{pkg_name}-devel.files
%defattr(-,root,root,-)
%changelog
-* Sun Aug 2 2009 Herbert Graeber - 0.5.2.0
-- Require zlib-devel
-
-* Sat Aug 1 2009 Herbert Graeber - 0.5.2.0
-- Require ghc-bytestring instead of ghc-binary
-
-* Fri Jul 31 2009 Herbert Graeber - 0.5.2.0
-- Initial Package
+* Thu Dec 15 2011 Fedora Haskell SIG - 0.5.3.1-0
+- initial packaging for Fedora automatically generated by cabal2spec-0.24.1
diff --git a/rpmlintrc b/rpmlintrc
index 41da701..2cfd190 100644
--- a/rpmlintrc
+++ b/rpmlintrc
@@ -1,6 +1 @@
-addFilter("devel-dependency gmp-devel")
-addFilter("devel-file-in-non-devel-package")
addFilter("static-library-without-debuginfo")
-addFilter("useless-explicit-requires ghc")
-addFilter("useless-explicit-requires ghc-doc")
-addFilter("devel-dependency ghc-zlib-devel")
diff --git a/zlib-0.5.2.0.tar.bz2 b/zlib-0.5.2.0.tar.bz2
deleted file mode 100644
index 59a3250..0000000
--- a/zlib-0.5.2.0.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:157a3389182521f45e6166141c45b1044ac3303e9f358d272eee5b14d58c3956
-size 100474