]> git.proxmox.com Git - libarchive-perl.git/blame - Makefile
d/rules: use dh_prep instead of dh_clean -k
[libarchive-perl.git] / Makefile
CommitLineData
561f47cf
RV
1VERSION != dpkg-parsechangelog -Sversion | cut -d- -f1
2PACKAGE != dpkg-parsechangelog -Ssource
3PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2
918a6904
DM
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
918a6904
DM
9
10PPSRC = LibArchive
9d315569
RV
11
12ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
13GITVERSION:=$(shell git rev-parse HEAD)
14
15BUILDSRC=${PACKAGE}-${VERSION}
16DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
17DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
918a6904 18
eca488f9 19all: ${DEB}
918a6904 20
9d315569
RV
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
29dsc: ${DSC}
30${DSC}: ${BUILDSRC}
31 cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc
32 lintian ${DSC}
33
34.PHONY: deb
35deb: ${DEB}
36${DEB}: ${PPSRC}/LibArchive.xs ${BUILDSRC}
37 cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc -rfakeroot
eca488f9 38 lintian ${DEB}
918a6904
DM
39
40.phony: upload
eca488f9
DM
41upload: ${DEB}
42 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
918a6904 43
9d315569 44CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* ${BUILDSRC}
918a6904
DM
45
46.phony: clean
47clean:
48 rm -rf ${CLEANFILES}
eca488f9
DM
49
50.PHONY: dinstall
51dinstall: ${DEB}
52 dpkg -i ${DEB}