]> git.proxmox.com Git - pve-docs.git/commitdiff
add new package to ship compiled docs
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 29 Apr 2016 09:22:28 +0000 (11:22 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 29 Apr 2016 09:22:28 +0000 (11:22 +0200)
Makefile
doc-debian/changelog [new file with mode: 0644]
doc-debian/compat [new file with mode: 0644]
doc-debian/control [new file with mode: 0644]
doc-debian/copyright [new file with mode: 0644]
doc-debian/install [new file with mode: 0644]
doc-debian/pve-docs.conf [new file with mode: 0644]
doc-debian/rules [new file with mode: 0755]

index 7590df3aba411095ea85b2dae2396b550ed529c6..840d1a2e7c647f000f62b3c67d35bf4a93cfb548 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,16 @@ DGDIR=.
 
 include ./pve-doc-generator.mk
 
 
 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)
 
 
 # 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 \
 
 COMMAND_LIST=          \
        pvesubscription \
@@ -36,7 +38,7 @@ SERVICE_LIST=         \
 
 CONFIG_LIST=datacenter.cfg qm.conf pct.conf
 
 
 CONFIG_LIST=datacenter.cfg qm.conf pct.conf
 
-DEB_SOURCES=                                   \
+GEN_DEB_SOURCES=                               \
        pve-doc-generator.mk                    \
        attributes.txt                          \
        $(addsuffix .adoc, ${COMMAND_LIST})     \
        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
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
 .PHONY: dinstall
-dinstall: ${DEB}
-       dpkg -i ${DEB}
+dinstall: ${GEN_DEB}
+       dpkg -i ${GEN_DEB}
+
 
 .PHONY: 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
        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
        cd build; dpkg-buildpackage -rfakeroot -b -us -uc
-       lintian ${DEB}
+       lintian ${GEN_DEB}
 
 .PHONY: upload
 
 .PHONY: upload
-upload: ${DEB}
+upload: ${GEN_DEB} ${DOC_DEB}
        umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o rw
        mkdir -p /pve/${DOCRELEASE}/extra
        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*
        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
 
        cd /pve/${DOCRELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
        umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o ro
 
diff --git a/doc-debian/changelog b/doc-debian/changelog
new file mode 100644 (file)
index 0000000..c06d77e
--- /dev/null
@@ -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
+
diff --git a/doc-debian/compat b/doc-debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/doc-debian/control b/doc-debian/control
new file mode 100644 (file)
index 0000000..3ffa04c
--- /dev/null
@@ -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.
diff --git a/doc-debian/copyright b/doc-debian/copyright
new file mode 100644 (file)
index 0000000..1b44193
--- /dev/null
@@ -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.
\ No newline at end of file
diff --git a/doc-debian/install b/doc-debian/install
new file mode 100644 (file)
index 0000000..1412e51
--- /dev/null
@@ -0,0 +1 @@
+/usr/share/
diff --git a/doc-debian/pve-docs.conf b/doc-debian/pve-docs.conf
new file mode 100644 (file)
index 0000000..2b9b8e1
--- /dev/null
@@ -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/
diff --git a/doc-debian/rules b/doc-debian/rules
new file mode 100755 (executable)
index 0000000..e6f2769
--- /dev/null
@@ -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