rpms/ghc-gtk2hs/devel ghc-gtk2hs.spec,1.28,1.29
Jens Petersen
petersen at fedoraproject.org
Thu Jan 14 15:03:18 UTC 2010
Author: petersen
Update of /cvs/pkgs/rpms/ghc-gtk2hs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13219
Modified Files:
ghc-gtk2hs.spec
Log Message:
- update to darcs snapshot for ghc-6.12.1 build
- add shared bcond (disabled until work out how to build shared)
- build vte
- override ghcpkgdir to hardcode pkg path
- drop buildroot
- BR mtl
- drop old compat package
- use ghc_binlib_package from ghc-rpm-macros-0.5.5
- replace subpackage macro with custom pkg_filelists macro
- force package.conf files into package.conf.d
Index: ghc-gtk2hs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghc-gtk2hs/devel/ghc-gtk2hs.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- ghc-gtk2hs.spec 25 Jul 2009 00:04:25 -0000 1.28
+++ ghc-gtk2hs.spec 14 Jan 2010 15:03:17 -0000 1.29
@@ -2,12 +2,14 @@
%bcond_without docs
%bcond_without prof
+%bcond_with shared
%bcond_without cairo
%bcond_without svgcairo
%bcond_without gio
%bcond_without opengl
%bcond_without gstreamer
+%bcond_without vte
# currently segfaulting
%bcond_with mozembed
@@ -15,6 +17,8 @@
# external haddock
%bcond_with haddock
+%global ghcpkgdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
+
# ghc does not emit debug information
%global debug_package %{nil}
@@ -24,8 +28,8 @@ management, unicode support, and wide co
Summary: Haskell binding for gtk2 and related libraries
Name: ghc-%{pkg_name}
-Version: 0.10.1
-Release: 5%{?dist}
+Version: 0.10.1.20100110
+Release: 1%{?dist}
# cairo/ and svgcairo/ are FreeBSD
# compat/ is BSD
# tools/c2hs (used to build) is GPLv2+, LGPLv2+
@@ -36,14 +40,15 @@ License: LGPLv2+ and LGPLv3
Group: Development/Libraries
# snapshot tarball obtained by
# darcs get --partial http://code.haskell.org/gtk2hs/
-# cd gtk2hs ; darcs dist darcs dist --dist-name=gtk2hs-%{version}.%{snapdate}
-Source: http://prdownloads.sourceforge.net/%{pkg_name}/%{pkg_name}-%{version}.tar.bz2
+# cd gtk2hs ; darcs dist darcs dist --d gtk2hs-%{version}.%{snapdate}
+Source: http://prdownloads.sourceforge.net/%{pkg_name}/%{pkg_name}-%{version}.tar.gz
URL: http://gtk2hs.sourceforge.net/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1: gtk2hs-0.10.1.20100110-Graphics.UI.Gtk.Display.StatusIcon-haddock-rec.patch
# fedora ghc archs:
ExclusiveArch: %{ix86} x86_64 ppc alpha
-BuildRequires: ghc, ghc-rpm-macros
+BuildRequires: ghc, ghc-rpm-macros >= 0.5.5
BuildRequires: happy, alex
+BuildRequires: ghc-mtl-devel, ghc-mtl-doc, ghc-mtl-prof
%if %{with docs}
%if %{with haddock}
BuildRequires: haddock >= 2.4.1
@@ -72,6 +77,9 @@ BuildRequires: librsvg2-devel
%if %{with opengl}
BuildRequires: gtkglext-devel
%endif
+%if %{with vte}
+BuildRequires: vte-devel
+%endif
%description
%commom_descr
@@ -80,27 +88,6 @@ This package also includes the bindings
sourceview. The libraries are compiled for ghc-%{ghc_version}.
-# added for F11, can be dropped for F13
-%package compat
-Summary: Haskell Gtk+ GUI library backward compatibility
-Group: Development/Libraries
-# ditto
-Provides: %{name} = %{version}-%{release}
-Obsoletes: %{name} < 0.10.0
-# ghc682 is from f8
-Obsoletes: ghc661-%{pkg_name}, ghc682-%{pkg_name}
-Obsoletes: ghc661-%{pkg_name}-mozembed, ghc682-%{pkg_name}-mozembed
-# these 3 pull in the others
-Requires: ghc-gconf-devel = %{version}-%{release}
-Requires: ghc-glade-devel = %{version}-%{release}
-Requires: ghc-soegtk-devel = %{version}-%{release}
-
-%description compat
-%common_descr
-
-This package obsoletes the former ghc-gtk2hs package and can safely be removed.
-
-
%package common
Summary: Haskell Gtk+ GUI library common files
Group: Development/Libraries
@@ -125,84 +112,53 @@ This package contains the gtk2hs documen
# subpackage name lib [dep] [obsoletes]
-%define subpackage()\
-%package -n ghc-%1-devel\
-Summary: Haskell binding for %1\
-Group: Development/Libraries\
-Requires: ghc = %{ghc_version}\
-Requires: %{name}-common = %{version}-%{release}\
-Requires: %2-devel, %{?3:ghc-%3-devel = %{version}-%{release}}\
-Requires(post): ghc = %{ghc_version}\
-Requires(preun): ghc = %{ghc_version}\
-Provides: ghc-%1 = %{version}-%{release}\
-# added for F11\
-Obsoletes: ghc-%1 < 0.10.0-3\
-%{?4:Obsoletes: %4 < 0.10.0}\
-\
-%description -n ghc-%1-devel\
-%common_descr\
-\
-This package contains a Haskell binding of the %1 library.\
-\
-%if %{with prof}\
-%package -n ghc-%1-prof\
-Summary: Haskell %1 profiling library\
-Group: Development/Libraries\
-Requires: ghc-prof = %{ghc_version}\
-Requires: ghc-%1-devel = %{version}-%{release}\
-\
-%description -n ghc-%1-prof\
-%common_descr\
-\
-This package contains the profiling libraries for the Haskell %1 library.\
-%endif\
-\
-%post -n ghc-%1-devel\
-ghc-pkg-%{ghc_version} update %{ghcpkgdir}/%1.package.conf &>/dev/null || : \
-\
-%preun -n ghc-%1-devel\
-if [ "$1" = 0 ]; then\
- ghc-pkg-%{ghc_version} unregister %1-%{version} &>/dev/null || : \
-fi\
-\
-%files -n ghc-%1-devel\
+%define pkg_filelists()\
+cat > ../ghc-%1-devel.files << EOF\
%defattr(-,root,root,-)\
%{ghcpkgdir}/%1.cabal\
-%{ghcpkgdir}/%1.package.conf\
+%{ghcpkgbasedir}/package.conf.d/%1-%{version}.conf\
%{ghcpkgdir}/libHS%1.a\
%{ghcpkgdir}/HS%1.o\
%{ghcpkgdir}/imports/%1\
-\
+EOF\
%if %{with prof}\
-%files -n ghc-%1-prof\
+cat > ../ghc-%1-prof.files << EOF\
%defattr(-,root,root,-)\
%{ghcpkgdir}/libHS%{1}_p.a\
-%endif
+EOF\
+%endif\
+echo -n > ../ghc-%1-doc.files\
+%{nil}
-%subpackage cairo cairo glib
-%subpackage gconf GConf2 glib
+%ghc_binlib_package -n cairo -c cairo-devel -h ghc-glib-devel,ghc-mtl-devel
+%ghc_binlib_package -n gconf -d GConf2-devel -h ghc-glib-devel
%if %{with gio}
-%subpackage gio glib2 glib
+%ghc_binlib_package -n gio -c glib2-devel -h ghc-glib-devel
%endif
-%subpackage glade libglade2 gtk
-%subpackage glib glib2
+%ghc_binlib_package -n glade -c libglade2-devel -h ghc-gtk-devel
+%ghc_binlib_package -n glib -c glib2-devel
%if %{with gstreamer}
-%subpackage gstreamer gstreamer glib
+%ghc_binlib_package -n gstreamer -c gstreamer-devel -h ghc-glib-devel,ghc-mtl-devel
%endif
-%subpackage gtk gtk2 cairo
+%ghc_binlib_package -n gtk gtk2 -c glib-devel -h ghc-cairo-devel
%if %{with opengl}
-%subpackage gtkglext gtkglext gtk ghc-gtk2hs-gtkglext
+%ghc_binlib_package -n gtkglext -c gtkglext-devel -h ghc-gtk-devel
%endif
-%subpackage gtksourceview2 gtksourceview2 gtk
+%ghc_binlib_package -n gtksourceview2 -c gtksourceview2-devel -h ghc-gtk-devel
%if %{with mozembed}
-%subpackage mozembed xulrunner gtk
+%ghc_binlib_package -n mozembed -c xulrunner-devel -h ghc-gtk-devel
+%endif
+%ghc_binlib_package -n soegtk -c gtk2-devel -h ghc-gtk-devel,ghc-cairo-devel
+%ghc_binlib_package -n svgcairo -c librsvg2-devel -h ghc-cairo-devel
+%if %{with vte}
+%ghc_binlib_package -n vte -c vte-devel -h ghc-gtk-devel
%endif
-%subpackage soegtk gtk2 gtk
-%subpackage svgcairo librsvg2 cairo
+
%prep
%setup -q -n %{pkg_name}-%{version}
-%{?snapdate:autoreconf}
+%patch1 -p1 -b .orig
+[ -x configure ] || autoreconf
%build
@@ -238,6 +194,9 @@ export HADDOCK=%{_bindir}/haddock-2.4.2
--enable-svg \
%endif
%endif
+%if %{with vte}
+ --enable-vte \
+%endif
%{nil}
# C locale to workaround c2hs failing in CJK locale
@@ -245,9 +204,20 @@ LANG=C make all pkglibdir=%{ghcpkgdir} h
%install
-rm -rf %{buildroot}
make install DESTDIR=%{buildroot} pkglibdir=%{ghcpkgdir} htmldocdir=%{ghcdocdir}
+mkdir %{buildroot}%{ghcpkgbasedir}/package.conf.d
+for i in %{buildroot}%{ghcpkgdir}/*.package.conf; do
+ new=$(basename $i | sed -e "s/.package.conf$/-%{version}.conf/")
+ mv $i %{buildroot}%{ghcpkgbasedir}/package.conf.d/$new
+done
+
+for pkg in cairo gconf %{?with_gio:gio} glade glib gstreamer gtk gtkglext gtksourceview2 %{?with_mozembed:mozembed} soegtk svgcairo %{?with_vte:vte}; do
+cd $pkg
+%pkg_filelists ${pkg}
+cd ..
+done
+
%clean
rm -rf %{buildroot}
@@ -262,10 +232,6 @@ rm -rf %{buildroot}
%endif
-%files compat
-%defattr(-,root,root,-)
-
-
%files common
%defattr(-,root,root,-)
%doc AUTHORS COPYING*
@@ -284,6 +250,18 @@ rm -rf %{buildroot}
%changelog
+* Fri Jan 15 2010 Jens Petersen <petersen at redhat.com> - 0.10.1.20100110-1
+- update to darcs snapshot for ghc-6.12.1 build
+- add shared bcond (disabled until work out how to build shared)
+- build vte
+- override ghcpkgdir to hardcode pkg path
+- drop buildroot
+- BR mtl
+- drop old compat package
+- use ghc_binlib_package from ghc-rpm-macros-0.5.5
+- replace subpackage macro with custom pkg_filelists macro
+- force package.conf files into package.conf.d
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the scm-commits
mailing list