Close #1035: importing stretch libanyevent-http-perl 2.22-1
[libanyevent-http-perl.git] / Makefile
1 RELEASE=4.2
2
3 VERSION=2.22
4 PKGREL=1
5
6 PACKAGE=libanyevent-http-perl
7
8 DEBSRC=libanyevent-http-perl_${VERSION}-${PKGREL}.debian.tar.xz
9 PKGDIR=AnyEvent-HTTP-${VERSION}
10 PKGSRC=libanyevent-http-perl_${VERSION}.orig.tar.gz
11
12 GITVERSION:=$(shell cat .git/refs/heads/master)
13
14 ARCH=all
15 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
16
17 all: ${DEB}
18
19 .PHONY: dinstall
20 dinstall: deb
21         dpkg -i ${DEB}
22
23 .PHONY: deb
24 deb ${DEB}: 
25         rm -rf ${PKGDIR}
26         tar xf ${PKGSRC}
27         cd ${PKGDIR}; tar xf ../${DEBSRC}
28         echo "git clone git://git.proxmox.com/git/libanyevent-http-perl.git\\ngit checkout ${GITVERSION}" >  ${PKGDIR}/debian/SOURCE
29         echo "debian/SOURCE" >> ${PKGDIR}/debian/docs
30 #cd ${PKGDIR}; patch -p1 <../update-changelog.patch
31         cd ${PKGDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
32         lintian ${DEB}
33
34 .PHONY: clean
35 clean:
36         rm -rf *~ *.deb *.changes ${PKGDIR}
37
38 .PHONY: distclean
39 distclean: clean
40
41 .PHONY: upload
42 upload: ${DEB}
43         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
44         mkdir -p /pve/${RELEASE}/extra
45         rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
46         rm -f /pve/${RELEASE}/extra/Packages*
47         cp ${DEB} /pve/${RELEASE}/extra
48         cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
49         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
50