]> git.proxmox.com Git - libarchive-perl.git/blob - Makefile
a8c9ff9cd2944688ff0306c88954b168057411fd
[libarchive-perl.git] / Makefile
1 include /usr/share/dpkg/default.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 BUILDSRC=$(PACKAGE)-$(DEB_VERSION_UPSTREAM)
12 DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
13
14 DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
15 DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
16
17 all: $(DEB)
18
19 .PHONY: update-bindings
20 update-bindings:
21 h2xs -M '^(archive|ARCHIVE)_' -v $(DEB_VERSION_UPSTREAM) -On LibArchive /usr/include/archive.h /usr/include/archive_entry.h -larchive
22 echo "Please manually check and add the diff of the automatically generated update"
23
24 .PHONY: $(BUILDSRC)
25 $(BUILDSRC):
26 rm -rf $@ $@.tmp
27 cp -a $(PPSRC)/ $@.tmp
28 cp -a debian $@.tmp
29 perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("$@.tmp/ppport.h");'
30 echo "git clone git://git.proxmox.com/git/libarchive-perl\\ngit checkout $(shell git rev-parse HEAD)" >$@.tmp/debian/SOURCE
31 mv $@.tmp $@
32
33 .PHONY: dsc
34 dsc:
35 $(MAKE) $(DSC)
36 lintian $(DSC)
37
38 $(DSC): $(BUILDSRC)
39 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
40
41 .PHONY: sbuild
42 sbuild: $(DSC)
43 sbuild $(DSC)
44
45 .PHONY: deb
46 deb: $(DEB)
47 $(DBG_DEB): $(DEB)
48 $(DEB): $(PPSRC)/LibArchive.xs $(BUILDSRC)
49 cd $(BUILDSRC); dpkg-buildpackage -b -us -uc
50 lintian $(DEB) $(DBG_DEB)
51
52 .PHONY: upload
53 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
54 upload: $(DEB) $(DBG_DEB)
55 tar cf - $(DEB) $(DBG_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST)
56
57 .PHONY: clean
58 clean:
59 rm -rf build $(PACKAGE)-[0-9]*/
60 rm -f *.deb *.buildinfo *.build *.dsc *.changes $(PACKAGE)*tar*
61
62 .PHONY: dinstall
63 dinstall: $(DEB)
64 dpkg -i $(DEB)