bareos-webui: Finished package for testing, proper configuration file handling

This commit is contained in:
Matthias Petermann 2020-11-13 16:44:23 +01:00
parent 317152634c
commit f440556681
4 changed files with 75 additions and 33 deletions

View File

@ -33,7 +33,7 @@ http {
charset utf-8;
root ${PREFIX}/share/bareos-webui;
root ${PREFIX}/share/bareos-webui/public
index index.php;
location / {

View File

@ -12,14 +12,25 @@ MASTER_SITES= ${MASTER_SITE_GITHUB:=bareos/}
MAINTAINER= mp@petermann-it.de
HOMEPAGE= http://www.bareos.org/
COMMENT= Backup Archiving REcovery Open Sourced - Web UI
COMMENT= PHP-Frontend to monitor and manage Bareos
LICENSE= gnu-agpl-v3
DEPENDS+= ${PHP_PKG_PREFIX}-bz2>=5.4.0:../../archivers/php-bz2
DEPENDS+= ${PHP_PKG_PREFIX}-curl>=5.4.0:../../www/php-curl
DEPENDS+= ${PHP_PKG_PREFIX}-gd>=5.4.0:../../graphics/php-gd
DEPENDS+= ${PHP_PKG_PREFIX}-iconv>=5.4.0:../../converters/php-iconv
DEPENDS+= ${PHP_PKG_PREFIX}-json>=5.4.0:../../textproc/php-json
DEPENDS+= ${PHP_PKG_PREFIX}-mbstring>=5.4.0:../../converters/php-mbstring
DEPENDS+= ${PHP_PKG_PREFIX}-zip>=5.4.0:../../archivers/php-zip
DEPENDS+= ${PHP_PKG_PREFIX}-intl>=5.4.0:../../textproc/php-intl
DEPENDS+= ${PHP_PKG_PREFIX}-gettext>=5.4.0:../../devel/php-gettext
USE_LANGUAGES= # none
NO_CONFIGURE= yes
NO_BUILD= yes
USE_TOOLS+= bash:run pax perl:run
USE_TOOLS+= pax
WEBUI_DIR= share/bareos-webui
@ -27,26 +38,71 @@ WEBUI_DIR= share/bareos-webui
APACHE_USER?= nginx
APACHE_GROUP?= nginx
BUILD_DEFS+= APACHE_GROUP APACHE_USER
PKG_GROUPS= ${APACHE_GROUP}
PKG_USERS= ${APACHE_USER}:${APACHE_GROUP}
PKG_USERS_VARS= APACHE_USER
PKG_GROUPS_VARS= APACHE_GROUP
BUILD_DEFS+= APACHE_GROUP APACHE_USER
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-install
SUBST_FILES.paths= webui/config/autoload/global.php
SUBST_FILES.paths+= webui/install/directors.ini
SUBST_FILES.paths+= webui/install/configuration.ini
SUBST_FILES.paths+= webui/install/apache/bareos-webui.conf
SUBST_FILES.paths+= webui/install/nginx/bareos-webui.conf
SUBST_SED.paths= -e 's,@WEBUICONFDIR@,${PKG_SYSCONFDIR},g'
SUBST_SED.paths+= -e 's,/usr/share/bareos-webui,${PREFIX}/share/bareos-webui,g'
SUBST_SED.paths+= -e 's,/var/www/bareos-webui,${PREFIX}/share/bareos-webui,g'
SUBST_CLASSES+= ports
SUBST_STAGE.ports= pre-install
SUBST_FILES.ports= webui/config/autoload/global.php
SUBST_FILES.ports+= webui/install/directors.ini
SUBST_SED.ports= -e 's,@dirport@,9101,g'
SUBST_CLASSES+= version
SUBST_STAGE.version= pre-install
SUBST_FILES.version= webui/version.php
SUBST_SED.version= -e 's,@BAREOS_FULL_VERSION@,${VERSION},g'
FILES_SUBST+= WWWGRP=${APACHE_GROUP} WWWOWN=${APACHE_USER} \
WEBUI_DIR=${WEBUI_DIR}
do-install:
EGDIR= ${PREFIX}/share/examples/bareos-webui
CONF_FILES+= ${EGDIR}/directors.ini ${PKG_SYSCONFDIR}/directors.ini
CONF_FILES+= ${EGDIR}/configuration.ini ${PKG_SYSCONFDIR}/configuration.ini
post-extract:
${MV} ${WRKSRC}/webui/version.php.in ${WRKSRC}/webui/version.php
${MV} ${WRKSRC}/webui/config/autoload/global.php.in ${WRKSRC}/webui/config/autoload/global.php
${MV} ${WRKSRC}/webui/module/Application/view/layout/layout.phtml.in ${WRKSRC}/webui/module/Application/view/layout/layout.phtml
${MV} ${WRKSRC}/webui/module/Application/view/layout/login.phtml.in ${WRKSRC}/webui/module/Application/view/layout/login.phtml
${MV} ${WRKSRC}/webui/install/directors.ini.in ${WRKSRC}/webui/install/directors.ini
${MV} ${WRKSRC}/webui/install/configuration.ini.in ${WRKSRC}/webui/install/configuration.ini
do-install:
cd ${WRKSRC} && ${FIND} webui -type f \
\! -name '.*' \
\! -name 'CMakeLists.txt' \
\! -path 'webui/phpunit.xml' \
\! -path 'webui/debian/*' \
\! -path 'webui/doc/*' \
\! -path 'webui/cmake/*' \
\! -path 'webui/doxygen/*' \
\! -path 'webui/install/*' \
\! -path 'webui/packaging/*' \
\! -path 'webui/scripts/*' \
\! -path 'webui/tests/*' \
-print | \
pax -rw -pmp ${DESTDIR}${PREFIX}/share
cd ${DESTDIR}${PREFIX}/share && mv webui bareos-webui
cd ${WRKSRC}/webui/install && ${FIND} . -type f -print | \
pax -rw -pmp ${DESTDIR}${PREFIX}/share/examples/bareos-webui
cd ${WRKSRC}/webui/doc && ${FIND} . -type f -print | \
pax -rw -pmp ${DESTDIR}${PREFIX}/share/doc/bareos-webui
.include "../../lang/php/phpversion.mk"
.include "../../mk/bsd.pkg.mk"

View File

@ -4,18 +4,8 @@ share/bareos-webui/README.md
share/bareos-webui/composer.json
share/bareos-webui/config/application.config.php
share/bareos-webui/config/autoload/README.md
share/bareos-webui/config/autoload/global.php.in
share/bareos-webui/doc/README-INSTALLATION.md
share/bareos-webui/doc/README-TRANSLATION.md
share/bareos-webui/config/autoload/global.php
share/bareos-webui/init_autoloader.php
share/bareos-webui/install/apache/bareos-webui.conf
share/bareos-webui/install/bareos/bareos-dir.d/console/admin.conf.example
share/bareos-webui/install/bareos/bareos-dir.d/profile/webui-admin.conf
share/bareos-webui/install/bareos/bareos-dir.d/profile/webui-limited.conf.example
share/bareos-webui/install/bareos/bareos-dir.d/profile/webui-readonly.conf
share/bareos-webui/install/configuration.ini.in
share/bareos-webui/install/directors.ini.in
share/bareos-webui/install/nginx/bareos-webui.conf
share/bareos-webui/module/Application/Module.php
share/bareos-webui/module/Application/autoload_classmap.php
share/bareos-webui/module/Application/config/commands.csv
@ -63,8 +53,8 @@ share/bareos-webui/module/Application/view/error/index.phtml
share/bareos-webui/module/Application/view/layout/error.phtml
share/bareos-webui/module/Application/view/layout/install.phtml
share/bareos-webui/module/Application/view/layout/json.phtml
share/bareos-webui/module/Application/view/layout/layout.phtml.in
share/bareos-webui/module/Application/view/layout/login.phtml.in
share/bareos-webui/module/Application/view/layout/layout.phtml
share/bareos-webui/module/Application/view/layout/login.phtml
share/bareos-webui/module/Application/view/partial/breadcrumb.phtml
share/bareos-webui/module/Application/view/partial/paginator.phtml
share/bareos-webui/module/Auth/Module.php
@ -179,10 +169,6 @@ share/bareos-webui/module/Storage/src/Storage/Model/StorageModel.php
share/bareos-webui/module/Storage/view/storage/storage/details.phtml
share/bareos-webui/module/Storage/view/storage/storage/index.phtml
share/bareos-webui/module/Storage/view/storage/storage/status.phtml
share/bareos-webui/packaging/obs/bareos-webui.dsc
share/bareos-webui/packaging/obs/bareos-webui.spec
share/bareos-webui/packaging/obs/debian.debtransform
share/bareos-webui/phpunit.xml
share/bareos-webui/public/css/32px.png
share/bareos-webui/public/css/40px.png
share/bareos-webui/public/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf
@ -267,14 +253,6 @@ share/bareos-webui/public/js/partials/i_gettext.min.js.map
share/bareos-webui/public/js/respond.min.js
share/bareos-webui/public/js/responsive.bootstrap.js
share/bareos-webui/public/js/responsive.bootstrap.min.js
share/bareos-webui/scripts/localization_update.sh
share/bareos-webui/tests/phpunit/Bootstrap.php
share/bareos-webui/tests/regress/webui-bsock-connection-test-tls.in
share/bareos-webui/tests/regress/webui-bsock-connection-test-tls.php.in
share/bareos-webui/tests/regress/webui-bsock-connection-test.in
share/bareos-webui/tests/regress/webui-bsock-connection-test.php
share/bareos-webui/tests/selenium/README.md
share/bareos-webui/tests/selenium/webui-selenium-test.py
share/bareos-webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php
share/bareos-webui/vendor/Bareos/library/Bareos/BSock/BareosBSockAbstractServiceFactory.php
share/bareos-webui/vendor/Bareos/library/Bareos/BSock/BareosBSockInterface.php
@ -1925,4 +1903,14 @@ share/bareos-webui/vendor/zendframework/zend-view/src/Stream.php
share/bareos-webui/vendor/zendframework/zend-view/src/Variables.php
share/bareos-webui/vendor/zendframework/zend-view/src/View.php
share/bareos-webui/vendor/zendframework/zend-view/src/ViewEvent.php
share/bareos-webui/version.php.in
share/bareos-webui/version.php
share/doc/bareos-webui/README-INSTALLATION.md
share/doc/bareos-webui/README-TRANSLATION.md
share/examples/bareos-webui/apache/bareos-webui.conf
share/examples/bareos-webui/bareos/bareos-dir.d/console/admin.conf.example
share/examples/bareos-webui/bareos/bareos-dir.d/profile/webui-admin.conf
share/examples/bareos-webui/bareos/bareos-dir.d/profile/webui-limited.conf.example
share/examples/bareos-webui/bareos/bareos-dir.d/profile/webui-readonly.conf
share/examples/bareos-webui/configuration.ini
share/examples/bareos-webui/directors.ini
share/examples/bareos-webui/nginx/bareos-webui.conf

View File

@ -7,6 +7,4 @@ package.
Open items:
- handling of .in-files
- handling of configuration files
- testing