]>
Commit | Line | Data |
---|---|---|
5fb3d080 TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | include /usr/share/dpkg/architecture.mk | |
3 | ||
a6b0921e | 4 | PACKAGE=libxdgmime-perl |
5fb3d080 | 5 | |
d2fd5726 SI |
6 | DEB = $(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb |
7 | DSC = $(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc | |
8 | BUILDSRC=$(PACKAGE)-$(DEB_VERSION_UPSTREAM) | |
5fb3d080 | 9 | |
a1d229d1 | 10 | OPKGNAME=Xdgmime |
fda2f5ea | 11 | UPSTREAM=xdgmime-source/src |
a1d229d1 | 12 | |
d2fd5726 | 13 | all: $(DEB) |
f05aec34 SI |
14 | .PHONY: update-bindings |
15 | update-bindings: | |
d2fd5726 SI |
16 | cp -a $(UPSTREAM)/xdgmime*.[ch] $(OPKGNAME)/ |
17 | h2xs -P -v $(DEB_VERSION_UPSTREAM) -F -DHAVE_MMAP -M '^XDG_' -t PV -Ofan Xdgmime xdgmime.h | |
18 | rm -f $(OPKGNAME)/xdgmime*.[ch] | |
f05aec34 | 19 | echo "Please manually check and add the diff of the automatically generated update" |
b6f9e342 | 20 | |
d2fd5726 SI |
21 | .PHONY: $(BUILDSRC) |
22 | $(BUILDSRC): | |
23 | -rm -rf $(BUILDSRC) | |
24 | cp -a $(OPKGNAME) $(BUILDSRC) | |
25 | cp -a $(UPSTREAM)/xdgmime*.[ch] $(BUILDSRC)/ | |
26 | perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("$(BUILDSRC)/ppport.h");' | |
27 | cp -a debian $(BUILDSRC) | |
b6f9e342 | 28 | |
a6b0921e | 29 | .PHONY: dsc |
d2fd5726 SI |
30 | dsc: $(DSC) |
31 | $(DSC): $(BUILDSRC) | |
32 | cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc | |
33 | lintian $(DSC) | |
a6b0921e SI |
34 | |
35 | .PHONY: sbuild | |
36 | sbuild: $(DSC) | |
37 | sbuild $(DSC) | |
38 | ||
b6f9e342 | 39 | .PHONY: deb |
d2fd5726 SI |
40 | deb: $(DEB) |
41 | $(DEB): $(OPKGNAME)/Xdgmime.xs $(BUILDSRC) | |
42 | cd $(BUILDSRC); dpkg-buildpackage -b -us -uc | |
43 | lintian $(DEB) | |
a1d229d1 | 44 | |
9d93a133 | 45 | .phony: upload |
d2fd5726 SI |
46 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
47 | upload: $(DEB) | |
48 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST) | |
a1d229d1 DM |
49 | |
50 | ||
d2fd5726 | 51 | CLEANFILES = *~ debian/*~ *.deb $(BUILDSRC) libxdgmime-perl* *.buildinfo *.build *.dsc *tar.?z |
a1d229d1 | 52 | |
90b3593d | 53 | .PHONY: clean |
a1d229d1 | 54 | clean: |
d2fd5726 | 55 | rm -rf $(CLEANFILES) |
90b3593d DM |
56 | |
57 | .PHONY: dinstall | |
d2fd5726 SI |
58 | dinstall: $(DEB) |
59 | dpkg -i $(DEB) |