]> git.proxmox.com Git - proxmox-backup.git/commitdiff
various packaging fixes, bump version
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 20 Dec 2019 08:34:14 +0000 (09:34 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 20 Dec 2019 11:55:32 +0000 (12:55 +0100)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Makefile
debian/changelog
debian/control
debian/proxmox-backup-docs.docs [new file with mode: 0644]
debian/rules
defines.mk
docs/Makefile

index 15210c2d665b838c06ac38b10c29aafa04569232..93fb19ab92090b78b089117eff895fe807192650 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
+include /usr/share/dpkg/default.mk
 include defines.mk
 
-ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-GITVERSION:=$(shell git rev-parse HEAD)
+PACKAGE := $(DEB_SOURCE)
+ARCH := $(DEB_BUILD_ARCH)
 
 SUBDIRS := etc www docs
 
@@ -29,12 +30,16 @@ ifeq ($(valgrind), yes)
 CARGO_BUILD_ARGS += --features valgrind
 endif
 
+CARGO ?= cargo
+
 COMPILED_BINS := \
        $(addprefix $(COMPILEDIR)/,$(USR_BIN) $(USR_SBIN) $(SERVICE_BIN))
 
-DEBS= ${PACKAGE}-server_${PKGVER}-${PKGREL}_${ARCH}.deb ${PACKAGE}-client_${PKGVER}-${PKGREL}_${ARCH}.deb
+DEBS= ${PACKAGE}-server_${DEB_VERSION}_${ARCH}.deb ${PACKAGE}-client_${DEB_VERSION}_${ARCH}.deb
+
+DOC_DEB=${PACKAGE}-docs_${DEB_VERSION}_all.deb
 
-DOC_DEB=${PACKAGE}-docs_${PKGVER}-${PKGREL}_all.deb
+DSC = ${PACKAGE}_${DEB_VERSION}.dsc
 
 DESTDIR=
 
@@ -47,20 +52,18 @@ $(SUBDIRS):
 test:
        #cargo test test_broadcast_future
        #cargo test $(CARGO_BUILD_ARGS)
-       cargo test $(tests) $(CARGO_BUILD_ARGS)
+       $(CARGO) test $(tests) $(CARGO_BUILD_ARGS)
 
 doc:
-       cargo doc --no-deps $(CARGO_BUILD_ARGS)
+       $(CARGO) doc --no-deps $(CARGO_BUILD_ARGS)
 
 # always re-create this dir
-# but also copy the local target/ dir as a build-cache
 .PHONY: build
 build:
        rm -rf build
-       cargo build --release --lib
-       rsync -a debian Makefile defines.mk Cargo.toml Cargo.lock \
+       rsync -a debian Makefile defines.mk Cargo.toml \
            src $(SUBDIRS) \
-           target tests build/
+           tests build/
        $(foreach i,$(SUBDIRS), \
            $(MAKE) -C build/$(i) clean ;)
 
@@ -70,6 +73,7 @@ $(DOC_DEB): build
        cd build; dpkg-buildpackage -b -us -uc --no-pre-clean
        lintian $(DOC_DEB)
 
+# copy the local target/ dir as a build-cache
 .PHONY: deb
 deb: $(DEBS)
 $(DEBS): build
@@ -87,7 +91,7 @@ distclean: clean
 clean:
        $(foreach i,$(SUBDIRS), \
            $(MAKE) -C $(i) clean ;)
-       cargo clean
+       $(CARGO) clean
        rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes build
        find . -name '*~' -exec rm {} ';'
 
@@ -100,7 +104,7 @@ docs: cargo-build
 
 .PHONY: cargo-build
 cargo-build:
-       cargo build $(CARGO_BUILD_ARGS)
+       $(CARGO) build $(CARGO_BUILD_ARGS)
 
 $(COMPILED_BINS): cargo-build
 
index dd39a099186c554f495a47d8e6caffde8e2bf5ae..b64be3890ef41d59b35d547c6328f86b429534ca 100644 (file)
@@ -1,3 +1,11 @@
+proxmox-backup (0.1.0) unstable; urgency=medium
+
+  * proper packaging of build-dependencies
+
+  * cleanup packaging
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 20 Dec 2019 09:30:06 +0100
+
 proxmox-backup (0.1-1) unstable; urgency=medium
 
   [ Proxmox Support Team ]
index f280164c6b81fde448a0efcf309270c26a6e30c8..b9e40433eec732b3bd78086952f35f782dfea5aa 100644 (file)
@@ -75,7 +75,6 @@ Standards-Version: 4.3.0
 Homepage: https://www.proxmox.com
 
 Package: proxmox-backup-server
-Build-Profiles: <nodoc>
 Architecture: any
 Depends: fonts-font-awesome,
          libjs-extjs (>= 6.0.1),
@@ -89,7 +88,6 @@ Description: Proxmox Backup Server daemon with tools and GUI
  tools. This includes a web-based graphical user interface.
 
 Package: proxmox-backup-client
-Build-Profiles: <nodoc>
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Description: Proxmox Backup Client tools
@@ -99,7 +97,8 @@ Description: Proxmox Backup Client tools
 Package: proxmox-backup-docs
 Build-Profiles: <!nodoc>
 Section: doc
-Depends: libjs-extjs
+Depends: libjs-extjs,
+         ${misc:Depends},
 Architecture: all
 Description: Proxmox Backup Documentation
  This package contains the Proxmox Backup Documentation files.
diff --git a/debian/proxmox-backup-docs.docs b/debian/proxmox-backup-docs.docs
new file mode 100644 (file)
index 0000000..a82fd45
--- /dev/null
@@ -0,0 +1,2 @@
+/usr/share/doc/proxmox-backup/html
+/usr/share/doc/proxmox-backup/proxmox-backup.pdf
index 0e90b81e81a7e2f63473ff8d9ee42bd5ddbdd537..9f5cc20aa8f5c48b28a4839ca7e34db229680554 100755 (executable)
@@ -1,13 +1,31 @@
 #!/usr/bin/make -f
 # See debhelper(7) (uncomment to enable)
 # output every command that modifies files on the build system.
-#DH_VERBOSE = 1
+DH_VERBOSE = 1
+
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/rustc/architecture.mk
 
 export BUILD_MODE=release
 
+CARGO=/usr/share/cargo/bin/cargo
+
+export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
+export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
+export CARGO_HOME = $(CURDIR)/debian/cargo_home
+
+export DEB_CARGO_CRATE=proxmox-backup_$(DEB_VERSION_UPSTREAM)
+export DEB_CARGO_PACKAGE=proxmox-backup
+
 %:
        dh $@ --with=bash-completion
 
+override_dh_auto_configure:
+       sed -ie 's!proxmox = { git = "ssh://gitolite3@proxdev.maurer-it.com/rust/proxmox",!proxmox = {!' Cargo.toml
+       sed -ie 's!valgrind.*!!' Cargo.toml
+       $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
+       dh_auto_configure
+
 override_dh_auto_build:
        dh_auto_build -- \
            PROXY_USER=backup \
index 97723eeaee760c284b12f60b8e8d6ceeb7a7dfb2..cd89fa1defa2f1cfb7958e6640ec2a77ae4c05e7 100644 (file)
@@ -1,7 +1,3 @@
-PACKAGE := proxmox-backup
-PKGVER := 0.1
-PKGREL := 1
-
 PREFIX = /usr
 BINDIR = $(PREFIX)/bin
 SBINDIR = $(PREFIX)/sbin
@@ -9,7 +5,7 @@ LIBDIR = $(PREFIX)/lib
 LIBEXECDIR = $(LIBDIR)
 DATAROOTDIR = $(PREFIX)/share
 MAN1DIR = $(PREFIX)/share/man/man1
-DOCDIR = $(PREFIX)/share/doc/${PACKAGE}
+DOCDIR = $(PREFIX)/share/doc/proxmox-backup
 JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup
 SYSCONFDIR = /etc
 
index c31265b5a45e9761809ea6b1a26bef0fb003f4ee..ec93edb40e912c470c917d7a9a62181eef4949b0 100644 (file)
@@ -94,7 +94,7 @@ install_manual_pages: ${MANUAL_PAGES}
 
 install_html: html
        install -dm755 $(DESTDIR)$(DOCDIR)
-       rsync -a output/html $(DESTDIR)$(DOCDIR)
+       rsync -a ${BUILDDIR}/html $(DESTDIR)$(DOCDIR)
 
 install_pdf: latexpdf
        install -dm755 $(DESTDIR)$(DOCDIR)