bump version to 4.0.16-2
[fence-agents-pve.git] / Makefile
1 RELEASE=4.0
2
3 # GIT SOURCE: https://git.fedorahosted.org/git/fence-agents.git
4
5 PACKAGE=fence-agents-pve
6 PKGREL=2
7 FAVER=4.0.16
8 FADIR=fence-agents-${FAVER}
9 FASRC=${FADIR}.tar.xz
10
11 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
12 GITVERSION:=$(shell cat .git/refs/heads/master)
13
14 DEB=${PACKAGE}_${FAVER}-${PKGREL}_${ARCH}.deb
15
16 all: ${DEB}
17
18 ${DEB} deb: ${FASRC}
19         rm -rf ${FADIR}
20         tar xf ${FASRC}
21         cp -av debian ${FADIR}/debian
22         cat ${FADIR}/doc/COPYRIGHT >>${FADIR}/debian/copyright
23         echo "git clone git://git.proxmox.com/git/fence-agents-pve.git\\ngit checkout ${GITVERSION}" > ${FADIR}/debian/SOURCE
24         cd ${FADIR}; dpkg-buildpackage -rfakeroot -b -us -uc
25         lintian -X copyright-file ${DEB}
26
27 ${RHCSRC} download:
28         #rm -rf fence-agents.git
29         #git clone git://git.fedorahosted.org/fence-agents.git fence-agents.git
30         #cd fence-agents.git; ./autogen.sh; ./configure; make dist
31         #mv fence-agents.git/fence-agents-*.tar.xz .
32         rm -f ${FASRC}
33         wget https://fedorahosted.org/releases/f/e/fence-agents/${FASRC}
34
35 .PHONY: upload
36 upload: ${DEB}
37         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
38         mkdir -p /pve/${RELEASE}/extra
39         rm -f /pve/${RELEASE}/extra/${PACKAGE}*.deb
40         rm -f /pve/${RELEASE}/extra/Packages*
41         cp ${DEB} /pve/${RELEASE}/extra
42         cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
43         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
44
45 distclean: clean
46
47 clean:
48         rm -rf *~ debian/*~ *.deb ${FADIR} ${PACKAGE}_* fence-agents.git
49
50 .PHONY: dinstall
51 dinstall: ${DEB}
52         dpkg -i ${DEB}