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