5
0
mirror of git://git.proxmox.com/git/pve-docs.git synced 2025-03-19 18:50:06 +03:00

add new package to ship compiled docs

This commit is contained in:
Dietmar Maurer 2016-04-29 11:22:28 +02:00
parent 2134d14c27
commit 9015f48fde
8 changed files with 123 additions and 15 deletions

View File

@ -2,14 +2,16 @@ DGDIR=.
include ./pve-doc-generator.mk
PACKAGE=pve-doc-generator
GEN_PACKAGE=pve-doc-generator
DOC_PACKAGE=pve-docs
# also update debian/changelog
PKGREL=1
GITVERSION:=$(shell cat .git/refs/heads/master)
DEB=${PACKAGE}_${DOCRELEASE}-${PKGREL}_amd64.deb
GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_amd64.deb
DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
COMMAND_LIST= \
pvesubscription \
@ -36,7 +38,7 @@ SERVICE_LIST= \
CONFIG_LIST=datacenter.cfg qm.conf pct.conf
DEB_SOURCES= \
GEN_DEB_SOURCES= \
pve-doc-generator.mk \
attributes.txt \
$(addsuffix .adoc, ${COMMAND_LIST}) \
@ -158,29 +160,61 @@ pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES}
test -n "$${NOVIEW}" || $(BROWSER) $@ &
.PHONY: dinstall
dinstall: ${DEB}
dpkg -i ${DEB}
dinstall: ${GEN_DEB}
dpkg -i ${GEN_DEB}
.PHONY: deb
${DEB} deb: ${DEB_SOURCES}
deb:
rm -f ${GEN_DEB} ${DOC_DEB};
make ${GEN_DEB};
make ${DOC_DEB};
DOC_DEB_FILES= \
$(addsuffix .1.html, ${COMMAND_LIST}) \
$(addsuffix .8.html, ${SERVICE_LIST}) \
$(addsuffix .5.html, ${CONFIG_LIST}) \
pve-admin-guide.pdf \
pve-admin-guide.html \
pve-admin-guide.epub \
index.html
${DOC_DEB}: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
$(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
$(MAKE) NOVIEW=1 $(addsuffix .1.html, ${COMMAND_LIST}) $(addsuffix .8.html, ${SERVICE_LIST}) $(addsuffix .5.html, ${CONFIG_LIST})
asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc
rm -rf build
mkdir build
rsync -a doc-debian/ build/debian
mkdir -p build/usr/share/${DOC_PACKAGE}
mkdir -p build/usr/share/doc/${DOC_PACKAGE}
echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${DOC_PACKAGE}/SOURCE
# install doc files
install -m 0644 ${DOC_DEB_FILES} build/usr/share/${DOC_PACKAGE}
install -m 0644 index.html build/usr/share/${DOC_PACKAGE}
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
lintian ${DOC_DEB}
${GEN_DEB}: ${GEN_DEB_SOURCES}
rm -rf build
mkdir build
rsync -a debian/ build/debian
mkdir -p build/usr/share/${PACKAGE}
mkdir -p build/usr/share/doc/${PACKAGE}
echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${PACKAGE}/SOURCE
install -m 0644 ${DEB_SOURCES} build/usr/share/${PACKAGE}
install -m 0755 ${GEN_SCRIPTS} build/usr/share/${PACKAGE}
mkdir -p build/usr/share/${GEN_PACKAGE}
mkdir -p build/usr/share/doc/${GEN_PACKAGE}
echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${GEN_PACKAGE}/SOURCE
install -m 0644 ${GEN_DEB_SOURCES} build/usr/share/${GEN_PACKAGE}
install -m 0755 ${GEN_SCRIPTS} build/usr/share/${GEN_PACKAGE}
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
lintian ${DEB}
lintian ${GEN_DEB}
.PHONY: upload
upload: ${DEB}
upload: ${GEN_DEB} ${DOC_DEB}
umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o rw
mkdir -p /pve/${DOCRELEASE}/extra
rm -f /pve/${DOCRELEASE}/extra/${PACKAGE}_*.deb
rm -f /pve/${DOCRELEASE}/extra/${GEN_PACKAGE}_*.deb
rm -f /pve/${DOCRELEASE}/extra/${DOC_PACKAGE}_*.deb
rm -f /pve/${DOCRELEASE}/extra/Packages*
cp ${DEB} /pve/${DOCRELEASE}/extra
cp ${GEN_DEB} ${DOC_DEB} /pve/${DOCRELEASE}/extra
cd /pve/${DOCRELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o ro

6
doc-debian/changelog Normal file
View File

@ -0,0 +1,6 @@
pve-docs (4.2-1) unstable; urgency=medium
* first release
-- Proxmox Support Team <support@proxmox.com> Fri, 29 Apr 2016 10:01:01 +0200

1
doc-debian/compat Normal file
View File

@ -0,0 +1 @@
9

14
doc-debian/control Normal file
View File

@ -0,0 +1,14 @@
Source: pve-docs
Section: perl
Priority: extra
Maintainer: Proxmox Support Team <support@proxmox.com>
Build-Depends: debhelper (>= 7.0.50~), lintian
Standards-Version: 3.8.4
Package: pve-docs
Section: doc
Priority: optional
Architecture: all
Depends: apache2
Description: Proxmox VE Documentation
This package contains the Proxmox VE Documentation files.

34
doc-debian/copyright Normal file
View File

@ -0,0 +1,34 @@
Coryright for files in debian/*:
Copyright (C) 2016 Proxmox Server Solutions GmbH
This software is written by Proxmox Server Solutions GmbH
<support@proxmox.com>
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/>.
All documentation files (*.adoc, *.html, *.pdf) are release under:
Copyright (C) 2016 Proxmox Server Solutions GmbH
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
You can find a copy of the license in /usr/share/common-licenses/GFDL.

1
doc-debian/install Normal file
View File

@ -0,0 +1 @@
/usr/share/

7
doc-debian/pve-docs.conf Normal file
View File

@ -0,0 +1,7 @@
<Directory /usr/share/pve-docs>
AllowOverride None
Order allow,deny
allow from all
</Directory>
Alias /pve-docs /usr/share/pve-docs/

11
doc-debian/rules Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
override_dh_install:
dh_install
install -D -m 0644 debian/pve-docs.conf $(destdir)/etc/apache2/sites-available/pve-docs.conf