-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (34 loc) · 983 Bytes
/
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
include /usr/share/dpkg/pkg-info.mk
PACKAGE=haproxy-defender
SRCDIR=haproxy
BUILDDIR=haproxy-defender
GITVERSION:=$(shell git rev-parse HEAD)
DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
all: ${DEB}
@echo ${DEB}
.PHONY: submodule
submodule:
test -f "${SRCDIR}/debian/changelog" || git submodule update --init
buildir: ${BUILDDIR}
${BUILDDIR}: submodule
rm -rf $(BUILDDIR)
mkdir $(BUILDDIR)
cp -a $(SRCDIR)/* $(BUILDDIR)/
cp -R debian $(BUILDDIR)/
mkdir $(BUILDDIR)/contrib/mod_defender/mod_defender_src
cp -R mod_defender/* $(BUILDDIR)/contrib/mod_defender/mod_defender_src
.PHONY: deb
deb: ${DEB}
${DEB}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
.PHONY: upload
upload: ${DEB}
tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch
.PHONY: distclean
distclean: clean
.PHONY: clean
clean:
rm -rf ${PACKAGE}/ *.deb *.changes *.dsc *.buildinfo
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}