Index: univention-management-console-frontend/debian/control =================================================================== --- univention-management-console-frontend/debian/control (Revision 30688) +++ univention-management-console-frontend/debian/control (Arbeitskopie) @@ -47,18 +47,12 @@ corporate environments. For more information about UCS, refer to: http://www.univention.de/ -Package: univention-management-console-fontend-dev +Package: univention-management-console-frontend-doc Architecture: all Depends: ${misc:Depends}, - univention-dojo, - univention-management-console-dev, - imagemagick, - rsync -Description: UCS Management Console - development files - UCS Management Console is a web based program to manage computers. It has - an extensible architecture, using modules to implement its - features. This package is a meta package that contains dependencies - to packages that are necessary for the framework development. + univention-dojo-api-viewer +Description: Univention Management Console - Documentation + This package contains the api.xml file which is needet by univention-dojo-api-viewer . This package is part of Univention Corporate Server (UCS), an integrated, directory driven solution for managing Index: univention-management-console-frontend/debian/univention-management-console-frontend-doc.install =================================================================== --- univention-management-console-frontend/debian/univention-management-console-frontend-doc.install (Revision 0) +++ univention-management-console-frontend/debian/univention-management-console-frontend-doc.install (Revision 0) @@ -0,0 +1 @@ +/usr/share/univention-dojo-api-viewer Index: univention-management-console-frontend/debian/univention-management-console-frontend-doc.postinst =================================================================== --- univention-management-console-frontend/debian/univention-management-console-frontend-doc.postinst (Revision 0) +++ univention-management-console-frontend/debian/univention-management-console-frontend-doc.postinst (Revision 0) @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Univention Management Console Frontend Documentation +# postinst script for the debian package +# +# Copyright 2012 Univention GmbH +# +# http://www.univention.de/ +# +# All rights reserved. +# +# The source code of this program is made available +# under the terms of the GNU Affero General Public License version 3 +# (GNU AGPL V3) as published by the Free Software Foundation. +# +# Binary versions of this program provided by Univention to you as +# well as other copyrighted, protected or trademarked materials like +# Logos, graphics, fonts, specific documentations and configurations, +# cryptographic keys etc. are subject to a license agreement between +# you and Univention and not subject to the GNU AGPL V3. +# +# In the case you use this program under the terms of the GNU AGPL V3, +# the program is provided 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 with the Debian GNU/Linux or Univention distribution in file +# /usr/share/common-licenses/AGPL-3; if not, see +# . + +#DEBHELPER# + +if [ -r '/var/www/univention-management-console-doc/umc.xml' ]; then + chmod o+w /usr/share/univention-dojo-api-viewer/data || true + ln -s /usr/share/univention-dojo-api-viewer/umc.xml /var/www/umc.xml || true + + # We dont use --post-file here because of max_filesize in php.ini + wget -O - 'http://127.0.0.1/univention-management-console-doc/lib/upload.php' --post-data 'dir=UMC&api=http://127.0.0.1/umc.xml' > /dev/null 2>&1 || true + + unlink /usr/share/univention-dojo-api-viewer/umc.xml || true + chmod o-w /usr/share/univention-dojo-api-viewer/data || true + + # allow caching + chown www-data /usr/share/univention-dojo-api-viewer/data/UMC/cache/ || true +fi + +exit 0 Index: univention-management-console-frontend/Makefile =================================================================== --- univention-management-console-frontend/Makefile (Revision 30688) +++ univention-management-console-frontend/Makefile (Arbeitskopie) @@ -37,9 +37,13 @@ buildDir:=$(CURDIR)/build tmpDir:=$(buildDir)/_tmp$(timestamp) +# API viewer paths +TO_ROOT:=../../../../.. +DOJODIR:=/usr/share/univention-dojo + .PHONY: build build-dev build-common install clean jslint -build: build-common +build: build-common doc @# create a temp directory mkdir -p '$(tmpDir)' @# create the module umc.widgets containing a require for all umc widgets @@ -105,6 +109,13 @@ cp $$i "$(CURDIR)/umc/i18n/$$lang/app.json"; \ done +doc: + @# generate api.xml for univention-dojo-api-viewer + echo "location = $(TO_ROOT)$(CURDIR)/umc/" > "$(DOJODIR)/util/docscripts/modules/umc.module.properties"; + cd "$(DOJODIR)/util/docscripts/"; \ + php generate.php umc dojo dojox dijit --serialize=xml --outfile=../$(TO_ROOT)$(CURDIR)/umc --clean + rm -f "$(DOJODIR)/util/docscripts/modules/umc.module.properties" + i18n: /usr/bin/dh-umc-translate -p univention-management-console-frontend -o umc $(jsFiles) @@ -112,6 +123,9 @@ @# copy all files from the build directory .. exclude file of the tmp directory mkdir -p "$(DESTDIR)$(pkgDir)" rsync -rpl --exclude ".svn" --exclude "_tmp"'$(timestamp)' "$(buildDir)/" "$(DESTDIR)$(pkgDir)" + @# api files + mkdir -p "$(DESTDIR)/usr/share/univention-dojo-api-viewer" + mv -f umc.xml "$(DESTDIR)/usr/share/univention-dojo-api-viewer" clean: rm -rf build Index: univention-dojo/dojo_api.patch =================================================================== --- univention-dojo/dojo_api.patch (Revision 0) +++ univention-dojo/dojo_api.patch (Revision 0) @@ -0,0 +1,94 @@ +This patch fixes the htaccess and config of univention-dojo-api-viewer (Bug #23197). +Index: univention-dojo-api-viewer/config.php +=================================================================== +--- univention-dojo-api-viewer/config.php (Revision 804) ++++ univention-dojo-api-viewer/config.php (Arbeitskopie) +@@ -3,22 +3,22 @@ + # basePath should represent the path from the DOCUMENT_ROOT + # NOTE: to have the permalinks/REST-ful resource urls work, + # you'll need to make similar changes to the rewrite rules +-$basePath = "/"; ++$basePath = "/univention-management-console-doc/"; + +-//$_base_url = "http://" . $_SERVER["HTTP_HOST"] . $basePath; +-$_base_url = ""; +-$_site_name = "The Dojo Toolkit"; +-$defVersion = "1.4"; +-$dataDir = dirname(__FILE__) . "/data/"; ++$_base_url = "http://" . $_SERVER["HTTP_HOST"] . $basePath; ++$_site_name = 'Univention Management Console Frontend API Documentation'; ++$defVersion = "UMC"; ++$dataDir = "/var/www/univention-management-console-doc/data/"; + $defPage = ""; + $default_theme = "dtk"; + $theme = "dtk"; + $filter_privates = true; + $use_cache = true; + $modules = array( ++ "umc"=>-1, + "dojo"=>-1, + "dijit"=>-1, + "dojox"=>-1, +- "djConfig"=>-1 ++# "djConfig"=>-1, + ); + ?> +Index: univention-dojo-api-viewer/index.php +=================================================================== +--- univention-dojo-api-viewer/index.php (Revision 804) ++++ univention-dojo-api-viewer/index.php (Arbeitskopie) +@@ -75,7 +75,7 @@ + + + +- ++ + + + +Index: univention-dojo-api-viewer/lib/transform.php +=================================================================== +--- univention-dojo-api-viewer/lib/transform.php (Revision 804) ++++ univention-dojo-api-viewer/lib/transform.php (Arbeitskopie) +@@ -5,7 +5,7 @@ + * + * + */ +-if (isset($_SERVER['HTTP_HOST'])) { ++if (PHP_SAPI !== 'cli') { + die('Run from command line'); + } + +Index: univention-dojo-api-viewer/lib/spider.php +=================================================================== +--- univention-dojo-api-viewer/lib/spider.php (Revision 804) ++++ univention-dojo-api-viewer/lib/spider.php (Arbeitskopie) +@@ -38,7 +38,7 @@ + * + */ + +-if(isset($_SERVER['HTTP_HOST'])) { ++if(PHP_SAPI !== 'cli') { + die('Run from command line'); + } + +Index: univention-dojo-api-viewer/.htaccess +=================================================================== +--- univention-dojo-api-viewer/.htaccess (Revision 804) ++++ univention-dojo-api-viewer/.htaccess (Arbeitskopie) +@@ -1,14 +1,7 @@ +-# supress php errors +-php_flag display_startup_errors off +-php_flag display_errors on +-php_flag html_errors off +- +-Options -MultiViews +- + RewriteEngine On + + # Set the prefix for all matches +-RewriteBase / ++RewriteBase /univention-management-console-doc/ + + # convert static/rest-like requests + RewriteRule ^html/([0-9.]+)/(.*)\.html$ lib/item.php?v=$1&p=$2 [L,QSA] Index: univention-dojo/debian/univention-dojo-api-viewer.postinst =================================================================== --- univention-dojo/debian/univention-dojo-api-viewer.postinst (Revision 0) +++ univention-dojo/debian/univention-dojo-api-viewer.postinst (Revision 0) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Univention Dojo API-Viewer +# postinst script for the debian package +# +# Copyright 2012 Univention GmbH +# +# http://www.univention.de/ +# +# All rights reserved. +# +# The source code of this program is made available +# under the terms of the GNU Affero General Public License version 3 +# (GNU AGPL V3) as published by the Free Software Foundation. +# +# Binary versions of this program provided by Univention to you as +# well as other copyrighted, protected or trademarked materials like +# Logos, graphics, fonts, specific documentations and configurations, +# cryptographic keys etc. are subject to a license agreement between +# you and Univention and not subject to the GNU AGPL V3. +# +# In the case you use this program under the terms of the GNU AGPL V3, +# the program is provided 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 with the Debian GNU/Linux or Univention distribution in file +# /usr/share/common-licenses/AGPL-3; if not, see +# . + +#DEBHELPER# + +/etc/init.d/apache2 restart || true +exit 0 Index: univention-dojo/debian/control =================================================================== --- univention-dojo/debian/control (Revision 30565) +++ univention-dojo/debian/control (Arbeitskopie) @@ -19,3 +19,14 @@ univention-dojo Description: The Dojo Toolkit, utilility functions and tools This package contains utility functions and tools of the Dojo Toolkit + +Package: univention-dojo-api-viewer +Architecture: all +Depends: ${misc:Depends}, + php5-curl, + php5-xsl, + univention-dojo, + univention-management-console-frontend +Description: The Dojo Documentation API Viewer + This package contains a patched version of the Dojo Documentation + API Viewer from https://svn.dojotoolkit.org/website/trunk/api Index: univention-dojo/debian/univention-dojo-api-viewer.install =================================================================== --- univention-dojo/debian/univention-dojo-api-viewer.install (Revision 0) +++ univention-dojo/debian/univention-dojo-api-viewer.install (Revision 0) @@ -0,0 +1,2 @@ +/usr/share/univention-dojo-api-viewer +icon/dojo-api.png /var/www/icon/ Index: univention-dojo/debian/univention-dojo-api-viewer.univention-config-registry =================================================================== --- univention-dojo/debian/univention-dojo-api-viewer.univention-config-registry (Revision 0) +++ univention-dojo/debian/univention-dojo-api-viewer.univention-config-registry (Revision 0) @@ -0,0 +1,16 @@ +Type: file +File: etc/apache2/sites-available/univention-management-console-doc + +Type: multifile +Multifile: var/www/ucs-overview/de.html + +Type: multifile +Multifile: var/www/ucs-overview/en.html + +Type: subfile +Multifile: var/www/ucs-overview/de.html +Subfile: var/www/ucs-overview/de.html.d/40dojo-api-viewer-de.html + +Type: subfile +Multifile: var/www/ucs-overview/en.html +Subfile: var/www/ucs-overview/en.html.d/40dojo-api-viewer-en.html Index: univention-dojo/debian/copyright =================================================================== --- univention-dojo/debian/copyright (Revision 30565) +++ univention-dojo/debian/copyright (Arbeitskopie) @@ -197,7 +197,7 @@ permission of its copyright owner. ------------------------------------------------------- -------------------------------------------------- -Copyright 2008-2011 Univention GmbH +Copyright 2008-2012 Univention GmbH http://www.univention.de/ Index: univention-dojo/debian/rules =================================================================== --- univention-dojo/debian/rules (Revision 30565) +++ univention-dojo/debian/rules (Arbeitskopie) @@ -3,7 +3,7 @@ # Univention Dojo Package # rules file for generating the deb package # -# Copyright 2008-2011 Univention GmbH +# Copyright 2008-2012 Univention GmbH # # http://www.univention.de/ # @@ -34,6 +34,10 @@ ucslint dh_auto_test +override_dh_auto_install: + univention-install-config-registry + dh_auto_install + %: dh $@ Index: univention-dojo/debian/univention-dojo-api-viewer.links =================================================================== --- univention-dojo/debian/univention-dojo-api-viewer.links (Revision 0) +++ univention-dojo/debian/univention-dojo-api-viewer.links (Revision 0) @@ -0,0 +1,2 @@ +usr/share/univention-dojo-api-viewer/ var/www/univention-management-console-doc +etc/apache2/sites-available/univention-management-console-doc etc/apache2/sites-enabled/univention-management-console-doc Index: univention-dojo/create_api_archive.sh =================================================================== --- univention-dojo/create_api_archive.sh (Revision 0) +++ univention-dojo/create_api_archive.sh (Revision 0) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# +# script for checkout and tar latest dojo api viewer +# +# Copyright 2012 Univention GmbH +# +# http://www.univention.de/ +# +# All rights reserved. +# +# The source code of this program is made available +# under the terms of the GNU Affero General Public License version 3 +# (GNU AGPL V3) as published by the Free Software Foundation. +# +# Binary versions of this program provided by Univention to you as +# well as other copyrighted, protected or trademarked materials like +# Logos, graphics, fonts, specific documentations and configurations, +# cryptographic keys etc. are subject to a license agreement between +# you and Univention and not subject to the GNU AGPL V3. +# +# In the case you use this program under the terms of the GNU AGPL V3, +# the program is provided 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 with the Debian GNU/Linux or Univention distribution in file +# /usr/share/common-licenses/AGPL-3; if not, see +# . + +svn export https://svn.dojotoolkit.org/website/trunk/api univention-dojo-api-viewer +VERSION=$(svn info univention-dojo-api-viewer | grep -m1 'Revision:' | sed -n 's/^Revision: \(.*\)$/\1/') +tar czf "univention-dojo-api-viewer-r$VERSION.tar.gz" univention-dojo-api-viewer + Index: univention-dojo/conffiles/var/www/ucs-overview/en.html.d/40dojo-api-viewer-en.html =================================================================== --- univention-dojo/conffiles/var/www/ucs-overview/en.html.d/40dojo-api-viewer-en.html (Revision 0) +++ univention-dojo/conffiles/var/www/ucs-overview/en.html.d/40dojo-api-viewer-en.html (Revision 0) @@ -0,0 +1,5 @@ + + +Univention Management Console API +UMC javascript documentation + Index: univention-dojo/conffiles/var/www/ucs-overview/de.html.d/40dojo-api-viewer-de.html =================================================================== --- univention-dojo/conffiles/var/www/ucs-overview/de.html.d/40dojo-api-viewer-de.html (Revision 0) +++ univention-dojo/conffiles/var/www/ucs-overview/de.html.d/40dojo-api-viewer-de.html (Revision 0) @@ -0,0 +1,5 @@ + + +Univention Management Console API +UMC Javascript Dokumentation + Index: univention-dojo/Makefile =================================================================== --- univention-dojo/Makefile (Revision 30565) +++ univention-dojo/Makefile (Arbeitskopie) @@ -3,7 +3,7 @@ # Univention Dojo Package # Makefile for building/installing the package # -# Copyright 2008-2011 Univention GmbH +# Copyright 2008-2012 Univention GmbH # # http://www.univention.de/ # @@ -40,9 +40,10 @@ DOJO_VERSION=$(shell find . -maxdepth 1 -name "dojo-release*-src.tar.gz" | sort -r | sed -n '1 s/^.*dojo-release-\(.*\)-src.tar.gz$$/\1/ p') DOJO_DIR=dojo-release-$(DOJO_VERSION)-src +API_VERSION=$(shell find . -maxdepth 1 -name "univention-dojo-api-viewer-r*.tar.gz" | sort -r | sed -n '1 s/^.*univention-dojo-api-viewer-r\(.*\).tar.gz$$/\1/ p') .PHONY: clean all install -build: $(DOJO_DIR) +build: $(DOJO_DIR) apiviewer $(DOJO_DIR): tar xzf $@.tar.gz @@ -57,10 +58,15 @@ patch -p0 < fix_dojoStoreMemory.patch patch -p0 < fix_dijit_Templated.patch +apiviewer: + tar -xzf "univention-dojo-api-viewer-r$(API_VERSION).tar.gz" --exclude='tests' --exclude='install' --exclude='data/*' + patch -p0 < dojo_api.patch + all: install clean: rm -rf $(DOJO_DIR) + rm -rf univention-dojo-api-viewer install: build @# main directory @@ -75,4 +81,5 @@ [ "$${i%.sh}" != "$$i" ] && mod=0755; \ install -m $$mod "$(DOJO_DIR)/$$i" "$(DESTDIR)$(INSTDIR)/$$i"; \ done - + @# install api-viewer + cp -r univention-dojo-api-viewer "$(DESTDIR)/usr/share/univention-dojo-api-viewer"