]> mj.ucw.cz Git - bouncer.git/blobdiff - Makefile
make release: Reorganization of directory structure
[bouncer.git] / Makefile
index 178d1a7bf5d8dc4297e2bdab6451a7c642140874..e3633b7632f39e7ff967aa086722f041005f5a4d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+VERSION=1.0
+PACKAGE=bouncer-$(VERSION)
+
 PKG_CFLAGS := $(shell pkg-config --cflags libucw libipset)
 PKG_LIBS := $(shell pkg-config --libs libucw libipset)
 
@@ -11,8 +14,20 @@ bouncer: bouncer.c
 clean:
        rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
        rm -f bouncer
+       rm -f bouncer-*.tar.gz bouncer-*.tar.sig
 
 install: bouncer
        install -d $(DESTDIR)/usr/sbin $(DESTDIR)/etc
        install -m755 bouncer $(DESTDIR)/usr/sbin/
        install -m644 config $(DESTDIR)/etc/bouncer
+
+release:
+       git tag --sign v$(VERSION)
+       git push --tags
+       git archive --format=tar --prefix=$(PACKAGE)/ HEAD >$(PACKAGE).tar
+       gpg --armor --detach-sign -o $(PACKAGE).tar.sig $(PACKAGE).tar
+       gzip $(PACKAGE).tar
+       scp $(PACKAGE).tar.gz $(PACKAGE).tar.sig atrey:~ftp/pub/local/mj/linux/
+       scp README jw:web/sw/bouncer/
+       ssh jw "cd web && bin/release-prog bouncer $(VERSION)"
+       mv $(PACKAGE).tar.gz $(PACKAGE).tar.sig ~/archives/sw/bouncer/