* Add internal make file extension for fast upload to savannah
authorDr. Werner Fink <werner@suse.de>
Wed, 14 Apr 2010 12:04:35 +0000 (12:04 +0000)
committerDr. Werner Fink <werner@suse.de>
Wed, 14 Apr 2010 12:04:35 +0000 (12:04 +0000)
git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@68 456724a4-4300-0410-8514-c89748c515a2

Makefile

index db0e2f2d1e8ff78950d0b8903e61ce3c0e3b7be5..ad06f03fb47eabb77cfa8e4f98d031a6a273112d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,37 @@
 all install clean distclean:
        $(MAKE) -C src $@
+
+PACKAGE=sysvinit
+VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog)
+SVLOGIN=$(shell svn info | sed -rn '/Repository Root:/{ s|.*//(.*)\@.*|\1|p }')
+ifeq (,$(findstring dsf,$(VERSION)))
+       override VERSION := $(VERSION)dsf
+endif
+override TMP:=$(shell mktemp -d $(VERSION).XXXXXXXX)
+override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.bz2
+override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch
+
+upload: $(SFTPBATCH)
+       @sftp -b $< $(SVLOGIN)@dl.sv.nongnu.org:/releases/$(PACKAGE)
+       rm -rf $(TMP)
+
+$(SFTPBATCH): $(TARBALL).sig
+       @echo progress > $@
+       @echo put $(TARBALL) >> $@
+       @echo chmod 644 $(TARBALL) >> $@
+       @echo put $(TARBALL).sig >> $@
+       @echo chmod 644 $(TARBALL).sig >> $@
+       @echo rm  $(PACKAGE)-latest.tar.bz2 >> $@
+       @echo symlink $(TARBALL) $(PACKAGE)-latest.tar.bz2 >> $@
+       @echo quit >> $@
+
+$(TARBALL).sig: $(TARBALL)
+       @gpg -q -ba --use-agent -o $@ $<
+
+$(TARBALL): $(TMP)/$(PACKAGE)-$(VERSION)
+       @tar --bzip2 --owner=nobody --group=nobody -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION)
+
+$(TMP)/$(PACKAGE)-$(VERSION): .svn
+       svn export . $@
+       @chmod -R a+r,u+w,og-w $@
+       @find $@ -type d | xargs -r chmod a+rx,u+w,og-w