]> git.proxmox.com Git - libxdgmime-perl.git/blame - Makefile
buildsys: derive upload dist automatically
[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
a6b0921e
SI
6DEB = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
7DSC = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
b6f9e342 8BUILDSRC=${PACKAGE}-${DEB_VERSION_UPSTREAM}
5fb3d080 9
a1d229d1 10OPKGNAME=Xdgmime
fda2f5ea 11UPSTREAM=xdgmime-source/src
a1d229d1 12
b6f9e342 13all: ${DEB}
f05aec34
SI
14.PHONY: update-bindings
15update-bindings:
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]
19 echo "Please manually check and add the diff of the automatically generated update"
b6f9e342
SI
20
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}
28
a6b0921e
SI
29.PHONY: dsc
30dsc: ${DSC}
31${DSC}: ${BUILDSRC}
32 cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc
33 lintian ${DSC}
34
35.PHONY: sbuild
36sbuild: $(DSC)
37 sbuild $(DSC)
38
b6f9e342
SI
39.PHONY: deb
40deb: ${DEB}
41${DEB}: ${OPKGNAME}/Xdgmime.xs ${BUILDSRC}
42 cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc
a1d229d1
DM
43 lintian ${DEB}
44
9d93a133
SI
45.phony: upload
46upload: UPLOAD_DIST ?= ${DEB_DISTRIBUTION}
a1d229d1 47upload: ${DEB}
9d93a133 48 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist ${UPLOAD_DIST}
a1d229d1
DM
49
50
a6b0921e 51CLEANFILES = *~ debian/*~ *.deb ${BUILDSRC} libxdgmime-perl* *.buildinfo *.build *.dsc *tar.?z
a1d229d1 52
90b3593d 53.PHONY: clean
a1d229d1
DM
54clean:
55 rm -rf ${CLEANFILES}
90b3593d
DM
56
57.PHONY: dinstall
58dinstall: ${DEB}
59 dpkg -i ${DEB}