]>
Commit | Line | Data |
---|---|---|
a6deacca | 1 | include /usr/share/dpkg/default.mk |
edb94d26 TL |
2 | |
3 | PACKAGE=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 | 9 | PPSRC = LibArchive |
9d315569 | 10 | |
11f05f2a | 11 | BUILDSRC=$(PACKAGE)-$(DEB_VERSION_UPSTREAM) |
11f05f2a | 12 | DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc |
918a6904 | 13 | |
a6deacca | 14 | DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb |
9e2a6a56 | 15 | DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb |
a6deacca | 16 | |
11f05f2a | 17 | all: $(DEB) |
918a6904 | 18 | |
f6970de9 SI |
19 | .PHONY: update-bindings |
20 | update-bindings: | |
11f05f2a | 21 | h2xs -M '^(archive|ARCHIVE)_' -v $(DEB_VERSION_UPSTREAM) -On LibArchive /usr/include/archive.h /usr/include/archive_entry.h -larchive |
f6970de9 SI |
22 | echo "Please manually check and add the diff of the automatically generated update" |
23 | ||
11f05f2a SI |
24 | .PHONY: $(BUILDSRC) |
25 | $(BUILDSRC): | |
42246137 TL |
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 $@ | |
9d315569 RV |
32 | |
33 | .PHONY: dsc | |
212cf626 SI |
34 | dsc: |
35 | $(MAKE) $(DSC) | |
36 | lintian $(DSC) | |
37 | ||
11f05f2a SI |
38 | $(DSC): $(BUILDSRC) |
39 | cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc | |
9d315569 | 40 | |
214352bc SI |
41 | .PHONY: sbuild |
42 | sbuild: $(DSC) | |
43 | sbuild $(DSC) | |
44 | ||
9d315569 | 45 | .PHONY: deb |
11f05f2a | 46 | deb: $(DEB) |
9e2a6a56 | 47 | $(DBG_DEB): $(DEB) |
11f05f2a | 48 | $(DEB): $(PPSRC)/LibArchive.xs $(BUILDSRC) |
73f51ac7 | 49 | cd $(BUILDSRC); dpkg-buildpackage -b -us -uc |
9e2a6a56 | 50 | lintian $(DEB) $(DBG_DEB) |
918a6904 DM |
51 | |
52 | .phony: upload | |
11f05f2a | 53 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
9e2a6a56 TL |
54 | upload: $(DEB) $(DBG_DEB) |
55 | tar cf - $(DEB) $(DBG_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST) | |
918a6904 | 56 | |
11f05f2a | 57 | CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* $(BUILDSRC) *.buildinfo *.build *.dsc *tar.?z |
918a6904 DM |
58 | |
59 | .phony: clean | |
60 | clean: | |
11f05f2a | 61 | rm -rf $(CLEANFILES) |
eca488f9 DM |
62 | |
63 | .PHONY: dinstall | |
11f05f2a SI |
64 | dinstall: $(DEB) |
65 | dpkg -i $(DEB) |