]> git.proxmox.com Git - libxdgmime-perl.git/blame - Makefile
buildsys: add dsc and sbuild targets
[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
90b3593d 45.PHONY: upload
a1d229d1 46upload: ${DEB}
90b3593d 47 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
a1d229d1
DM
48
49
a6b0921e 50CLEANFILES = *~ debian/*~ *.deb ${BUILDSRC} libxdgmime-perl* *.buildinfo *.build *.dsc *tar.?z
a1d229d1 51
90b3593d 52.PHONY: clean
a1d229d1
DM
53clean:
54 rm -rf ${CLEANFILES}
90b3593d
DM
55
56.PHONY: dinstall
57dinstall: ${DEB}
58 dpkg -i ${DEB}