]> git.proxmox.com Git - libarchive-perl.git/blob - Makefile
buildsys: avoid no-pre-clean flag when building DSC
[libarchive-perl.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=libarchive-perl
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 PPSRC = LibArchive
10
11 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
12 GITVERSION:=$(shell git rev-parse HEAD)
13
14 BUILDSRC=${PACKAGE}-${DEB_VERSION_UPSTREAM}
15 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb
16 DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
17
18 all: ${DEB}
19
20 .PHONY: ${BUILDSRC}
21 ${BUILDSRC}:
22 rm -rf ${BUILDSRC}
23 rsync -a --exclude .svn ${PPSRC}/ ${BUILDSRC}
24 cp -a debian ${BUILDSRC}
25 echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >${BUILDSRC}/debian/SOURCE
26
27 .PHONY: dsc
28 dsc: ${DSC}
29 ${DSC}: ${BUILDSRC}
30 cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc
31 lintian ${DSC}
32
33 .PHONY: deb
34 deb: ${DEB}
35 ${DEB}: ${PPSRC}/LibArchive.xs ${BUILDSRC}
36 cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc -rfakeroot
37 lintian ${DEB}
38
39 .phony: upload
40 upload: ${DEB}
41 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
42
43 CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* ${BUILDSRC}
44
45 .phony: clean
46 clean:
47 rm -rf ${CLEANFILES}
48
49 .PHONY: dinstall
50 dinstall: ${DEB}
51 dpkg -i ${DEB}