summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile27
1 files changed, 25 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 702d59a..3d81ff4 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,8 @@
## Login <jschneider@entrouvert.org>
##
-NAME = firewall
+NAME=firewall
+VERSION=`git describe`
DESTDIR=
all:
@@ -15,4 +16,26 @@ install:
install -d -m 0755 -o root -g root $(DESTDIR)/etc/firewall
install -m 0640 -o root -g root $(NAME).conf $(DESTDIR)/etc/firewall/firewall.conf.template
install -m 0640 -o root -g root rsyslog.conf $(DESTDIR)/etc/rsyslog.d
- install -m 0755 -o root -g root $(NAME) $(DESTDIR)/etc/init.d
+ install -m 0755 -o root -g root $(NAME) $(DESTDIR)/usr/bin
+clean:
+ rm -rf build sdist
+
+dist-bzip2: clean
+ mkdir -p build/$(NAME)-$(VERSION)
+ for i in *; do \
+ if [ "$$i" != "build" ]; then \
+ cp -R "$$i" build/$(NAME)-$(VERSION); \
+ fi; \
+ done
+ mkdir sdist
+ cd build && tar cfj ../sdist/$(NAME)-$(VERSION).tar.bz2 .
+
+version:
+ @(echo $(VERSION))
+
+name:
+ @(echo $(NAME))
+
+fullname:
+ @(echo $(NAME)-$(VERSION))
+