mirror of
https://git.proxmox.com/git/libxdgmime-perl
synced 2025-08-05 20:01:10 +00:00

taken from pve-common commit: 0bc017209886ee52a5418bcb7921324836cc869b Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
60 lines
1.5 KiB
Makefile
60 lines
1.5 KiB
Makefile
include /usr/share/dpkg/pkg-info.mk
|
|
include /usr/share/dpkg/architecture.mk
|
|
|
|
PACKAGE=libxdgmime-perl
|
|
|
|
DEB = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
|
|
DSC = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
|
|
BUILDSRC=${PACKAGE}-${DEB_VERSION_UPSTREAM}
|
|
|
|
OPKGNAME=Xdgmime
|
|
UPSTREAM=xdgmime-source/src
|
|
|
|
all: ${DEB}
|
|
.PHONY: update-bindings
|
|
update-bindings:
|
|
cp -a ${UPSTREAM}/xdgmime*.[ch] ${OPKGNAME}/
|
|
h2xs -P -v ${DEB_VERSION_UPSTREAM} -F -DHAVE_MMAP -M '^XDG_' -t PV -Ofan Xdgmime xdgmime.h
|
|
rm -f ${OPKGNAME}/xdgmime*.[ch]
|
|
echo "Please manually check and add the diff of the automatically generated update"
|
|
|
|
.PHONY: ${BUILDSRC}
|
|
${BUILDSRC}:
|
|
-rm -rf ${BUILDSRC}
|
|
cp -a ${OPKGNAME} ${BUILDSRC}
|
|
cp -a ${UPSTREAM}/xdgmime*.[ch] ${BUILDSRC}/
|
|
perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("${BUILDSRC}/ppport.h");'
|
|
cp -a debian ${BUILDSRC}
|
|
|
|
.PHONY: dsc
|
|
dsc: ${DSC}
|
|
${DSC}: ${BUILDSRC}
|
|
cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc
|
|
lintian ${DSC}
|
|
|
|
.PHONY: sbuild
|
|
sbuild: $(DSC)
|
|
sbuild $(DSC)
|
|
|
|
.PHONY: deb
|
|
deb: ${DEB}
|
|
${DEB}: ${OPKGNAME}/Xdgmime.xs ${BUILDSRC}
|
|
cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc
|
|
lintian ${DEB}
|
|
|
|
.phony: upload
|
|
upload: UPLOAD_DIST ?= ${DEB_DISTRIBUTION}
|
|
upload: ${DEB}
|
|
tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist ${UPLOAD_DIST}
|
|
|
|
|
|
CLEANFILES = *~ debian/*~ *.deb ${BUILDSRC} libxdgmime-perl* *.buildinfo *.build *.dsc *tar.?z
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf ${CLEANFILES}
|
|
|
|
.PHONY: dinstall
|
|
dinstall: ${DEB}
|
|
dpkg -i ${DEB}
|