mirror of
git://git.proxmox.com/git/pve-zsync.git
synced 2025-01-05 17:17:37 +03:00
buildsys: convert to dpkg-buildpackage and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
29274a3aaa
commit
d93352e935
58
Makefile
58
Makefile
@ -5,62 +5,48 @@ PACKAGE=pve-zsync
|
|||||||
PKGREL=16
|
PKGREL=16
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr
|
SBINDIR=${DESTDIR}/usr/sbin
|
||||||
BINDIR=${PREFIX}/bin
|
MAN8DIR=${DESTDIR}/usr/share/man/man8
|
||||||
SBINDIR=${PREFIX}/sbin
|
DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
|
||||||
MANDIR=${PREFIX}/share/man
|
WORKDIR=${DESTDIR}/var/lib/pve-zsync
|
||||||
DOCDIR=${PREFIX}/share/doc/${PACKAGE}
|
|
||||||
PODDIR=${DOCDIR}/pod
|
BUILDDIR=build
|
||||||
MAN1DIR=${MANDIR}/man8/
|
|
||||||
|
|
||||||
#ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
|
||||||
ARCH=all
|
ARCH=all
|
||||||
GITVERSION:=$(shell cat .git/refs/heads/master)
|
GITVERSION:=$(shell git rev-parse HEAD)
|
||||||
|
|
||||||
DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
|
DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
|
||||||
|
|
||||||
all: ${DEB}
|
all:
|
||||||
|
|
||||||
.PHONY: dinstall
|
.PHONY: dinstall
|
||||||
dinstall: deb
|
dinstall: deb
|
||||||
dpkg -i ${DEB}
|
dpkg -i ${DEB}
|
||||||
|
|
||||||
%.8.gz: %.8.man
|
pve-zsync.8: pve-zsync
|
||||||
rm -f $@
|
./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r ${RELEASE} -n pve-zsync - pve-zsync.8
|
||||||
gzip -n pve-zsync.8.man -c9 >$@
|
|
||||||
|
|
||||||
pve-zsync.8.man: pve-zsync
|
|
||||||
./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r ${RELEASE} -n pve-zsync - pve-zsync.8.man
|
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: pve-zsync.8.man pve-zsync.8.gz
|
install: pve-zsync.8
|
||||||
install -d ${DESTDIR}${SBINDIR}
|
install -d ${SBINDIR}
|
||||||
install -m 0755 pve-zsync ${DESTDIR}${SBINDIR}
|
install -m 0755 pve-zsync ${SBINDIR}/pve-zsync
|
||||||
install -d ${DESTDIR}/usr/share/man/man8
|
install -d ${WORKDIR}
|
||||||
install -d ${DESTDIR}${PODDIR}
|
install -d ${MAN8DIR}
|
||||||
install -m 0644 pve-zsync.8.gz ${DESTDIR}/usr/share/man/man8/
|
install -m 0644 pve-zsync.8 ${MAN8DIR}/pve-zsync.8
|
||||||
|
install -d ${DOCDIR}
|
||||||
|
echo "git clone git://git.proxmox.com/git/pve-zsync.git\\ngit checkout ${GITVERSION}" > ${DOCDIR}/SOURCE
|
||||||
|
|
||||||
.PHONY: deb
|
.PHONY: deb
|
||||||
deb: ${DEB}
|
deb: ${DEB}
|
||||||
${DEB}:
|
${DEB}:
|
||||||
rm -rf debian
|
rm -rf ${BUILDDIR}
|
||||||
mkdir debian
|
rsync -a * build
|
||||||
install -d debian/var/lib/pve-zsync
|
cd build; dpkg-buildpackage -b -us -uc
|
||||||
make DESTDIR=${CURDIR}/debian install
|
|
||||||
install -d -m 0755 debian/DEBIAN
|
|
||||||
sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >debian/DEBIAN/control
|
|
||||||
install -D -m 0644 copyright debian/${DOCDIR}/copyright
|
|
||||||
install -m 0644 changelog.Debian debian/${DOCDIR}/
|
|
||||||
gzip -n -9 debian/${DOCDIR}/changelog.Debian
|
|
||||||
echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" > debian/${DOCDIR}/SOURCE
|
|
||||||
fakeroot dpkg-deb --build debian
|
|
||||||
mv debian.deb ${DEB}
|
|
||||||
lintian ${DEB}
|
lintian ${DEB}
|
||||||
rm -rf debian
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.8.man *.8.gz *.buildinfo
|
rm -rf ${BUILDDIR} *.deb *.buildinfo *.changes
|
||||||
find . -name '*~' -exec rm {} ';'
|
find . -name '*~' -exec rm {} ';'
|
||||||
|
|
||||||
.PHONY: distclean
|
.PHONY: distclean
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
Package: pve-zsync
|
|
||||||
Version: @@VERSION@@-@@PKGRELEASE@@
|
|
||||||
Section: perl
|
|
||||||
Priority: optional
|
|
||||||
Architecture: @@ARCH@@
|
|
||||||
Depends: perl (>= 5.6.0-16)
|
|
||||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
|
||||||
Description: Proxmox VE storage management library
|
|
||||||
This package contains the Proxmox VE ZFS sync Tool.
|
|
0
changelog.Debian → debian/changelog
vendored
0
changelog.Debian → debian/changelog
vendored
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
10
|
13
debian/control
vendored
Normal file
13
debian/control
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Source: pve-zsync
|
||||||
|
Section: perl
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||||
|
Standards-Version: 3.8.4
|
||||||
|
|
||||||
|
Package: pve-zsync
|
||||||
|
Section: perl
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${perl:Depends},
|
||||||
|
Description: Proxmox VE ZFS syncing tool
|
||||||
|
Tool for automated syncing of ZFS subvolumes and pools.
|
0
copyright → debian/copyright
vendored
0
copyright → debian/copyright
vendored
8
debian/rules
vendored
Executable file
8
debian/rules
vendored
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# See debhelper(7) (uncomment to enable)
|
||||||
|
# output every command that modifies files on the build system.
|
||||||
|
#export DH_VERBOSE = 1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
Loading…
Reference in New Issue
Block a user