-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaintainer
executable file
·64 lines (42 loc) · 1.66 KB
/
maintainer
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/make -f
SHELL = /bin/bash
GITDIR = ./.git
help:
@echo "Subcommands: bump sync commit tag tarball sign"
PKGNAME = $(shell head -n1 configure.ac | cut -d[ -f3 | cut -d] -f1)
VERSION = $(shell head -n1 configure.ac | cut -d[ -f5 | cut -d] -f1)
RELEASE ?= 1
NV = $(PKGNAME)-$(VERSION)
NVR = $(PKGNAME)-$(VERSION)-$(RELEASE)
TARBALL = $(NV).tar.gz
# Construction Rules
sync:
@echo No syncing necessary.
commit:
git commit --allow-empty -a -m "$(NV)."
$(GITDIR)/refs/tags/%:
git tag -s -f -m "$*" "$*"
tag: $(GITDIR)/refs/tags/$(NV)
$(TARBALL): $(GITDIR)/refs/tags/$(NV)
git archive --format=tar --prefix=$(NV)/ $(NV) | gzip -c -9 > $(TARBALL)
$(PKGNAME)_$(VERSION).orig.tar.gz: $(TARBALL)
cp $< $@
tarball: $(TARBALL)
$(TARBALL).asc: $(TARBALL)
gpg -ab $<
sign: $(TARBALL).asc
# Snapshot and Release Rules
debcommit:
git-dch -R -N $(VERSION)-$(RELEASE) --debian-tag="debian/klee-%(version)s" --upstream-tag="klee-%(version)s"
git commit --allow-empty -a -m "debian/$(NVR)"
debtag: $(GITDIR)/refs/tags/debian/$(NVR)
debpkg: $(GITDIR)/refs/tags/debian/$(NVR)
git-buildpackage --git-builder="debuild -us -uc" --git-debian-tag="debian/klee-%(version)s" --git-upstream-tag="klee-%(version)s"
ubucommit:
git-dch -R -N $(VERSION)-$(RELEASE) --debian-tag="ubuntu/klee-%(version)s" --upstream-tag="klee-%(version)s"
git commit --allow-empty -a -m "ubuntu/$(NVR)"
ubutag: $(GITDIR)/refs/tags/ubuntu/$(NVR)
ubupkg: $(GITDIR)/refs/tags/ubuntu/$(NVR)
git-buildpackage --git-builder="debuild -us -uc" --git-debian-tag="ubuntu/klee-%(version)s" --git-upstream-tag="klee-%(version)s"
.PHONY: bump commit tarball sign debbump debcommit debtag
# vim: set noet ts=8 sw=8 :