]> git.wh0rd.org - sysvinit.git/blob - Makefile
* Fix counting message lines in wall. Patch from Petr Lautrbach.
[sysvinit.git] / Makefile
1 all install clean distclean:
2 $(MAKE) -C src $@
3
4 ifeq ($(MAKECMDGOALS),upload)
5 PACKAGE=sysvinit
6 VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog)
7 SVLOGIN=$(shell svn info | sed -rn '/Repository Root:/{ s|.*//(.*)\@.*|\1|p }')
8 ifeq (,$(findstring dsf,$(VERSION)))
9 override VERSION := $(VERSION)dsf
10 endif
11 override TMP:=$(shell mktemp -d $(VERSION).XXXXXXXX)
12 override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.bz2
13 override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch
14
15 upload: $(SFTPBATCH)
16 @sftp -b $< $(SVLOGIN)@dl.sv.nongnu.org:/releases/$(PACKAGE)
17 rm -rf $(TMP)
18
19 $(SFTPBATCH): $(TARBALL).sig
20 @echo progress > $@
21 @echo put $(TARBALL) >> $@
22 @echo chmod 664 $(notdir $(TARBALL)) >> $@
23 @echo put $(TARBALL).sig >> $@
24 @echo chmod 664 $(notdir $(TARBALL)).sig >> $@
25 @echo rm $(PACKAGE)-latest.tar.bz2 >> $@
26 @echo symlink $(notdir $(TARBALL)) $(PACKAGE)-latest.tar.bz2 >> $@
27 @echo quit >> $@
28
29 $(TARBALL).sig: $(TARBALL)
30 @gpg -q -ba --use-agent -o $@ $<
31
32 $(TARBALL): $(TMP)/$(PACKAGE)-$(VERSION)
33 @tar --bzip2 --owner=nobody --group=nobody -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION)
34
35 $(TMP)/$(PACKAGE)-$(VERSION): .svn
36 svn export . $@
37 @chmod -R a+r,u+w,og-w $@
38 @find $@ -type d | xargs -r chmod a+rx,u+w,og-w
39 endif