forked from Scout24/kiosk-browser
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
59 lines (48 loc) · 1.99 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
.PHONY: all build test install clean commit-release release deb repo
PACKAGE=kiosk-browser
SHELL=bash
VERSION := $(shell git rev-list HEAD --count --no-merges)
GIT_STATUS := $(shell git status --porcelain)
all: build
build:
@echo No build required
commit-release:
ifneq ($(GIT_STATUS),)
$(error Please commit all changes before releasing. $(shell git status 1>&2))
endif
gbp dch --full --release --new-version=$(VERSION) --distribution stable --auto --git-author --commit
git push
release: commit-release deb
@latest_tag=$$(git describe --tags `git rev-list --tags --max-count=1`); \
comparison="$$latest_tag..HEAD"; \
if [ -z "$$latest_tag" ]; then comparison=""; fi; \
changelog=$$(git log $$comparison --oneline --no-merges --reverse); \
github-release schlomo/$(PACKAGE) v$(VERSION) "$$(git rev-parse --abbrev-ref HEAD)" "**Changelog**<br/>$$changelog" 'out/*.deb'; \
git pull
dput ppa:sschapiro/ubuntu/ppa/bionic out/$(PACKAGE)_*_source.changes
test:
./runtests.sh
install:
install -m 0644 00-disable-inputs.conf -D -t $(DESTDIR)/usr/share/X11/xorg.conf.d
install -m 0755 kiosk-browser-control -D -t $(DESTDIR)/usr/bin
install -m 0644 openbox-rc.xml -D -t $(DESTDIR)/usr/share/$(PACKAGE)
install -m 0644 sudoers -D $(DESTDIR)/etc/sudoers.d/$(PACKAGE)
install -m 0644 XOsview -D -t $(DESTDIR)/usr/lib/X11/app-defaults
install -m 0755 xsession.sh -D -t $(DESTDIR)/usr/share/$(PACKAGE)
install -m 0644 kiosk-browser.json -D -t $(DESTDIR)/etc/chromium-browser/policies/recommended
clean:
rm -Rf debian/$(PACKAGE) debian/*debhelper* debian/*substvars debian/files out/*
deb: clean
ifneq ($(MAKECMDGOALS), release)
$(eval DEBUILD_ARGS := -us -uc)
endif
debuild $(DEBUILD_ARGS) -i -b --lintian-opts --profile debian
debuild $(DEBUILD_ARGS) -i -S --lintian-opts --profile debian
mkdir -p out
mv ../$(PACKAGE)*.{xz,dsc,deb,build,changes,buildinfo} out/
cd out ; apt-ftparchive packages . >Packages
dpkg -I out/*.deb
dpkg -c out/*.deb
repo:
../putinrepo.sh out/*.deb
# vim: set ts=4 sw=4 tw=0 noet :