Update of /cvsroot/fink/base-files
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv17559

Modified Files:
      Tag: dpkg-wrappers
        ChangeLog install.sh 
Added Files:
      Tag: dpkg-wrappers
        .cvsignore postinst.in postrm.in preinst.in prerm.in 
Log Message:
Support for dpkg pre/post inst/rm global wrapper scripts


--- NEW FILE: .cvsignore ---
preinst
postinst
prerm
postrm

--- NEW FILE: postinst.in ---
#!/bin/sh -e

. @PREFIX@/bin/init.sh

"$@"

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/base-files/ChangeLog,v
retrieving revision 1.43
retrieving revision 1.43.2.1
diff -u -d -r1.43 -r1.43.2.1
--- ChangeLog   9 Nov 2005 20:14:49 -0000       1.43
+++ ChangeLog   26 Jul 2006 06:44:03 -0000      1.43.2.1
@@ -1,3 +1,11 @@
+2006-07-26  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * preinst.in, postinst.in, prerm.in, postrm.in: Load init.sh
+       before running the actual .deb script.
+       * install.sh: Create {pre,post}{inst,rm} from their .in templates,
+       install into dpkg-wrappers directory.
+       * .cvsignore: Ignore the scripts created from the .in templates.
+
 2005-11-09  Matthew Sachs  <[EMAIL PROTECTED]>
 
        * init.sh.in, init.csh.in: Only set DYLD_FALLBACK_LIBRARY_PATH

--- NEW FILE: postrm.in ---
#!/bin/sh -e

. @PREFIX@/bin/init.sh

"$@"

Index: install.sh
===================================================================
RCS file: /cvsroot/fink/base-files/install.sh,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- install.sh  1 Jan 2004 18:25:56 -0000       1.6
+++ install.sh  26 Jul 2006 06:44:03 -0000      1.6.2.1
@@ -39,7 +39,7 @@
 
 for dir in etc etc/profile.d bin sbin lib include \
           share share/info share/man share/doc \
-          share/base-files \
+          share/base-files lib/fink/dpkg-wrappers \
           lib/perl5 lib/perl5/darwin lib/perl5/auto lib/perl5/darwin/auto \
           var var/run var/spool var/log src \
           share/doc/base-files ; do
@@ -47,6 +47,10 @@
   chmod 755 $basepath/$dir
 done
 
+echo "Creating dpkg script wrapper scripts..."
+for wrapper in preinst postinst prerm postrm ; do
+    sed -e "s|@PREFIX@|$basepath|g" <$wrapper.in >$wrapper
+done
 
 echo "Copying files..."
 
@@ -62,6 +66,10 @@
 install -c -p -m 644 dir-base $basepath/share/base-files/
 install -c -p -m 644 COPYING $basepath/share/doc/base-files/
 
+for wrapper in preinst postinst prerm postrm ; do
+  install -c -p -m 755 $wrapper $basepath/lib/fink/dpkg-wrappers/
+done
+
 
 echo "Done."
 exit 0

--- NEW FILE: prerm.in ---
#!/bin/sh -e

. @PREFIX@/bin/init.sh

"$@"

--- NEW FILE: preinst.in ---
#!/bin/sh -e

. @PREFIX@/bin/init.sh

"$@"


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to