diff options
-rw-r--r-- | Makefile | 19 | ||||
-rwxr-xr-x | fb | 7 |
2 files changed, 20 insertions, 6 deletions
@@ -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) @@ -11,7 +11,12 @@ # Optional: xclip #---------------------------------------------------- -VERSION="0.6.8.3" +SCRIPTDIR="`dirname "$0"`" +VERSION="`cd $SCRIPTDIR; git describe 2>/dev/null | sed 's/^v//'`" + +if [ -z "$VERSION" ]; then + VERSION="unknown" +fi DELETE= EXTENSION="" |