173 lines
3.6 KiB
Bash
173 lines
3.6 KiB
Bash
# Copyright 1999-2024 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit systemd webapp
|
|
|
|
DESCRIPTION="Web-based ERP system for the German market"
|
|
HOMEPAGE="https://www.kivitendo.de/"
|
|
SRC_URI="https://github.com/kivitendo/${PN}/archive/refs/tags/release-${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
KEYWORDS="amd64"
|
|
LICENSE="GPL-2"
|
|
IUSE="+fastcgi +latex"
|
|
|
|
DEPEND="
|
|
app-text/poppler
|
|
latex? ( app-text/texlive )
|
|
dev-lang/perl
|
|
dev-perl/Apache-DBI
|
|
dev-perl/Apache-Session
|
|
dev-perl/Algorithm-CheckDigits
|
|
dev-perl/Archive-Zip
|
|
dev-perl/CGI
|
|
dev-perl/Clone
|
|
dev-perl/Config-Std
|
|
dev-perl/Daemon-Generic
|
|
dev-perl/DateTime-Event-Cron
|
|
dev-perl/DateTime-Format-Strptime
|
|
dev-perl/DBI
|
|
dev-perl/DBD-Pg
|
|
dev-perl/Digest-SHA
|
|
dev-perl/Exception-Class
|
|
dev-perl/Email-Address
|
|
dev-perl/Email-MIME
|
|
dev-perl/Encode-IMAPUTF7
|
|
fastcgi? (
|
|
dev-perl/FCGI
|
|
dev-perl/FCGI-ProcManager
|
|
)
|
|
dev-perl/File-Copy-Recursive
|
|
dev-perl/File-Flock
|
|
dev-perl/File-MimeInfo
|
|
dev-perl/File-Slurp
|
|
dev-perl/GD
|
|
dev-perl/HTML-Parser
|
|
dev-perl/HTML-Restrict
|
|
dev-perl/HTTP-DAV
|
|
dev-perl/IO-Socket-SSL
|
|
dev-perl/Image-Info
|
|
dev-perl/Imager
|
|
dev-perl/Imager-QRCode
|
|
dev-perl/IPC-Run
|
|
dev-perl/JSON
|
|
dev-perl/List-MoreUtils
|
|
dev-perl/List-UtilsBy
|
|
dev-perl/Math-Round
|
|
dev-perl/Mail-IMAPClient
|
|
dev-perl/Net-SMTP-SSL
|
|
dev-perl/Net-SSLGlue
|
|
dev-perl/Params-Validate
|
|
dev-perl/PBKDF2-Tiny
|
|
dev-perl/PDF-API2
|
|
dev-perl/Regexp-IPv6
|
|
dev-perl/REST-Client
|
|
dev-perl/Rose-Object
|
|
dev-perl/Rose-DB
|
|
dev-perl/Rose-DB-Object
|
|
dev-perl/Set-Infinite
|
|
dev-perl/String-ShellQuote
|
|
dev-perl/Sort-Naturally
|
|
dev-perl/Template-Toolkit
|
|
dev-perl/Text-CSV_XS
|
|
dev-perl/Text-Iconv
|
|
dev-perl/Text-Unidecode
|
|
dev-perl/Try-Tiny
|
|
dev-perl/URI
|
|
dev-perl/UUID-Tiny
|
|
dev-perl/XML-LibXML
|
|
dev-perl/XML-Writer
|
|
dev-perl/YAML
|
|
dev-perl/YAML-LibYAML
|
|
dev-perl/libwww-perl
|
|
dev-perl/perl-ldap
|
|
virtual/perl-parent
|
|
"
|
|
|
|
RDEPEND="${DEPEND}
|
|
virtual/mta
|
|
www-servers/apache
|
|
fastcgi? ( www-apache/mod_fcgid )
|
|
"
|
|
|
|
need_httpd_cgi
|
|
|
|
S=${WORKDIR}/${PN}-release-${PV}
|
|
|
|
pkg_setup() {
|
|
webapp_pkg_setup
|
|
}
|
|
|
|
|
|
src_configure() {
|
|
:
|
|
}
|
|
|
|
src_compile() {
|
|
:
|
|
}
|
|
|
|
src_install() {
|
|
webapp_src_preinst
|
|
|
|
cd "${S}" || die
|
|
dodoc README.md
|
|
|
|
exeinto "${MY_HOSTROOTDIR}/${PN}"
|
|
doexe scripts/console
|
|
doexe dispatcher.fpl dispatcher.pl
|
|
|
|
exeinto "${MY_HOSTROOTDIR}/${PN}/scripts"
|
|
for f in scripts/*.pl; do
|
|
doexe $f
|
|
done
|
|
for f in scripts/*.py; do
|
|
doexe $f
|
|
done
|
|
for f in scripts/*.sh; do
|
|
doexe $f
|
|
done
|
|
|
|
insinto "${MY_HOSTROOTDIR}/${PN}"
|
|
doins -r Devel
|
|
doins -r SL
|
|
doins -r bin
|
|
doins -r config
|
|
doins -r css
|
|
doins -r doc
|
|
doins -r image
|
|
doins -r js
|
|
doins -r locale
|
|
doins -r menus
|
|
doins -r modules
|
|
doins -r spool
|
|
doins -r sql
|
|
doins -r t
|
|
doins -r templates
|
|
doins -r users
|
|
doins .htaccess VERSION dispatcher.fcgi favicon.ico index.html
|
|
|
|
insinto "${MY_HOSTROOTDIR}/${PN}"/scripts
|
|
doins scripts/.htaccess scripts/generate_client_js_actions.tpl
|
|
|
|
keepdir "${MY_HOSTROOTDIR}/${PN}"/documents
|
|
keepdir "${MY_HOSTROOTDIR}/${PN}"/webdav
|
|
|
|
sed -e "s/postgresql.service/postgresql-16.service/" \
|
|
-e "s/User=www-data/User=apache/" \
|
|
-e "s#/var/www/kivitendo-erp#/var/www/localhost/kivitendo-erp#" \
|
|
-i scripts/boot/systemd/kivitendo-task-server.service \
|
|
|| die
|
|
systemd_dounit scripts/boot/systemd/kivitendo-task-server.service
|
|
|
|
# Data needs to be writable and modifiable by the web server
|
|
webapp_serverowned "${MY_HOSTROOTDIR}/${PN}"/documents
|
|
webapp_serverowned "${MY_HOSTROOTDIR}/${PN}"/spool
|
|
webapp_serverowned "${MY_HOSTROOTDIR}/${PN}"/templates
|
|
webapp_serverowned -R "${MY_HOSTROOTDIR}/${PN}"/users
|
|
webapp_serverowned "${MY_HOSTROOTDIR}/${PN}"/webdav
|
|
|
|
webapp_src_install
|
|
}
|