-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (59 loc) · 1.92 KB
/
Makefile
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
65
66
67
68
69
70
71
72
73
74
#
# Build variables
#
SRCNAME = ASL3-Usage
PKGNAME = asl-usage
RELVER = 1.4.0
DEBVER = 1
RELPLAT ?= deb$(shell lsb_release -rs 2> /dev/null)
prefix ?= /usr
docdir ?= $(prefix)/share/doc/$(PKGNAME)
BUILDABLES = \
src
instconf ?= yes
ifeq ($(instconf),yes)
BUILDABLES += conf
endif
ifdef DESTDIR
FULL_DESTDIR = $(shell readlink -f $(DESTDIR))
endif
ROOT_FILES = LICENSE README.md aslusage.sql
ROOT_INSTALLABLES = $(patsubst %, $(FULL_DESTDIR)$(docdir)/%, $(ROOT_FILES))
default:
@echo This does nothing because of dpkg-buildpkg - use 'make install'
install: $(ROOT_INSTALLABLES)
@echo FULL_DESTDIR=$(FULL_DESTDIR)
@echo ROOT_INSTALLABLES=$(ROOT_INSTALLABLES)
$(foreach dir, $(BUILDABLES), $(MAKE) -C $(dir) install DESTDIR=$(FULL_DESTDIR);)
$(FULL_DESTDIR)$(docdir)/%: %
install -D -m 0644 $< $@
verset:
perl -pi -e 's/\@\@HEAD-DEVELOP\@\@/$(RELVER)/g' `grep -rl @@HEAD-DEVELOP@@ src/`
deb: debclean debprep
debchange --distribution stable --package $(PKGNAME) \
--newversion $(EPOCHVER)$(RELVER)-$(DEBVER).$(RELPLAT) \
"Autobuild of $(EPOCHVER)$(RELVER)-$(DEBVER) for $(RELPLAT)"
dpkg-buildpackage -b
git checkout debian/changelog
debchange:
debchange -v $(RELVER)-$(DEBVER)
debchange -r
debprep: debclean
(cd .. && \
rm -f $(PKGNAME)-$(RELVER) && \
rm -f $(PKGNAME)-$(RELVER).tar.gz && \
rm -f $(PKGNAME)_$(RELVER).orig.tar.gz && \
ln -s $(SRCNAME) $(PKGNAME)-$(RELVER) && \
tar --exclude=".git" -h -zvcf $(PKGNAME)-$(RELVER).tar.gz $(PKGNAME)-$(RELVER) && \
ln -s $(PKGNAME)-$(RELVER).tar.gz $(PKGNAME)_$(RELVER).orig.tar.gz )
debclean:
rm -f ../$(PKGNAME)_$(RELVER)*
rm -f ../$(PKGNAME)-$(RELVER)*
rm -rf debian/$(PKGNAME)
rm -f debian/files
rm -rf debian/.debhelper/
rm -f debian/debhelper-build-stamp
rm -f debian/*.substvars
rm -rf debian/$(SRCNAME)/ debian/.debhelper/
rm -f debian/debhelper-build-stamp debian/files debian/$(SRCNAME).substvars
rm -f debian/*.debhelper debian/*.debhelper.log