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