From 720776b81e9697cf858dea684ff44498268142e0 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 13 Dec 2019 14:14:28 +0100 Subject: [PATCH] generate separate proxmox-backup-docs package --- Makefile | 9 ++++++++- debian/control | 10 ++++++++++ defines.mk | 1 + docs/Makefile | 21 ++++++++++++++++++++- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 634745b8b..a6c746c23 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ COMPILED_BINS := \ DEBS= ${PACKAGE}-server_${PKGVER}-${PKGREL}_${ARCH}.deb ${PACKAGE}-client_${PKGVER}-${PKGREL}_${ARCH}.deb +DOC_DEB=${PACKAGE}-docs_${PKGVER}-${PKGREL}_all.deb DESTDIR= @@ -63,10 +64,16 @@ build: $(foreach i,$(SUBDIRS), \ $(MAKE) -C build/$(i) clean ;) +.PHONY: proxmox-backup-docs +proxmox-backup-docs: $(DOC_DEB) +$(DOC_DEB): build + cd build; dpkg-buildpackage -b -us -uc --no-pre-clean + lintian $(DOC_DEB) + .PHONY: deb deb: $(DEBS) $(DEBS): build - cd build; dpkg-buildpackage -b -us -uc --no-pre-clean + cd build; dpkg-buildpackage -b -us -uc --no-pre-clean --build-profiles=nodoc lintian $(DEBS) .PHONY: dsc diff --git a/debian/control b/debian/control index 60fc5dbe0..1e94ea3ac 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,7 @@ Standards-Version: 3.9.5 Homepage: https://www.proxmox.com Package: proxmox-backup-server +Build-Profiles: Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libjs-extjs (>= 6.0.1), @@ -29,8 +30,17 @@ Description: Proxmox Backup Server daemon with tools and GUI tools. This includes a web-based graphical user interface. Package: proxmox-backup-client +Build-Profiles: Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, Description: Proxmox Backup Client tools This package contains the Proxmox Backup client, which provides a simple command line tool to create and restore backups. + +Package: proxmox-backup-docs +Build-Profiles: +Section: doc +Depends: libjs-extjs +Architecture: all +Description: Proxmox Backup Documentation + This package contains the Proxmox Backup Documentation files. diff --git a/defines.mk b/defines.mk index 31a8cdaaf..97723eeae 100644 --- a/defines.mk +++ b/defines.mk @@ -9,6 +9,7 @@ LIBDIR = $(PREFIX)/lib LIBEXECDIR = $(LIBDIR) DATAROOTDIR = $(PREFIX)/share MAN1DIR = $(PREFIX)/share/man/man1 +DOCDIR = $(PREFIX)/share/doc/${PACKAGE} JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup SYSCONFDIR = /etc diff --git a/docs/Makefile b/docs/Makefile index e74939875..c31265b5a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -87,6 +87,25 @@ epub3: ${GENERATED_SYNOPSIS} clean: rm -r -f *~ *.1 ${BUILDDIR} ${GENERATED_SYNOPSIS} -install: ${MANUAL_PAGES} + +install_manual_pages: ${MANUAL_PAGES} install -dm755 $(DESTDIR)$(MAN1DIR) for i in ${MANUAL_PAGES}; do install -m755 $$i $(DESTDIR)$(MAN1DIR)/ ; done + +install_html: html + install -dm755 $(DESTDIR)$(DOCDIR) + rsync -a output/html $(DESTDIR)$(DOCDIR) + +install_pdf: latexpdf + install -dm755 $(DESTDIR)$(DOCDIR) + install -m 0644 output/latex/ProxmoxBackup.pdf $(DESTDIR)$(DOCDIR)/proxmox-backup.pdf + +ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) + +install: install_manual_pages + +else + +install: install_manual_pages install_html install_pdf + +endif