Update of /cvsroot/fink/fink-prebinding
In directory sc8-pr-cvs1:/tmp/cvs-serv21056

Modified Files:
        Makefile fink-prebinding.info.in queue-prebinding.pl.in 
Log Message:
updates for forking


Index: Makefile
===================================================================
RCS file: /cvsroot/fink/fink-prebinding/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile    8 Sep 2003 00:12:09 -0000       1.3
+++ Makefile    13 Oct 2003 19:43:49 -0000      1.4
@@ -1,8 +1,9 @@
-DESTDIR=
-PREFIX=/usr/local
-MANDIR=$(PREFIX)/man
-INSTTREE=$(PREFIX)/var/lib/fink/prebound
-VERSION=0.2
+DESTDIR  =
+PREFIX   = /usr/local
+MANDIR   = $(PREFIX)/man
+INSTTREE = $(PREFIX)/var/lib/fink/prebound
+VERSION  = 0.3
+MD5      = 
 
 SCRIPTS= \
        queue-prebinding.pl \
@@ -18,7 +19,7 @@
        pod2man --section=1 --release=$(VERSION) $< > $@
 
 clean:
-       rm -rf $(SCRIPTS) $(MANPAGES) fink-prebinding.info
+       rm -rf $(SCRIPTS) $(MANPAGES) fink-prebinding.info *.tar.bz2 
fink-prebinding-$(VERSION)
 
 install: $(SCRIPTS)
        install -d -m 755 $(DESTDIR)$(INSTTREE)
@@ -27,7 +28,13 @@
        install -c -m 644 $(MANPAGES) $(DESTDIR)$(MANDIR)/man1
 
 %.info: %.info.in Makefile
-       sed -e "s,@VERSION@,$(VERSION),g" $< > $@
+       sed -e "s,@VERSION@,$(VERSION),g" -e "s,@MD5@,$(MD5),g" $< > $@
 
 %.pl: %.pl.in Makefile
        sed -e "s,@PREFIX@,$(PREFIX),g" -e "s,@VERSION@,$(VERSION),g" $< > $@
+
+release: clean
+       @install -d -m 755 fink-prebinding-$(VERSION)
+       @install -m 644 `find . -type f | grep -v CVS` fink-prebinding-$(VERSION)/
+       @tar -cjf fink-prebinding-$(VERSION).tar.bz2 fink-prebinding-$(VERSION)
+       sed -e "s,@VERSION@,$(VERSION),g" -e "s,@MD5@,"`md5 
fink-prebinding-$(VERSION).tar.bz2 | sed -e 's,.*= ,,'`",g" fink-prebinding.info.in > 
fink-prebinding.info

Index: fink-prebinding.info.in
===================================================================
RCS file: /cvsroot/fink/fink-prebinding/fink-prebinding.info.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fink-prebinding.info.in     25 May 2003 18:42:16 -0000      1.2
+++ fink-prebinding.info.in     13 Oct 2003 19:43:49 -0000      1.3
@@ -8,8 +8,7 @@
   nam-CA: http://www.southofheaven.net/befunk
 <<
 Source: mirror:custom:%n-%v.tar.bz2
-Source-MD5:
-SourceDirectory: %n
+Source-MD5: @MD5@
 Depends: base-files, cctools-extra (>= 20030516-2)
 CompileScript: make PREFIX='%p' MANDIR='%p/share/man'
 InstallScript: make PREFIX='%p' MANDIR='%p/share/man' DESTDIR='%d' install

Index: queue-prebinding.pl.in
===================================================================
RCS file: /cvsroot/fink/fink-prebinding/queue-prebinding.pl.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- queue-prebinding.pl.in      27 May 2003 15:33:48 -0000      1.5
+++ queue-prebinding.pl.in      13 Oct 2003 19:43:49 -0000      1.6
@@ -1,5 +1,8 @@
 #!/usr/bin/perl
 
+use POSIX qw(setsid);
+$SIG{'PIPE'} = 'IGNORE';
+
 =head1 NAME
 
 queue-prebinding.pl - delays prebinding until all potentially prebound
@@ -90,7 +93,7 @@
 }
 
 # get the list of myselves running  ;)
-open(PS, "ps -auxw |") or die "couldn't run ps: $!\n";
+open(PS, "ps auxw |") or die "couldn't run ps: $!\n";
 while (<PS>) {
        if (/$0/ and !/ vim? / and !/ $$ /) {
                $ps++;
@@ -104,7 +107,14 @@
 # fink/dpkg/etc. to stop running or time out, and
 # run the prebinding updates
 
+open(STDIN, "/dev/null") or die "can't read /dev/null: $!\n";
+open(STDOUT, ">>/dev/null") or die "can't write to /dev/null: $!\n";
+open(STDERR, ">>/dev/null") or die "can't write to /dev/null: $!\n";
+
 fork and exit;
+
+setsid() or die "couldn't get a session id: $!\n";
+
 my $start = time;
 my @list;
 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to