-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (22 loc) · 1.03 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
DPKG=dpkg
DPKG_OPTS=-b
.PHONY: info repo deb
info: deb
dpkg-deb -I out/*.deb
dpkg-deb -c out/*.deb
deb: clean
mkdir -p out
test -d src && cp -r src build || mkdir -p build
cp -r DEBIAN build
V=$$(git rev-list --count HEAD -- .) ; sed -i -e "s/Version:.*/Version: $$V/" build/DEBIAN/control
chmod -R g-w+rX,o+rX build
test -x build.sh && { cd build ; exec ../build.sh ; } || :
fakeroot ${DPKG} ${DPKG_OPTS} build out
rm -Rf build
lintian --suppress-tags changelog-file-missing-in-native-package,diversion-for-unknown-file,binary-without-manpage,no-copyright-file,file-in-etc-not-marked-as-conffile,unstripped-binary-or-object,statically-linked-binary,binary-from-other-architecture,arch-independent-package-contains-binary-or-object,image-file-in-usr-lib -i out/*.deb
repo: check_status deb
../putinrepo.sh out/*.deb
clean:
rm -fr out build
check_status:
@if ! git diff-index --quiet HEAD -- . || test -n "$$(git status --porcelain)" ; then { echo ; git status -s -- . ; echo -e "\nERROR: All changes must be comitted!\n" ; false ; } ; fi