change from dpkg-deb to dpkg-buildpackage

for better building pve-manager

this moves the copyright file to debian/
the debian/changelog.Debian to debian/changelog

we do not need the debian/conffiles anymore (gets autogenerated from
files in ./etc/)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-06-09 09:55:28 +02:00 committed by Fabian Grünbichler
parent 059cb51053
commit ff9c5f016e
8 changed files with 32 additions and 41 deletions

View File

@ -1,6 +1,6 @@
include defines.mk include defines.mk
export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -l debian/changelog.Debian -STimestamp) export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
DESTDIR= DESTDIR=
@ -29,30 +29,14 @@ country.dat: country.pl
.PHONY: deb .PHONY: deb
deb: $(DEB) deb: $(DEB)
$(DEB): $(DEB):
${MAKE} -C bin/test check
make clean
rm -rf dest rm -rf dest
mkdir dest mkdir dest
make DESTDIR=`pwd`/dest install rsync -a * dest
mkdir dest/DEBIAN sed -e s/@VERSION@/${VERSION}/ -e s/@PACKAGE@/${PACKAGE}/ -e s/@PACKAGERELEASE@/${PACKAGERELEASE}/ debian/control.in >dest/debian/control
sed -e s/@VERSION@/${VERSION}/ -e s/@PACKAGE@/${PACKAGE}/ -e s/@PACKAGERELEASE@/${PACKAGERELEASE}/ debian/control.in >dest/DEBIAN/control echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/debian/SOURCE
install -m 0644 debian/conffiles dest/DEBIAN cd dest; dpkg-buildpackage -rfakeroot -b -us -uc
install -m 0755 debian/config dest/DEBIAN
install -m 0644 debian/templates dest/DEBIAN
install -m 0755 debian/preinst dest/DEBIAN
install -m 0755 debian/postinst dest/DEBIAN
install -m 0755 debian/prerm dest/DEBIAN
install -m 0755 debian/postrm dest/DEBIAN
install -m 0644 debian/triggers dest/DEBIAN
install -m 0644 -D debian/lintian-overrides dest/usr/share/lintian/overrides/${PACKAGE}
echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/usr/share/doc/${PACKAGE}/SOURCE
gzip -n --best dest/usr/share/man/*/*
gzip -n --best dest/usr/share/doc/${PACKAGE}/changelog.Debian
dpkg-deb --build dest
mv dest.deb ${DEB}
rm -rf dest
# supress lintian error: statically-linked-binary usr/bin/pvemailforward # supress lintian error: statically-linked-binary usr/bin/pvemailforward
lintian -X binaries ${DEB} lintian -X binaries ${DEB}
.PHONY: upload .PHONY: upload
upload: ${DEB} check upload: ${DEB} check
@ -87,11 +71,8 @@ install: country.dat vzdump.conf vzdump-hook-script.pl pve-apt.conf mtu bridgevl
install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
install -m 0644 copyright ${DOCDIR}
install -m 0644 debian/changelog.Debian ${DOCDIR}
install -m 0644 country.dat ${DESTDIR}/usr/share/${PACKAGE} install -m 0644 country.dat ${DESTDIR}/usr/share/${PACKAGE}
# temporary: set ExtJS 6 migration devel directory
install -d ${DESTDIR}/usr/share/${PACKAGE}/manager6
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
.PHONY: distclean .PHONY: distclean

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

15
debian/conffiles vendored
View File

@ -1,15 +0,0 @@
/etc/init.d/pve-manager
/etc/init.d/pvedaemon
/etc/init.d/pveproxy
/etc/init.d/spiceproxy
/etc/init.d/pvestatd
/etc/vzdump.conf
/etc/logrotate.d/pve
/etc/apt/apt.conf.d/75pveconf
/etc/apt/sources.list.d/pve-enterprise.list
/etc/network/if-up.d/mtu
/etc/network/if-pre-up.d/vlan
/etc/network/if-post-down.d/vlan
/etc/network/if-up.d/bridgevlan
/etc/network/if-up.d/bridgevlanport
/etc/modprobe.d/pve-blacklist.conf

6
debian/control.in vendored
View File

@ -1,3 +1,9 @@
Source: @PACKAGE@
Section: admin
Priority: optional
Build-Depends: liblocale-po-perl
Maintainer: Proxmox Support Team <support@proxmox.com>
Package: @PACKAGE@ Package: @PACKAGE@
Version: @VERSION@-@PACKAGERELEASE@ Version: @VERSION@-@PACKAGERELEASE@
Section: admin Section: admin

View File

1
debian/docs vendored Normal file
View File

@ -0,0 +1 @@
debian/SOURCE

17
debian/rules vendored Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/make -f
override_dh_compress:
dh_compress -Xaplinfo.dat
override_dh_strip_nondeterminism:
dh_strip_nondeterminism -X.png
override_dh_fixperms:
dh_fixperms
find debian -name 'pvemailforward' -exec chmod 2755 {} +
find debian -name 'pvemailforward' -exec chown root:www-data {} +
find debian -type d -name 'pveproxy' -exec chown www-data:www-data {} +
find debian -type d -name 'pveproxy' -exec chmod 700 {} +
%:
dh $@