]> git.proxmox.com Git - libarchive-perl.git/blob - Makefile
docs: fix git clone path for this repo
[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
13 BUILDSRC=$(PACKAGE)-$(DEB_VERSION_UPSTREAM)
14 DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(ARCH).deb
15 DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
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 $(BUILDSRC)
27 cp -a $(PPSRC)/ $(BUILDSRC)
28 cp -a debian $(BUILDSRC)
29 perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("$(BUILDSRC)/ppport.h");'
30 echo "git clone git://git.proxmox.com/git/libarchive-perl\\ngit checkout $(shell git rev-parse HEAD)" >$(BUILDSRC)/debian/SOURCE
31
32 .PHONY: dsc
33 dsc:
34 $(MAKE) $(DSC)
35 lintian $(DSC)
36
37 $(DSC): $(BUILDSRC)
38 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
39
40 .PHONY: sbuild
41 sbuild: $(DSC)
42 sbuild $(DSC)
43
44 .PHONY: deb
45 deb: $(DEB)
46 $(DEB): $(PPSRC)/LibArchive.xs $(BUILDSRC)
47 cd $(BUILDSRC); dpkg-buildpackage -b -us -uc -rfakeroot
48 lintian $(DEB)
49
50 .phony: upload
51 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
52 upload: $(DEB)
53 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST)
54
55 CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* $(BUILDSRC) *.buildinfo *.build *.dsc *tar.?z
56
57 .phony: clean
58 clean:
59 rm -rf $(CLEANFILES)
60
61 .PHONY: dinstall
62 dinstall: $(DEB)
63 dpkg -i $(DEB)