diff options
Diffstat (limited to 'www-apps/otrs')
-rw-r--r-- | www-apps/otrs/Manifest | 6 | ||||
-rw-r--r-- | www-apps/otrs/files/otrs.service | 13 | ||||
-rw-r--r-- | www-apps/otrs/metadata.xml | 20 | ||||
-rw-r--r-- | www-apps/otrs/otrs-5.0.23.ebuild | 154 |
4 files changed, 193 insertions, 0 deletions
diff --git a/www-apps/otrs/Manifest b/www-apps/otrs/Manifest new file mode 100644 index 000000000000..66e8ba655d7b --- /dev/null +++ b/www-apps/otrs/Manifest @@ -0,0 +1,6 @@ +AUX otrs.service 246 SHA256 6d5f64a524efcfe103e57be41e70c65435d754ff12aac3de2d466f9c9a7b08ac SHA512 52fbaf320b3943ec51b178cf0558f77d208b6f735e3278a790f48c74770bfc0b87888ac9225b43c0f7f3b0149296497b2c405b0424995d1d6f83a33b5d072ae7 WHIRLPOOL 55cd6e131387e6624f082539fb52d94614296e4d49c7bb03917cb8672a7080cb7e21f67e307ab8d6fe2db8e114f0475c8aef2c8996269a2c737e1c9e42c6e17b +DIST otrs-5.0.23.tar.bz2 20617459 SHA256 5e12affbccde0cae5738de1d0c7334e655b4c373ea668913ec54f31564b128c4 SHA512 c6ae594178e1f0eb59b87a8d08b610940ba7ad0a44699ba73568c6844a49fc03e2486bce393aaf0dd78da9c64790b9fae72cfad65c9c6955c0524fbf27b95d7e WHIRLPOOL d4e9e23fd54993b7c7a8559585c0fd3e934424d24c5283efbfc204ad202478910f3dc9fbf9a4073d6c4eb237320f4ef81207e715215c63e405c032a4dca3bd6d +EBUILD otrs-5.0.23.ebuild 4124 SHA256 96a933a791f7609f8ad4e98ea968f3e1bc77696b346c2fda12675d5eff4eb025 SHA512 bca3059455541b65749e612773d46983c5b6eb8b7e64696a9b807c07c26237e6b072b4269737efe2b94e5ecded5bbf8388261223b6c65d4c47a1689f57ad6479 WHIRLPOOL e7bd82142b763039a3de58099aba066301ca9d58107388d64cf70c8ee3d45db754674855844bc3efbd4d6d65720de2d440aebd4cfdc16bce10c5ce845cee563a +MISC ChangeLog 4411 SHA256 05ebca40f23bd5a1da9832c1b9f420138c236015ec2856229cac84d69b2d4aa3 SHA512 ef11c94f71cb91757b9c947f9c1a7d23dcef984d1e3b4fde267f8c01dc736b0cea1ad11f857a11a69a6db66a0db0866c9b7b3cac11fb2480b863cc09c8081dcc WHIRLPOOL 2c6d799efcf01b507002505b9d79faa3accb5dc1e795d524acdf6a29319786c71fcd171431deeee76585235ca65b0b5fefb50462c322a574e747488a023689a3 +MISC ChangeLog-2015 10802 SHA256 e119af3a3f51877e1c94f598c142decca79cd5f5a80e5130b7d193319a36a41e SHA512 b8b51d1ab78779013c79f7859fe94802a55eca13d69db0e6e5cff750e0365cef94950fde3a0f079b82dfd450bc1d6471e7a6ea61788cbd435955eb550dcd6185 WHIRLPOOL ef676c684316f8c8cb434258c90acac0cdd4aa0c4f45d0f874838d1131d9337e9514e235ba4f3939076de8634ca19a942267b50632ddbc1223082eb05ea1a7c3 +MISC metadata.xml 631 SHA256 b88be5c308216a44411243246798a15f65f0be083860121751344cb9db2a12c5 SHA512 d50b116faf2a7e1b7a9c904f112fe3606e331984e4056e18962d591af2537fc5b7186c6006d50a02306635856e7e6051c3a25f1c9781662456ee84d1de278614 WHIRLPOOL 39fd9fe9c3927ac24d9136fb2de6e022ff01ae201bf1f8c62667057669658bce1b3fa90ccd4046faecbdb8bad00484625de7fab446f408d7d4929591e7bdf982 diff --git a/www-apps/otrs/files/otrs.service b/www-apps/otrs/files/otrs.service new file mode 100644 index 000000000000..546ecdda8f93 --- /dev/null +++ b/www-apps/otrs/files/otrs.service @@ -0,0 +1,13 @@ +[Unit] +Description=OTRS daemon + +[Service] +Type=forking +WorkingDirectory=/var/lib/otrs +User=otrs +ExecStart=/var/lib/otrs/bin/otrs.Daemon.pl start +ExecStop=/var/lib/otrs/bin/otrs.Daemon.pl stop +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/www-apps/otrs/metadata.xml b/www-apps/otrs/metadata.xml new file mode 100644 index 000000000000..38448c9a8c7e --- /dev/null +++ b/www-apps/otrs/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>lists@xunil.at</email> + <name>Stefan Weichinger</name> + <description>Proxy maintainer</description> + </maintainer> + <maintainer type="project"> + <email>web-apps@gentoo.org</email> + <name>Gentoo Webapps</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="mod_perl">Provide all dependencies for use of mod_perl instead of cgi</flag> + </use> +</pkgmetadata> diff --git a/www-apps/otrs/otrs-5.0.23.ebuild b/www-apps/otrs/otrs-5.0.23.ebuild new file mode 100644 index 000000000000..172bd42f6b4e --- /dev/null +++ b/www-apps/otrs/otrs-5.0.23.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit user systemd + +DESCRIPTION="OTRS is an Open source Ticket Request System" +HOMEPAGE="https://www.otrs.com/" +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" + +REQUIRED_USE="|| ( mysql postgres )" + +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="/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 +} + +src_prepare() { + rm -r "${S}/scripts"/auto_* || die + + pushd Kernel >/dev/null || die + local i + 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:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \ + || die "sed failed" + + sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config/Defaults.pm \ + || die "sed failed" + + grep -lR "/opt" "${S}"/scripts | \ + xargs sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" \ + || die "sed failed" + + echo "CONFIG_PROTECT=\"${EPREFIX%/}${OTRS_HOME}/Kernel/Config.pm \ + ${EPREFIX%/}${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 "${EROOT%/}"/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 > "${T}"/crontab || die + insinto /usr/share/doc/${PF}/ + doins "${T}"/crontab + + local a + 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 "${EROOT%/}${OTRS_HOME}"/bin/otrs.SetPermissions.pl "${EROOT%/}${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 "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Config::Rebuild" + elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${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" +} |