-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
46 lines (35 loc) · 1.13 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
PACKAGE=pve-sheepdog
PKGREL=1
SDVER=1.0.2
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master)
DEB=${PACKAGE}_${SDVER}-${PKGREL}_${ARCH}.deb
SDDIR=sheepdog-${SDVER}
SDSRC=${SDDIR}.tar.gz
all: ${DEB}
${DEB} deb: ${SDSRC}
rm -rf ${SDDIR}
tar xf ${SDSRC}
mv ${SDDIR}/debian ${SDDIR}/debian.org
cp -av debian ${SDDIR}/debian
echo "git clone git://git.proxmox.com/git/pve-sheepdog.git\\ngit checkout ${GITVERSION}" > ${SDDIR}/debian/SOURCE
cd ${SDDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
lintian -X copyright-file ${DEB}
.PHONY: download
${SDSRC} download:
rm -rf ${SDDIR} sheepdog.git
git clone git://github.com/sheepdog/sheepdog.git -b v1.0.2_rc0 sheepdog.git
cd sheepdog.git; git archive --format=tar.gz -o ../${SDSRC}.tmp v1.0 --prefix=${SDDIR}/
mv ${SDSRC}.tmp ${SDSRC}
.PHONY: upload
upload: ${DEB}
tar cf - ${DEB} | ssh -X [email protected] -- upload --product pve --dist stretch
clean:
distclean: clean
rm -rf sheepdog.git
.PHONY: clean
clean:
rm -rf *~ debian/*~ *.deb *.changes *.buildinfo *.dsc ${SDDIR} ${SDSRC}.tmp
.PHONY: dinstall
dinstall: ${DEB}
dpkg -i ${DEB}