-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile
More file actions
92 lines (75 loc) · 2.26 KB
/
Makefile
File metadata and controls
92 lines (75 loc) · 2.26 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# Build variables
#
SRCNAME = ASL3
PKGNAME = asl3
RELVER = 3.17
DEBVER = 1
RELPLAT ?= deb$(shell lsb_release -rs 2> /dev/null)
BUILDABLES = \
apt.conf.d \
bin \
etc \
keys \
polkit \
share
ifdef ${DESTDIR}
DESTDIR=${DESTDIR}
endif
ROOT_FILES = LICENSE README.md
ROOT_INSTALLABLES = $(patsubst %, $(DESTDIR)$(docdir)/%, $(CONF_FILES))
default:
@echo This does nothing because of dpkg-buildpkg - use 'make install'
install: $(ROOT_INSTALLABLES)
@echo DESTDIR=$(DESTDIR)
$(foreach dir, $(BUILDABLES), $(MAKE) -C $(dir) install;)
$(DESTDIR)$(docdir)/%: %
install -D -m 0644 $< $@
verset:
perl -pi -e 's/\@\@HEAD-DEVELOP\@\@/$(RELVER)/g' `grep -rl @@HEAD-DEVELOP@@ bin/`
deb: debclean debprep
debchange --distribution stable --package $(PKGNAME) \
--newversion $(EPOCHVER)$(RELVER)-$(DEBVER).$(RELPLAT) \
"Autobuild of $(EPOCHVER)$(RELVER)-$(DEBVER) for $(RELPLAT)"
dpkg-buildpackage -b --no-sign
git checkout debian/changelog
git checkout bin/*
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 asl3-$(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
.PHONY: test test-all test-python test-shell
test: test-python
@echo "All tests passed!"
test-all: test-python test-shell
@echo "All tests (Python + Shell) passed!"
test-python:
@echo "Running all Python tests"
python3 -m pytest tests/ -v
test-shell:
@echo "Running shell script tests..."
find tests -type f -name '*.bats' -exec chmod +x {} + 2>/dev/null || true
if find . -type f -name '*.bats' -print0 | xargs -0 bats; then \
echo "BATS tests passed"; \
else \
echo "BATS tests not configured or not found"; \
exit 1; \
fi