-RELEASE=2.0
-
PACKAGE=pve-cluster
-PKGVER=1.0
-PKGREL=16
+PKGVER=4.0
+PKGREL=47
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+GITVERSION:=$(shell cat .git/refs/heads/master)
DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb
+DBG_DEB=${PACKAGE}-dbg_${PKGVER}-${PKGREL}_${ARCH}.deb
+
-all: ${DEB}
+all: ${DEB} ${DBG_DEB}
cpgtest: cpgtest.c
- gcc -Wall cpgtest.c $(shell pkg-config --cflags --libs libcpg libcoroipcc) -o cpgtest
+ gcc -Wall cpgtest.c $(shell pkg-config --cflags --libs libcpg libqb) -o cpgtest
.PHONY: dinstall
dinstall: ${DEB}
- dpkg -i ${DEB}
+ dpkg -i ${DEB}
-.PHONY: ${DEB}
-${DEB}:
+.PHONY: deb
+deb ${DEB} ${DBG_DEB}:
+ rm -f *.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
+upload: ${DEB} ${DBG_DEB}
+ tar cf - ${DEB} ${DBG_DEB}| ssh repoman@repo.proxmox.com upload
.PHONY: clean
clean: