]> mj.ucw.cz Git - bouncer.git/blobdiff - Makefile
make release: Reorganization of directory structure
[bouncer.git] / Makefile
index bfd62635db748bf1eaf674f9aa178202c53543c9..e3633b7632f39e7ff967aa086722f041005f5a4d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,10 @@
+VERSION=1.0
+PACKAGE=bouncer-$(VERSION)
+
 PKG_CFLAGS := $(shell pkg-config --cflags libucw libipset)
 PKG_LIBS := $(shell pkg-config --libs libucw libipset)
 
-CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99 $(PKG_CFLAGS)
+CFLAGS=-O2 -Wall -Wextra -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -Wno-missing-field-initializers -std=gnu99 $(PKG_CFLAGS)
 LDLIBS=$(PKG_LIBS)
 
 all: bouncer
@@ -10,4 +13,21 @@ 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/