forked from proxmox/pve-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (34 loc) · 1.12 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
RELEASE=3.2
PACKAGE=pve-cluster
PKGVER=3.0
PKGREL=14
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master)
DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb
all: ${DEB}
cpgtest: cpgtest.c
gcc -Wall cpgtest.c $(shell pkg-config --cflags --libs libcpg libcoroipcc) -o cpgtest
.PHONY: dinstall
dinstall: ${DEB}
dpkg -i ${DEB}
.PHONY: ${DEB}
${DEB}:
rm -rf build
rsync -a --exclude .svn data/ build
cp -a debian build/debian
echo "git clone git://git.proxmox.com/git/pve-cluster.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
cd build; ./autogen.sh
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
lintian ${DEB}
.PHONY: upload
upload: ${DEB}
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
mkdir -p /pve/${RELEASE}/extra
rm -f /pve/${RELEASE}/extra/${PACKAGE}*.deb
rm -f /pve/${RELEASE}/extra/Packages*
cp ${DEB} /pve/${RELEASE}/extra
cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
.PHONY: clean
clean:
rm -rf *~ build *_${ARCH}.deb *.changes *.dsc ${CSDIR}