1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 CMAKE_WARN_UNUSED_CLI=no
7 CMAKE_MAKEFILE_GENERATOR="emake"
13 MY_P="${MY_PN}-${MY_PV}"
15 if [[ ${PV} == 9999 ]]; then
17 S=${WORKDIR}/${PF}/webui
19 EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
21 S=${WORKDIR}/${MY_PN}-Release-${PV}/webui
22 SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/Release/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
23 KEYWORDS="~amd64 ~x86"
26 DESCRIPTION="Featureful client/server network backup suite"
27 HOMEPAGE="https://www.bareos.org/"
33 dev-lang/php[bzip2,ctype,curl,fileinfo,filter,fpm,gd,iconv,intl,mhash,nls,pdo,postgres,session,simplexml,ssl,xml,xmlreader,xmlwriter,zip]
45 sed -i "s/@BAREOS_FULL_VERSION@/${PV}/g" version.php.in || die
52 if [[ ${PV} == 9999 ]]; then
53 pushd "${WORKDIR}/${PF}"
57 CURRENT_VERSION=$(echo $(cmake -P get_version.cmake) | sed 's/[- ]//g')
60 -DVERSION_STRING=${CURRENT_VERSION}
69 dodoc README.md doc/README-TRANSLATION.md
71 dodir /etc/bareos/bareos-dir.d
72 cp -r install/bareos/bareos-dir.d/* "${D}"/etc/bareos/bareos-dir.d
74 webapp_server_configfile nginx "${FILESDIR}"/nginx.include
75 webapp_server_configfile apache "${FILESDIR}"/apache.conf
78 doins install/{configuration,directors}.ini
80 insinto "${MY_HTDOCSDIR#${EPREFIX}}"
83 webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/config/application.config.php
84 webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/config/autoload/global.php
86 keepdir "${MY_HTDOCSDIR#${EPREFIX}}"/data
87 webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/data
90 find "${D}/${MY_HTDOCSDIR#${EPREFIX}}" -name "*.in" -delete
91 rm -rf "${D}/${MY_HTDOCSDIR#${EPREFIX}}"/{CMakeLists.txt,install,cmake,phpunit.xml,scripts,doc,tests}
93 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
100 einfo "The webui uses 'webapp-config' to be installed to the webservers docroot"
101 einfo "E.g. to install webapp-config may be called like so:"
103 einfo " ~# webapp-config -h localhost -d bareos-webui -I bareos-webui ${PV}"
105 einfo "See 'man webapp-config' for details."