]> git.proxmox.com Git - libarchive-perl.git/blame - Makefile
buildsys: use simple cp instead of rsync
[libarchive-perl.git] / Makefile
CommitLineData
edb94d26
TL
1include /usr/share/dpkg/pkg-info.mk
2
3PACKAGE=libarchive-perl
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 9PPSRC = LibArchive
9d315569
RV
10
11ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
12GITVERSION:=$(shell git rev-parse HEAD)
13
edb94d26
TL
14BUILDSRC=${PACKAGE}-${DEB_VERSION_UPSTREAM}
15DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb
16DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
918a6904 17
eca488f9 18all: ${DEB}
918a6904 19
f6970de9
SI
20.PHONY: update-bindings
21update-bindings:
22 h2xs -M '^(archive|ARCHIVE)_' -v ${DEB_VERSION_UPSTREAM} -On LibArchive /usr/include/archive.h /usr/include/archive_entry.h -larchive
23 echo "Please manually check and add the diff of the automatically generated update"
24
9d315569
RV
25.PHONY: ${BUILDSRC}
26${BUILDSRC}:
27 rm -rf ${BUILDSRC}
c87cbcee 28 cp -a ${PPSRC}/ ${BUILDSRC}
9d315569 29 cp -a debian ${BUILDSRC}
89cbbf60 30 perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("${BUILDSRC}/ppport.h");'
9d315569
RV
31 echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >${BUILDSRC}/debian/SOURCE
32
33.PHONY: dsc
34dsc: ${DSC}
35${DSC}: ${BUILDSRC}
36 cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc
37 lintian ${DSC}
38
39.PHONY: deb
40deb: ${DEB}
41${DEB}: ${PPSRC}/LibArchive.xs ${BUILDSRC}
42 cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc -rfakeroot
eca488f9 43 lintian ${DEB}
918a6904
DM
44
45.phony: upload
eca488f9
DM
46upload: ${DEB}
47 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
918a6904 48
9d315569 49CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* ${BUILDSRC}
918a6904
DM
50
51.phony: clean
52clean:
53 rm -rf ${CLEANFILES}
eca488f9
DM
54
55.PHONY: dinstall
56dinstall: ${DEB}
57 dpkg -i ${DEB}