summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2012-04-21 12:30:58 +0200
committerPaul Buetow <paul@buetow.org>2012-04-21 12:30:58 +0200
commite682c81a46d1f96e9f44a742e8f949d5935e5f79 (patch)
treed5cbc6490e0c6a728e281c991f829b16ef25ebcb /Makefile
parent109b41b1368b44377f1d6228659bf920718cadf0 (diff)
version number is not hard coded anymore
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9f6ae13..b33c1c5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,13 @@
NAME=loadbars
-all: documentation perltidy
+all: version documentation perltidy
+version:
+ cut -d' ' -f2 debian/changelog | head -n 1 | sed 's/(//;s/)//' > .version
perltidy:
find . -name \*.pm | xargs perltidy -b
perltidy -b $(NAME)
find . -name \*.bak -delete
documentation:
- pod2man --release="$(NAME) $$(cut -d' ' -f2 debian/changelog | head -n 1 | sed 's/(//;s/)//')" \
+ pod2man --release="$(NAME) $$(cat .version)" \
--center="User Commands" ./docs/$(NAME).pod > ./docs/$(NAME).1
pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt
install:
@@ -14,8 +16,11 @@ install:
cp $(NAME) $(DESTDIR)/usr/bin
cp -r ./lib $(DESTDIR)/usr/share/$(NAME)/lib
cp -r ./fonts $(DESTDIR)/usr/share/$(NAME)/fonts
+ cp ./.version $(DESTDIR)/usr/share/$(NAME)/version
deinstall:
test ! -z "$(DESTDIR)" && test -f $(DESTDIR)/usr/bin/$(NAME) && rm $(DESTDIR)/usr/bin/$(NAME) || exit 0
test ! -z "$(DESTDIR)/usr/share/$(NAME)" && -d $(DESTDIR)/usr/share/$(NAME) && rm -r $(DESTDIR)/usr/share/$(NAME) || exit 0
+clean:
+ test -f .version && rm .version
deb:
dpkg-buildpackage