rpms/gtk2hs/F-10 gtk2hs.spec,1.41,1.42

Jens Petersen petersen at fedoraproject.org
Fri Oct 24 05:16:00 UTC 2008


Author: petersen

Update of /cvs/extras/rpms/gtk2hs/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14575

Modified Files:
	gtk2hs.spec 
Log Message:
- install docs in ghc haddock dir with htmldocdir and use ghc_reindex_haddock
- rename gtk2hs-doc to ghc-gtk2hs-doc
- use pkg_name, pkg_libdir, and pkg_docdir for Haskell packaging guidelines
- don't override __spec_install_post




Index: gtk2hs.spec
===================================================================
RCS file: /cvs/extras/rpms/gtk2hs/F-10/gtk2hs.spec,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- gtk2hs.spec	14 Jul 2008 14:11:32 -0000	1.41
+++ gtk2hs.spec	24 Oct 2008 05:15:30 -0000	1.42
@@ -1,6 +1,6 @@
 #%%define snapdate 20061116
 
-%define pkgname gtk
+%define pkg_name gtk2hs
 %define ghc_version 6.8.3
 
 %define build_docs 1
@@ -8,10 +8,13 @@
 %define build_cairo 1
 %define build_opengl 1
 
+%define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
+%define pkg_docdir %{_docdir}/ghc/libraries/%{pkg_name}
+
 Summary:        A Haskell GUI library based on the Gtk+ GUI toolkit
 Name:           gtk2hs
 Version:        0.9.13
-Release:        2%{?dist}
+Release:        3%{?dist}
 # cairo/ and svgcairo/ are FreeBSD
 # compat/ is BSD
 # tools/c2hs (used to build) is GPL, LGPL
@@ -71,11 +74,12 @@
 
 
 %if %{build_docs}
-%package doc
+%package -n ghc-%{name}-doc
 Summary:        Haskell Gtk+ GUI library documentation
 Group:          Development/Libraries
+Obsoletes:      gtk2hs-doc < 0.9.13-3
 
-%description doc
+%description -n ghc-%{name}-doc
 A Gtk+ binding for the functional language Haskell featuring automatic
 memory management, unicode support, and wide coverage of Gtk+ 2
 widgets.
@@ -115,16 +119,13 @@
 
 # the debuginfo subpackage is currently empty anyway, so don't generate it
 %define debug_package %{nil}
-%define __spec_install_post /usr/lib/rpm/brp-compress
-
-%define ghclibdir %{_libdir}/ghc/%{ghc_version}
-%define gtk2hsdir %{ghclibdir}/%{name}
 
 
 %prep
 %setup -q %{?snapdate:-n %{name}-%{version}}
-%patch0 -p1 -b .fasm
-
+%ifarch ppc
+%patch0 -p1 -b .0-fasm-ppc~
+%endif
 
 %build
 %if %{build_docs}
@@ -132,8 +133,6 @@
 %endif
 %configure \
         --with-hc=ghc-%{ghc_version} \
-        --prefix=%{_prefix} \
-        --libdir=%{ghclibdir} \
         --enable-packager-mode \
 %if %{build_docs}
         --enable-docs \
@@ -152,12 +151,12 @@
 %endif
 
 # C locale to workaround c2hs failing in CJK locale
-LANG=C make all
+LANG=C make all pkglibdir=%{pkg_libdir} htmldocdir=%{pkg_docdir}
 
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
+make install DESTDIR=%{buildroot} pkglibdir=%{pkg_libdir} htmldocdir=%{pkg_docdir}
 
 # make ghost files
 for i in gconf glade glib gtk sourceview soegtk \
@@ -168,18 +167,15 @@
         mozembed \
 %endif
         ; do
-  touch %{buildroot}%{gtk2hsdir}/HS${i}.o
+  touch %{buildroot}%{pkg_libdir}/HS${i}.o
 done
 
-# remove installed docdir files
-rm -rf %{buildroot}%{_defaultdocdir}/%{name}
-
 
 %clean
 rm -rf %{buildroot}
 
 
-%define ghcpkg_inst() ghc-pkg-%{ghc_version} update --auto-ghci-libs  %{gtk2hsdir}/%{1}.package.conf &>/dev/null
+%define ghcpkg_inst() ghc-pkg-%{ghc_version} update --auto-ghci-libs  %{pkg_libdir}/%{1}.package.conf &>/dev/null
 
 %define ghcpkg_uninst() ghc-pkg-%{ghc_version} unregister %{1} &>/dev/null || :
 
@@ -215,6 +211,14 @@
 done
 fi
 
+%if %{build_docs}
+%post -n ghc-%{name}-doc
+%ghc_reindex_haddock
+
+%postun -n ghc-%{name}-doc
+%ghc_reindex_haddock
+%endif
+
 %if %{build_mozembed}
 %post -n ghc-%{name}-mozembed
 %{ghcpkg_inst mozembed}
@@ -239,73 +243,77 @@
 %files -n ghc-%{name}
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING
-%dir %{_libdir}/ghc
-%dir %{ghclibdir}
-%dir %{gtk2hsdir}
-%{gtk2hsdir}/gtk.package.conf
-%{gtk2hsdir}/libHSgtk.a
-%ghost %{gtk2hsdir}/HSgtk.o
-%dir %{gtk2hsdir}/imports
-%{gtk2hsdir}/imports/gtk
+%dir %{pkg_libdir}
+%{pkg_libdir}/gtk.package.conf
+%{pkg_libdir}/libHSgtk.a
+%ghost %{pkg_libdir}/HSgtk.o
+%dir %{pkg_libdir}/imports
+%{pkg_libdir}/imports/gtk
 %if %{build_cairo}
-%{gtk2hsdir}/cairo.package.conf
-%{gtk2hsdir}/libHScairo.a
-%ghost %{gtk2hsdir}/HScairo.o
-%{gtk2hsdir}/imports/cairo
-%endif
-%{gtk2hsdir}/gconf.package.conf
-%{gtk2hsdir}/libHSgconf.a
-%ghost %{gtk2hsdir}/HSgconf.o
-%{gtk2hsdir}/imports/gconf
-%{gtk2hsdir}/glade.package.conf
-%{gtk2hsdir}/libHSglade.a
-%ghost %{gtk2hsdir}/HSglade.o
-%{gtk2hsdir}/imports/glade
-%{gtk2hsdir}/glib.package.conf
-%{gtk2hsdir}/libHSglib.a
-%ghost %{gtk2hsdir}/HSglib.o
-%{gtk2hsdir}/imports/glib
-%dir %{gtk2hsdir}/include
-%{gtk2hsdir}/include/gtk2hs-config.h
-%{gtk2hsdir}/soegtk.package.conf
-%{gtk2hsdir}/libHSsoegtk.a
-%ghost %{gtk2hsdir}/HSsoegtk.o
-%{gtk2hsdir}/imports/soegtk
-%{gtk2hsdir}/sourceview.package.conf
-%{gtk2hsdir}/libHSsourceview.a
-%ghost %{gtk2hsdir}/HSsourceview.o
-%{gtk2hsdir}/imports/sourceview
+%{pkg_libdir}/cairo.package.conf
+%{pkg_libdir}/libHScairo.a
+%ghost %{pkg_libdir}/HScairo.o
+%{pkg_libdir}/imports/cairo
+%endif
+%{pkg_libdir}/gconf.package.conf
+%{pkg_libdir}/libHSgconf.a
+%ghost %{pkg_libdir}/HSgconf.o
+%{pkg_libdir}/imports/gconf
+%{pkg_libdir}/glade.package.conf
+%{pkg_libdir}/libHSglade.a
+%ghost %{pkg_libdir}/HSglade.o
+%{pkg_libdir}/imports/glade
+%{pkg_libdir}/glib.package.conf
+%{pkg_libdir}/libHSglib.a
+%ghost %{pkg_libdir}/HSglib.o
+%{pkg_libdir}/imports/glib
+%dir %{pkg_libdir}/include
+%{pkg_libdir}/include/gtk2hs-config.h
+%{pkg_libdir}/soegtk.package.conf
+%{pkg_libdir}/libHSsoegtk.a
+%ghost %{pkg_libdir}/HSsoegtk.o
+%{pkg_libdir}/imports/soegtk
+%{pkg_libdir}/sourceview.package.conf
+%{pkg_libdir}/libHSsourceview.a
+%ghost %{pkg_libdir}/HSsourceview.o
+%{pkg_libdir}/imports/sourceview
 
 
 %if %{build_docs}
-%files doc
+%files -n ghc-%{name}-doc
 %defattr(-,root,root,-)
-%doc docs/reference
 %doc ChangeLog TODO demo
+%{pkg_docdir}
 %endif
 
 
 %if %{build_mozembed}
 %files -n ghc-%{name}-mozembed
 %defattr(-,root,root,-)
-%{gtk2hsdir}/mozembed.package.conf
-%{gtk2hsdir}/libHSmozembed.a
-%ghost %{gtk2hsdir}/HSmozembed.o
-%{gtk2hsdir}/imports/mozembed
+%{pkg_libdir}/mozembed.package.conf
+%{pkg_libdir}/libHSmozembed.a
+%ghost %{pkg_libdir}/HSmozembed.o
+%{pkg_libdir}/imports/mozembed
 %endif
 
 
 %if %{build_opengl}
 %files -n ghc-%{name}-gtkglext
 %defattr(-,root,root,-)
-%{gtk2hsdir}/gtkglext.package.conf
-%{gtk2hsdir}/libHSgtkglext.a
-%ghost %{gtk2hsdir}/HSgtkglext.o
-%{gtk2hsdir}/imports/gtkglext
+%{pkg_libdir}/gtkglext.package.conf
+%{pkg_libdir}/libHSgtkglext.a
+%ghost %{pkg_libdir}/HSgtkglext.o
+%{pkg_libdir}/imports/gtkglext
 %endif
 
 
 %changelog
+* Fri Oct 24 2008 Jens Petersen <petersen at redhat.com> - 0.9.13-3
+- install docs in ghc haddock dir with htmldocdir and use ghc_reindex_haddock
+- rename gtk2hs-doc to ghc-gtk2hs-doc
+- use pkg_name, pkg_libdir, and pkg_docdir for Haskell packaging guidelines
+- don't override __spec_install_post
+
 * Mon Jul 14 2008 Bryan O'Sullivan <bos at serpentine.com> - 0.9.13-2
 - Try to fix ppc build due to ghc 6.8.3 -fvia-C bug
 




More information about the fedora-extras-commits mailing list