[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Fedora-haskell-list] Packaging guidelines and macros update



----- "Jens Petersen" <petersen redhat com> wrote:
> https://fedoraproject.org/wiki/PackagingDrafts/Haskell
> and I am finally reasonably happy with them.

Actually there is one more thing I would like to change if there are no objections.

I would like to rename %ghc_postinst_script to %ghc_register_pkg and %ghc_preun_script to %ghc_unregister_pkg.  I attach a little patch which shows the changes needed to macros.ghc and the templates.

I will try to test the scenarios Tom brought up, before we submit a revision of the guidelines to the Packaging Committee for review.

Jens
Index: cabal-binlib-template.spec.in
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/cabal-binlib-template.spec.in,v
retrieving revision 1.1
diff -u -r1.1 cabal-binlib-template.spec.in
--- cabal-binlib-template.spec.in	25 Nov 2008 09:15:16 -0000	1.1
+++ cabal-binlib-template.spec.in	28 Nov 2008 02:56:35 -0000
@@ -85,14 +85,16 @@
 
 
 %post 
-%ghc_postinst_script
+%ghc_register_pkg
 %if %{build_doc}
 %ghc_reindex_haddock
 %endif
 
 
 %preun 
-%ghc_preun_script
+if [ "$1" -eq 0 ] ; then
+  %ghc_unregister_pkg
+fi
 
 
 %postun
Index: cabal-lib-template.spec.in
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/cabal-lib-template.spec.in,v
retrieving revision 1.1
diff -u -r1.1 cabal-lib-template.spec.in
--- cabal-lib-template.spec.in	25 Nov 2008 09:15:16 -0000	1.1
+++ cabal-lib-template.spec.in	28 Nov 2008 02:56:35 -0000
@@ -77,14 +77,16 @@
 
 
 %post 
-%ghc_postinst_script
+%ghc_register_pkg
 %if %{build_doc}
 %ghc_reindex_haddock
 %endif
 
 
 %preun 
-%ghc_preun_script
+if [ "$1" -eq 0 ] ; then
+  %ghc_unregister_pkg
+fi
 
 
 %postun
Index: ghc-rpm-macros.ghc
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/ghc-rpm-macros.ghc,v
retrieving revision 1.9
diff -u -r1.9 ghc-rpm-macros.ghc
--- ghc-rpm-macros.ghc	25 Nov 2008 02:52:10 -0000	1.9
+++ ghc-rpm-macros.ghc	28 Nov 2008 02:56:35 -0000
@@ -39,20 +39,14 @@
 install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{pkg_libdir} \
 %{nil}
 
-%ghc_preinst_script \
-%{nil}
-
-%ghc_postinst_script \
+%ghc_register_pkg \
 %{pkg_libdir}/register.sh >&/dev/null \
 %{nil}
 
-%ghc_preun_script \
+%ghc_unregister_pkg \
 [ "$1" = 0 ] && %{pkg_libdir}/unregister.sh >&/dev/null \
 %{nil}
 
-%ghc_postun_script \
-%{nil}
-
 %ghc_reindex_haddock \
 ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : \
 %{nil}

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]