]> git.proxmox.com Git - libarchive-perl.git/blob - Makefile
9eed3b143b552575a7f63af26826c54239cfe73f
[libarchive-perl.git] / Makefile
1 VERSION != dpkg-parsechangelog -Sversion | cut -d- -f1
2 PACKAGE != dpkg-parsechangelog -Ssource
3 PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2
4
5 # h2xs -Afn LibArchive
6 # h2xs -an LibArchive /usr/include/archive.h /usr/include/archive_entry.h
7 # perl Makefile.PL PREFIX=/usr
8
9
10 PPSRC = LibArchive
11
12 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
13 GITVERSION:=$(shell git rev-parse HEAD)
14
15 BUILDSRC=${PACKAGE}-${VERSION}
16 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
17 DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
18
19 all: ${DEB}
20
21 .PHONY: ${BUILDSRC}
22 ${BUILDSRC}:
23 rm -rf ${BUILDSRC}
24 rsync -a --exclude .svn ${PPSRC}/ ${BUILDSRC}
25 cp -a debian ${BUILDSRC}
26 echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >${BUILDSRC}/debian/SOURCE
27
28 .PHONY: dsc
29 dsc: ${DSC}
30 ${DSC}: ${BUILDSRC}
31 cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc
32 lintian ${DSC}
33
34 .PHONY: deb
35 deb: ${DEB}
36 ${DEB}: ${PPSRC}/LibArchive.xs ${BUILDSRC}
37 cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc -rfakeroot
38 lintian ${DEB}
39
40 .phony: upload
41 upload: ${DEB}
42 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
43
44 CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* ${BUILDSRC}
45
46 .phony: clean
47 clean:
48 rm -rf ${CLEANFILES}
49
50 .PHONY: dinstall
51 dinstall: ${DEB}
52 dpkg -i ${DEB}