diff options
author | Stefan G. Weichinger <office@oops.co.at> | 2017-01-24 14:49:01 +0100 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2017-01-26 00:28:49 +0100 |
commit | 40c0ec98425f4da16cd134129ba14784cdc112fa (patch) | |
tree | 5355c16bc7a5ca8bfa050b089fd6f8e58b75db02 | |
parent | app-crypt/zuluCrypt: version bump to 5.1.0. (diff) | |
download | gentoo-40c0ec98425f4da16cd134129ba14784cdc112fa.tar.gz gentoo-40c0ec98425f4da16cd134129ba14784cdc112fa.tar.bz2 gentoo-40c0ec98425f4da16cd134129ba14784cdc112fa.zip |
www-apps/otrs: version bump to 5.0.16.
Closes: https://github.com/gentoo/gentoo/pull/3626
-rw-r--r-- | www-apps/otrs/Manifest | 1 | ||||
-rw-r--r-- | www-apps/otrs/otrs-5.0.16.ebuild | 152 |
2 files changed, 153 insertions, 0 deletions
diff --git a/www-apps/otrs/Manifest b/www-apps/otrs/Manifest index 5f68e09c127b..7768bbdaae83 100644 --- a/www-apps/otrs/Manifest +++ b/www-apps/otrs/Manifest @@ -1 +1,2 @@ DIST otrs-5.0.15.tar.bz2 19344790 SHA256 03f294a34c1e44b0bf5d6974eab718e053546e6e7d9d84c7b14958827b83805b SHA512 5ac8614eee5719831dbf5e19c401c3947d48c0f43fea3d1be70cde797f108f5ca964616f7d0129471636d1f69f1ecaaa63939870c66c64138fd925c74cf6174c WHIRLPOOL 58406cc2cb2700b96811913c0b31dfca9dc7df051e6206d957c382f494f2ac1a6a5bfea7a16d155e6fe384070d2cb121358496c477a70866f907caeddafcd90f +DIST otrs-5.0.16.tar.bz2 19417591 SHA256 ddec039990c1bdfc27299ab175eff3e1665aa99ba48050f7f2dde480b28f4029 SHA512 326ebc97b689ce05c33a4f8e5587b891029c168544ab6bea4e5b112b2c75527a605689fd957d7acdebf18e331176db727cca4c87244f22cfdb9b9e4e0735b6c4 WHIRLPOOL 4dfe35d1c3cd940523219dafae5f62447e6bc363e601b4fc98fdf46d09731dbf61ddb109d5b368af6fc2b25ab44f18e455dbd9de2e00d367363c34972af221b2 diff --git a/www-apps/otrs/otrs-5.0.16.ebuild b/www-apps/otrs/otrs-5.0.16.ebuild new file mode 100644 index 000000000000..863d90e34ba0 --- /dev/null +++ b/www-apps/otrs/otrs-5.0.16.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" + +inherit confutils user systemd + +DESCRIPTION="OTRS is an Open source Ticket Request System" +HOMEPAGE="https://otrs.org/" +SRC_URI="https://ftp.otrs.org/pub/${PN}/${P}.tar.bz2" + +LICENSE="AGPL-3" +KEYWORDS="~amd64 ~x86" +IUSE="apache2 fastcgi +gd ldap mod_perl +mysql pdf postgres soap" +SLOT="0" + +DEPEND="media-libs/libpng:0" + +RDEPEND="dev-perl/Apache-Reload + dev-perl/Archive-Zip + dev-perl/DBI + dev-perl/IO-Socket-SSL + dev-perl/JSON-XS + dev-perl/LWP-UserAgent-Determined + dev-perl/Mail-POP3Client + dev-perl/Mail-IMAPClient + >dev-perl/Net-DNS-0.60 + dev-perl/Template-Toolkit + dev-perl/Text-CSV_XS + dev-perl/TimeDate + dev-perl/XML-Parser + dev-perl/YAML-LibYAML + apache2? ( + mod_perl? ( + www-servers/apache:2 + =www-apache/libapreq2-2* www-apache/mod_perl + ) + !fastcgi? ( !mod_perl? ( www-servers/apache:2[suexec] ) ) + ) + fastcgi? ( + dev-perl/FCGI + virtual/httpd-fastcgi + ) + !fastcgi? ( !apache2? ( virtual/httpd-cgi ) ) + gd? ( + dev-perl/GD + dev-perl/GDTextUtil + dev-perl/GDGraph + ) + ldap? ( dev-perl/perl-ldap ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + pdf? ( + >=dev-perl/PDF-API2-0.73 + virtual/perl-Compress-Raw-Zlib + ) + soap? ( + dev-perl/SOAP-Lite + !=dev-perl/SOAP-Lite-0.711 + !=dev-perl/SOAP-Lite-0.712 + ) + " + +OTRS_HOME="${EROOT%/}/var/lib/otrs" + +pkg_setup() { + # The enewuser otrs will fail if apache isn't there, but it's an optional dep + # so we create the apache user here just in case + enewgroup apache 81 + enewuser apache 81 -1 /var/www apache + enewuser otrs -1 -1 ${OTRS_HOME} apache + confutils_require_any mysql postgres +} + +src_prepare() { + rm -r "${S}/scripts"/{auto_*,redhat*,suse*,*.spec} || die + + pushd Kernel >/dev/null || die + for i in *.dist; do + cp ${i} $(basename ${i} .dist) || die + done + popd >/dev/null || die + + # Fix broken png file (and see pngfix help for exit codes) + pngfix -q --out=out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" + if [[ $? -gt 15 ]]; then + die "pngfix failed" + fi + mv -f out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" || die + + sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \ + || die "sed failed" + + sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" "${S}"/Kernel/Config/Defaults.pm \ + || die "sed failed" + + grep -lR "/opt" "${S}"/scripts | \ + xargs sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" \ + || die "sed failed" + + echo "CONFIG_PROTECT=\"${OTRS_HOME}/Kernel/Config.pm \ + ${OTRS_HOME}/Kernel/Config/GenericAgent.pm\"" > "${T}/50${PN}" || die + + eapply_user +} + +# This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred +pkg_config() { + einfo "Installing cronjobs" + crontab -u otrs /usr/share/doc/${PF}/crontab || die +} + +src_install() { + dodoc CHANGES.md README* + + insinto "${OTRS_HOME}" + doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE \ + Custom Kernel bin scripts var + + cat "${S}"/var/cron/*.dist > crontab || die + insinto /usr/share/doc/${PF}/ + doins crontab + + for a in article log pics/images pics/stats pics sessions spool tmp tmp/CacheFileStorable + do + keepdir "${OTRS_HOME}/var/${a}" + done + doenvd "${T}/50${PN}" + + systemd_dounit "${FILESDIR}/otrs.service" +} + +pkg_postinst() { + einfo "Setting correct permissions ..." + /usr/bin/env perl "${OTRS_HOME%}"/bin/otrs.SetPermissions.pl "${OTRS_HOME}" \ + --otrs-user=otrs \ + --web-group=apache \ + || die "Could not set permissions" + + einfo "Installation done!" + elog "1) Rebuild your config now by running the following commands:" + elog "sudo -u otrs /usr/bin/env perl "${OTRS_HOME}"/bin/otrs.Console.pl Maint::Config::Rebuild" + elog "sudo -u otrs /usr/bin/env perl "${OTRS_HOME}"/bin/otrs.Console.pl Maint::Cache::Delete" + elog "" + elog "2) Enable cronjobs with the following command:" + elog "crontab -u otrs crontab" + elog "" + elog "3) systemd users: enable and start OTRS daemon:" + elog "systemctl enable otrs" + elog "systemctl start otrs" +} |