--- rpm-5.4.9/configure.ac.haskell~ 2012-05-15 02:51:07.328499989 +0200 +++ rpm-5.4.9/configure.ac 2012-05-15 02:51:07.393500340 +0200 @@ -2513,7 +2513,7 @@ AC_CONFIG_FILES([ po/Makefile.in scripts/Makefile rpmdb/DB_CONFIG macros/macros macros/macros.rpmbuild - macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool + macros/cmake macros/gstreamer macros/haskell macros/java macros/kernel macros/libtool macros/mandriva macros/suse macros/fedora macros/mono macros/perl macros/pkgconfig macros/php macros/python macros/ruby macros/selinux macros/tcl doc/Makefile --- rpm-5.4.9/macros/haskell.in.haskell~ 2012-05-15 02:51:07.395500350 +0200 +++ rpm-5.4.9/macros/haskell.in 2012-05-15 02:51:07.395500350 +0200 @@ -0,0 +1,69 @@ +# Ruby specific macro definitions. +# To make use of these macros insert the following line into your spec file: +# %{load:%{_usrlibrpm}/macros.d/haskell} + +# Path to scripts to autogenerate haskell package dependencies, +# +# Note: Used iff _use_internal_dependency_generator is non-zero. The +# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. +%__haskell_provides %{_rpmhome}/haskelldeps.sh --provides +%__haskell_requires %{_rpmhome}/haskelldeps.sh --requires + +# How is named the Setup.?hs +%_cabal_setup %{?cabal_setup}%{?!cabal_setup:Setup.hs} + +# which compiler (default ghc) +%_haskell_compiler %{?haskell_compiler}%{?!haskell_compiler:runhaskell} + +# The compilation step +%_cabal_compil \ + %{_haskell_compiler} %{_cabal_setup} configure --prefix=%{_prefix} \ + %{_haskell_compiler} %{_cabal_setup} build \ + %{?!_no_haddock:%{_haskell_compiler} %{_cabal_setup} haddock} + +# Script need to register module on the system +%_cabal_genscripts \ + %{_haskell_compiler} %{_cabal_setup} register --gen-script || : \ + sed -i 's:/usr/bin/ghc-pkg:ghc-pkg --force:' register.sh \ + %{_haskell_compiler} %{_cabal_setup} unregister --gen-script || : \ + sed -i 's:/usr/bin/ghc-pkg:ghc-pkg --force:' unregister.sh + +# post/pre scriptlet +%_cabal_in %posttrans -f register.sh + +%_cabal_un %preun -f unregister.sh + +# Using script to register module during install +%_cabal_scriptlets \ +%_cabal_in \ +\ +%_cabal_un \ + +# The "full" %build step +%_cabal_build \ + %_cabal_compil \ + %_cabal_genscripts + +# The "full" %install step +%_cabal_install \ + %{_haskell_compiler} %{_cabal_setup} copy --destdir=%{buildroot} \ + +# The "full" %check step +%_cabal_check \ + %{_haskell_compiler} %{_cabal_setup} test + +%_cabal_rpm_deps_dir %_datadir/haskell-deps + +%_cabal_pkg_deps_dir %_cabal_rpm_deps_dir/%name-%version-%release + +%_cabal_rpm_gen_deps \ +mkdir -p %{buildroot}%{_cabal_pkg_deps_dir} \ +touch %{buildroot}%{_cabal_pkg_deps_dir}/{provides,requires} \ +find . -name "*.cabal" | xargs cabalrpmprov > %{buildroot}%{_cabal_pkg_deps_dir}/provides \ +cabalrpmreq > %{buildroot}%{_cabal_pkg_deps_dir}/requires \ + +%_cabal_rpm_files \ +%_cabal_pkg_deps_dir + +%_cabal_haddoc_files \ +%{?!_no_haddock:%doc dist/doc/html} --- rpm-5.4.9/Makefile.am.haskell~ 2012-03-17 01:24:19.000000000 +0100 +++ rpm-5.4.9/Makefile.am 2012-05-15 02:51:09.049509318 +0200 @@ -116,9 +116,9 @@ pkgbin_SCRIPTS = install-sh mkinstalldir pkgcfgdir = $(pkgdatadir)/macros.d pkgcfg_DATA = \ - macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool \ - macros/mandriva macros/mono macros/perl macros/pkgconfig macros/php \ - macros/python macros/ruby macros/selinux macros/tcl + macros/cmake macros/haskell macros/gstreamer macros/java macros/kernel \ + macros/libtool macros/mandriva macros/mono macros/perl macros/pkgconfig \ + macros/php macros/python macros/ruby macros/selinux macros/tcl noinst_HEADERS = build.h debug.h system.h --- rpm-5.4.9/scripts/haskelldeps.sh.haskell~ 2012-05-15 02:51:09.050509324 +0200 +++ rpm-5.4.9/scripts/haskelldeps.sh 2012-05-15 02:51:09.050509324 +0200 @@ -0,0 +1,40 @@ +#!/bin/sh + +# Haskell dependency extractor. +# +# Author(s): Olivier Thauvin +# Per Øyvind Karlsen +# + +provides=0 +requires=0 + +while [ "$#" -ne 0 ]; do + case $1 in + -P|--provides) + provides=1 + ;; + -R|--requires) + requires=1 + ;; + esac + shift +done + +finddeps () { + while read file; do + case "$file" in + */usr/share/haskell-deps/*/$1) + cat "$file" | grep -v '^\s*$' + ;; + esac + done +} + +if [ $provides -eq 1 ]; then + finddeps provides +fi + +if [ $requires -eq 1 ]; then + finddeps requires +fi --- rpm-5.4.9/scripts/Makefile.am.haskell~ 2012-05-04 10:38:44.000000000 +0200 +++ rpm-5.4.9/scripts/Makefile.am 2012-05-15 02:51:09.050509324 +0200 @@ -19,7 +19,7 @@ EXTRA_DIST = api-sanity-autotest.pl api- cpanflute cpanflute2 Specfile.pm \ find-provides.perl find-requires.perl \ find-provides.php find-requires.php \ - freshen.sh gendiff getpo.sh http.req \ + freshen.sh gendiff getpo.sh haskelldeps.sh http.req \ check-java-closure.sh java.prov.sh java.req.sh \ gstreamer.sh javadeps.sh libtooldeps.sh mgo \ mono-find-provides mono-find-requires \ @@ -56,7 +56,7 @@ pkgdata_SCRIPTS = \ check-files cross-build dbconvert.sh executabledeps.sh \ find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \ find-provides.perl \ - find-requires.perl gem_helper.rb getpo.sh http.req \ + find-requires.perl gem_helper.rb getpo.sh haskelldeps.sh http.req \ kmod-deps.sh gstreamer.sh javadeps.sh libtooldeps.sh \ mono-find-provides mono-find-requires \ check-multiarch-files mkmultiarch \