blob: ec1e4dd83fbda4c55e80541d9addd849a623ad9c (
plain)
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
|
PACKAGE_DESCRIPTION ?= "Quick packaging for $(PACKAGE_NAME)"
PACKAGE_MAINTAINER ?= "$(shell echo $USER)@$(shell hostname)"
OUT_DEB=$(PACKAGE_NAME)-$(PACKAGE_VERSION).deb
all: $(OUT_DEB)
clean:
rm -rvf target work $(OUT_DEB)
target:
mkdir $@
target/debian-binary: | target
echo 2.0 > $@
target/control.tar.gz: work/control/control
tar cvzf $@ -C work/control .
target/data.tar.gz: work/data
tar cvzf $@ -C work/data .
work:
mkdir $@
work/control: work
mkdir $@
work/data: work
mkdir -p $@
work/control/control: work/control
echo "Package: $(PACKAGE_NAME)" >$@
echo "Version: $(PACKAGE_VERSION)" >>$@
echo "Architecture: amd64" >>$@
echo "Maintainer: $(PACKAGE_MAINTAINER)" >>$@
echo "Description: $(PACKAGE_DESCRIPTION)" >>$@
$(OUT_DEB): target/debian-binary target/control.tar.gz target/data.tar.gz
ar q $@ $^
|