summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-10-24 14:45:29 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-10-24 14:53:45 +0200
commitcd28f4053712e546baa9cb79bc25b648907c0a1c (patch)
tree6bf30d82fc70235d07b519193bb7f43d028ff864 /Makefile
parentf2a76851979504180c86c452d9ee73d77fab2b4b (diff)
add dist target; get version from git tags
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 704a7cf..92e29af 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,26 @@
+VERSION=`git describe | sed 's/^v//'`
+
all: fb.1
fb.1: fb.pod
pod2man -c "" fb.pod fb.1
clean:
- rm fb.1
+ rm -f fb.1
+ rm -rf dist
-install:
+install: all
install -Dm755 fb $(DESTDIR)/usr/bin/fb
install -Dm644 fb.1 $(DESTDIR)/usr/share/man/man1/fb.1
install -Dm644 COPYING $(DESTDIR)/usr/share/licenses/fb/COPYING
uninstall:
- rm $(DESTDIR)/usr/bin/fb
- rm $(DESTDIR)/usr/share/man/man1/fb.1
- rm $(DESTDIR)/usr/share/licenses/fb/COPYING
+ rm -f $(DESTDIR)/usr/bin/fb
+ rm -f $(DESTDIR)/usr/share/man/man1/fb.1
+ rm -f $(DESTDIR)/usr/share/licenses/fb/COPYING
+
+dist: all
+ mkdir -p dist/fb-$(VERSION)
+ cp -a fb fb.pod fb.1 COPYING Makefile dist/fb-$(VERSION)
+ sed -i 's/^VERSION=.*$$/VERSION="'$(VERSION)'"/' dist/fb-$(VERSION)/fb
+ cd dist; tar -czf fb-$(VERSION).tar.gz fb-$(VERSION)