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