summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 328553caf2e868f337eb3afacec97290c3d6e4f4 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.PHONY: clean name version name fullname release dist dist-bzip2
all: output/entrouvert-archive.gpg

NAME = entrouvert-archive
VERSION=`git describe | sed 's/^debian\///' `

DIST_FILES = \
	keys \
	jessie \
	stretch \
	Makefile

output/entrouvert-archive.gpg: keys/0x*
	cat keys/0x* > output/entrouvert-archive.gpg

clean:
	rm -rf sdist
	rm -rf output/*
	test -d output || mkdir output

release:
	gbp dch --release --commit
	gbp buildpackage --git-tag

dist: clean
	-mkdir sdist
	rm -rf sdist/$(NAME)-$(VERSION)
	mkdir -p sdist/$(NAME)-$(VERSION)
	for i in $(DIST_FILES); do \
		cp -R "$$i" sdist/$(NAME)-$(VERSION); \
	done

dist-bzip2: dist
	cd sdist && tar cfj ../sdist/$(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)

version:
	@(echo $(VERSION))

name:
	@(echo $(NAME))

fullname:
	@(echo $(NAME)-$(VERSION))