]> git.proxmox.com Git - libxdgmime-perl.git/blame - Makefile
buildsys: only run lintian for phony dsc target
[libxdgmime-perl.git] / Makefile
CommitLineData
5fb3d080
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3
a6b0921e 4PACKAGE=libxdgmime-perl
5fb3d080 5
d2fd5726
SI
6DEB = $(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
7DSC = $(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
8BUILDSRC=$(PACKAGE)-$(DEB_VERSION_UPSTREAM)
5fb3d080 9
a1d229d1 10OPKGNAME=Xdgmime
fda2f5ea 11UPSTREAM=xdgmime-source/src
a1d229d1 12
d2fd5726 13all: $(DEB)
f05aec34
SI
14.PHONY: update-bindings
15update-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
6b46a598
SI
30dsc:
31 $(MAKE) $(DSC)
32 lintian $(DSC)
33
d2fd5726
SI
34$(DSC): $(BUILDSRC)
35 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
a6b0921e
SI
36
37.PHONY: sbuild
38sbuild: $(DSC)
39 sbuild $(DSC)
40
b6f9e342 41.PHONY: deb
d2fd5726
SI
42deb: $(DEB)
43$(DEB): $(OPKGNAME)/Xdgmime.xs $(BUILDSRC)
44 cd $(BUILDSRC); dpkg-buildpackage -b -us -uc
45 lintian $(DEB)
a1d229d1 46
9d93a133 47.phony: upload
d2fd5726
SI
48upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
49upload: $(DEB)
50 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST)
a1d229d1
DM
51
52
d2fd5726 53CLEANFILES = *~ debian/*~ *.deb $(BUILDSRC) libxdgmime-perl* *.buildinfo *.build *.dsc *tar.?z
a1d229d1 54
90b3593d 55.PHONY: clean
a1d229d1 56clean:
d2fd5726 57 rm -rf $(CLEANFILES)
90b3593d
DM
58
59.PHONY: dinstall
d2fd5726
SI
60dinstall: $(DEB)
61 dpkg -i $(DEB)