summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 92e29af0e7ae0b35100d5f080d925c866295fa30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
VERSION=`git describe | sed 's/^v//'`

all: fb.1

fb.1: fb.pod
	pod2man -c "" fb.pod fb.1

clean:
	rm -f fb.1
	rm -rf dist

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 -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)