Discussion:
[pve-devel] [PATCH 3/4] bsys: add dsc target
Thomas Lamprecht
2018-12-10 16:42:31 UTC
Permalink
Signed-off-by: Thomas Lamprecht <***@proxmox.com>
---
Makefile | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8322a56..d3be0d3 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master)

DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
+DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc

all:

@@ -60,9 +61,19 @@ ${DEB}:
cd build; dpkg-buildpackage -b -us -uc
lintian ${DEB}

+.PHONY: dsc
+dsc: ${DSC}
+${DSC}:
+ rm -rf build
+ rsync -a * build
+ sed -e "s|@PERLAPI@|perlapi-$(PERL_APIVER)|g" debian/control.in >build/debian/control
+ echo "git clone git://git.proxmox.com/git/librados2-perl.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
+ cd build; dpkg-buildpackage -S -us -uc -d -nc
+ lintian ${DSC}
+
.PHONY: clean
clean:
- rm -rf *~ build *.deb *.changes *.buildinfo
+ rm -rf *~ build *.deb *.changes *.buildinfo *.dsc *.tar.gz
find . -name '*~' -exec rm {} ';'

.PHONY: distclean
--
2.19.2
Thomas Lamprecht
2018-12-10 16:42:29 UTC
Permalink
Signed-off-by: Thomas Lamprecht <***@proxmox.com>
---
Makefile | 24 +++++++++---------------
control.in | 9 ---------
changelog.Debian => debian/changelog | 0
debian/compat | 1 +
debian/control.in | 17 +++++++++++++++++
copyright => debian/copyright | 0
debian/rules | 9 +++++++++
7 files changed, 36 insertions(+), 24 deletions(-)
delete mode 100644 control.in
rename changelog.Debian => debian/changelog (100%)
create mode 100644 debian/compat
create mode 100644 debian/control.in
rename copyright => debian/copyright (100%)
create mode 100755 debian/rules

diff --git a/Makefile b/Makefile
index 2c1451f..8322a56 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ GITVERSION:=$(shell cat .git/refs/heads/master)

DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb

-all: ${DEB}
+all:

RADOS.c: RADOS.xs typemap
xsubpp RADOS.xs -typemap typemap > RADOS.xsc
@@ -49,26 +49,20 @@ install: PVE/RADOS.pm RADOS.so
install -D -m 0644 PVE/RADOS.pm ${DESTDIR}${PERLDIR}/PVE/RADOS.pm
install -D -m 0644 -s RADOS.so ${DESTDIR}${PERLSODIR}/PVE/RADOS/RADOS.so

-.PHONY: deb ${DEB}
+
+.PHONY: deb
deb: ${DEB}
${DEB}:
- rm -rf debian
- mkdir debian
- make DESTDIR=${CURDIR}/debian install
- install -d -m 0755 debian/DEBIAN
- sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ -e "s|@PERLAPI@|perlapi-$(PERL_APIVER)|g" <control.in >debian/DEBIAN/control
- install -D -m 0644 copyright debian/${DOCDIR}/copyright
- install -m 0644 changelog.Debian debian/${DOCDIR}/
- gzip -9 -n debian/${DOCDIR}/changelog.Debian
- echo "git clone git://git.proxmox.com/git/librados2-perl.git\\ngit checkout ${GITVERSION}" > debian/${DOCDIR}/SOURCE
- fakeroot dpkg-deb --build debian
- mv debian.deb ${DEB}
- rm -rf debian
+ rm -rf build
+ rsync -a * build
+ sed -e "s|@PERLAPI@|perlapi-$(PERL_APIVER)|g" debian/control.in >build/debian/control
+ echo "git clone git://git.proxmox.com/git/librados2-perl.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
+ cd build; dpkg-buildpackage -b -us -uc
lintian ${DEB}

.PHONY: clean
clean:
- rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1.pod *.1.gz RADOS.so RADOS.c
+ rm -rf *~ build *.deb *.changes *.buildinfo
find . -name '*~' -exec rm {} ';'

.PHONY: distclean
diff --git a/control.in b/control.in
deleted file mode 100644
index c2dc77e..0000000
--- a/control.in
+++ /dev/null
@@ -1,9 +0,0 @@
-Package: librados2-perl
-Version: @@VERSION@@-@@PKGRELEASE@@
-Section: perl
-Priority: optional
-Architecture: @@ARCH@@
-Depends: libc6 (>= 2.2.5), perl (>= 5.20.1-5), @PERLAPI@, librados2 (>= 0.67.5), libpve-access-control
-Maintainer: Proxmox Support Team <***@proxmox.com>
-Description: Perl bindings for librados
- This package contains librados perl binding used by Proxmox VE.
diff --git a/changelog.Debian b/debian/changelog
similarity index 100%
rename from changelog.Debian
rename to debian/changelog
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control.in b/debian/control.in
new file mode 100644
index 0000000..64d4262
--- /dev/null
+++ b/debian/control.in
@@ -0,0 +1,17 @@
+Source: librados2-perl
+Section: perl
+Priority: optional
+Maintainer: Proxmox Support Team <***@proxmox.com>
+Build-Depends: debhelper (>= 10~)
+Standards-Version: 3.9.8
+Homepage: http://www.proxmox.com
+
+Package: librados2-perl
+Architecture: any
+Depends: libc6 (>= 2.2.5),
+ libpve-access-control,
+ librados2 (>= 0.67.5),
+ perl (>= 5.20.1-5),
+ @PERLAPI@,
+Description: Perl bindings for librados
+ This package contains librados perl binding used by Proxmox VE.
diff --git a/copyright b/debian/copyright
similarity index 100%
rename from copyright
rename to debian/copyright
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..0c06312
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@
+
--
2.19.2
Thomas Lamprecht
2018-12-10 16:42:30 UTC
Permalink
Signed-off-by: Thomas Lamprecht <***@proxmox.com>
---
debian/control.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/control.in b/debian/control.in
index 64d4262..ec12fb6 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -8,10 +8,12 @@ Homepage: http://www.proxmox.com

Package: librados2-perl
Architecture: any
-Depends: libc6 (>= 2.2.5),
- libpve-access-control,
+Depends: libpve-access-control,
librados2 (>= 0.67.5),
perl (>= 5.20.1-5),
+ ${misc:Depends},
+ ${perl:Depends},
+ ${shlibs:Depends},
@PERLAPI@,
Description: Perl bindings for librados
This package contains librados perl binding used by Proxmox VE.
--
2.19.2
Thomas Lamprecht
2018-12-10 16:42:32 UTC
Permalink
Signed-off-by: Thomas Lamprecht <***@proxmox.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index d3be0d3..ad27550 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ CFLAGS= -shared -fPIC -O2 -Werror -Wtype-limits -Wall -Wl,-z,relro \
PERLSODIR=$(PERL_INSTALLVENDORARCH)/auto

ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-GITVERSION:=$(shell cat .git/refs/heads/master)
+GITVERSION:=$(shell git rev-parse HEAD)

DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
--
2.19.2
Loading...