1 |
commit: 8f38debefe32b54da7d19556389b8599242251f1 |
2 |
Author: Stefan G. Weichinger <office <AT> oops <DOT> co <DOT> at> |
3 |
AuthorDate: Tue Feb 13 09:49:42 2018 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 15 14:27:17 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f38debe |
7 |
|
8 |
www-apps/otrs: version bump to 6.0.5. |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/7172 |
11 |
|
12 |
www-apps/otrs/Manifest | 3 + |
13 |
www-apps/otrs/otrs-6.0.3.ebuild | 156 ++++++++++++++++++++++++++++++++++++++++ |
14 |
www-apps/otrs/otrs-6.0.4.ebuild | 156 ++++++++++++++++++++++++++++++++++++++++ |
15 |
www-apps/otrs/otrs-6.0.5.ebuild | 156 ++++++++++++++++++++++++++++++++++++++++ |
16 |
4 files changed, 471 insertions(+) |
17 |
|
18 |
diff --git a/www-apps/otrs/Manifest b/www-apps/otrs/Manifest |
19 |
index 0bea4d3beaa..74c03477b67 100644 |
20 |
--- a/www-apps/otrs/Manifest |
21 |
+++ b/www-apps/otrs/Manifest |
22 |
@@ -1 +1,4 @@ |
23 |
DIST otrs-5.0.25.tar.bz2 20671315 BLAKE2B 045037411039f480434e7c36ab84b63ec0c119e39cc6918ba05d9a7c92e5c940545412dc2824fc427199b384dece34793d2b60fadafec302f67581aabdc5ac82 SHA512 1e68471f071265d963c51ab5a6510a9a9b23d3de87e10eb58b9f9ca937500f4fdf68a7e911f9509244e4cbf43e1658c95dbaba83160d736ea0116167f3361e37 |
24 |
+DIST otrs-6.0.3.tar.bz2 24314514 BLAKE2B 97d794d59269d354b28003879bf0d30cc9b0f7a7d375416df90d85b694ac59e84978fe61183aa058497da18631513c25ecc93e3150f662e2e2efd335014e1e75 SHA512 d7f551e2c9bbe8b303d3de1f7993d76ea22cfd876b61941cfb72a25f2ba7e0a889c275c87aa40c104c1f2e6e1923b7a530cd088bd11b7b575a608b623e2b0541 |
25 |
+DIST otrs-6.0.4.tar.bz2 24355298 BLAKE2B 2f27e7a34b1bad0d58193c834503f051a1a1822afb53dca185ae2f8329d048446acc4e27e823b6f27660c79179bbb48f1976c0b3a6710bc083f791c0a777152c SHA512 23e9a29a6f080c6afa92704d25363687d50073c94192ba81e69ddab55fb9f945a38a5757a4c60c2d46bfc5a0002ca13bbbce1cc0c945f40e23bb864ebc57edd1 |
26 |
+DIST otrs-6.0.5.tar.bz2 24368010 BLAKE2B 20511dfbca16d275a1c4f7f07f8cc9e350c182661c95932f59899400b232612aed95fecac422528e37dd01b772225e78f25464bae40490abd88b391b05ac7b15 SHA512 fe669fb83acef8252cc53b24378757e498201e916a7fc1cb5f509efe777ec2bf36925264a7080f02e50a115285c26429506927390e3b10b35622f3c65a8cd066 |
27 |
|
28 |
diff --git a/www-apps/otrs/otrs-6.0.3.ebuild b/www-apps/otrs/otrs-6.0.3.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..5ab8f192a5b |
31 |
--- /dev/null |
32 |
+++ b/www-apps/otrs/otrs-6.0.3.ebuild |
33 |
@@ -0,0 +1,156 @@ |
34 |
+# Copyright 1999-2017 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI="6" |
38 |
+ |
39 |
+inherit user systemd |
40 |
+ |
41 |
+DESCRIPTION="OTRS is an Open source Ticket Request System" |
42 |
+HOMEPAGE="https://www.otrs.com/" |
43 |
+SRC_URI="https://ftp.otrs.org/pub/${PN}/${P}.tar.bz2" |
44 |
+ |
45 |
+LICENSE="AGPL-3+" |
46 |
+KEYWORDS="~amd64 ~x86" |
47 |
+IUSE="apache2 fastcgi +gd ldap mod_perl +mysql pdf postgres soap" |
48 |
+SLOT="0" |
49 |
+ |
50 |
+REQUIRED_USE="|| ( mysql postgres )" |
51 |
+ |
52 |
+DEPEND="media-libs/libpng:0" |
53 |
+ |
54 |
+RDEPEND="dev-perl/Apache-Reload |
55 |
+ dev-perl/Archive-Zip |
56 |
+ dev-perl/DBI |
57 |
+ dev-perl/IO-Socket-SSL |
58 |
+ dev-perl/JSON-XS |
59 |
+ dev-perl/LWP-UserAgent-Determined |
60 |
+ dev-perl/Mail-POP3Client |
61 |
+ dev-perl/Mail-IMAPClient |
62 |
+ >dev-perl/Net-DNS-0.60 |
63 |
+ dev-perl/Template-Toolkit |
64 |
+ dev-perl/Text-CSV_XS |
65 |
+ dev-perl/TimeDate |
66 |
+ dev-perl/DateTime |
67 |
+ dev-perl/XML-LibXML-Simple |
68 |
+ dev-perl/XML-Parser |
69 |
+ dev-perl/YAML-LibYAML |
70 |
+ apache2? ( |
71 |
+ mod_perl? ( |
72 |
+ www-servers/apache:2 |
73 |
+ =www-apache/libapreq2-2* www-apache/mod_perl |
74 |
+ ) |
75 |
+ !fastcgi? ( !mod_perl? ( www-servers/apache:2[suexec] ) ) |
76 |
+ ) |
77 |
+ fastcgi? ( |
78 |
+ dev-perl/FCGI |
79 |
+ virtual/httpd-fastcgi |
80 |
+ ) |
81 |
+ !fastcgi? ( !apache2? ( virtual/httpd-cgi ) ) |
82 |
+ gd? ( |
83 |
+ dev-perl/GD |
84 |
+ dev-perl/GDTextUtil |
85 |
+ dev-perl/GDGraph |
86 |
+ ) |
87 |
+ ldap? ( dev-perl/perl-ldap ) |
88 |
+ mysql? ( dev-perl/DBD-mysql ) |
89 |
+ postgres? ( dev-perl/DBD-Pg ) |
90 |
+ pdf? ( |
91 |
+ >=dev-perl/PDF-API2-0.73 |
92 |
+ virtual/perl-Compress-Raw-Zlib |
93 |
+ ) |
94 |
+ soap? ( |
95 |
+ dev-perl/SOAP-Lite |
96 |
+ !=dev-perl/SOAP-Lite-0.711 |
97 |
+ !=dev-perl/SOAP-Lite-0.712 |
98 |
+ ) |
99 |
+ " |
100 |
+ |
101 |
+OTRS_HOME="/var/lib/otrs" |
102 |
+ |
103 |
+pkg_setup() { |
104 |
+ # The enewuser otrs will fail if apache isn't there, but it's an optional dep |
105 |
+ # so we create the apache user here just in case |
106 |
+ enewgroup apache 81 |
107 |
+ enewuser apache 81 -1 /var/www apache |
108 |
+ enewuser otrs -1 -1 "${OTRS_HOME}" apache |
109 |
+} |
110 |
+ |
111 |
+src_prepare() { |
112 |
+ rm -r "${S}/scripts"/auto_* || die |
113 |
+ |
114 |
+ pushd Kernel >/dev/null || die |
115 |
+ local i |
116 |
+ for i in *.dist; do |
117 |
+ cp "${i}" $(basename "${i}" .dist) || die |
118 |
+ done |
119 |
+ popd >/dev/null || die |
120 |
+ |
121 |
+ # Fix broken png file (and see pngfix help for exit codes) |
122 |
+ pngfix -q --out=out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" |
123 |
+ if [[ $? -gt 15 ]]; then |
124 |
+ die "pngfix failed" |
125 |
+ fi |
126 |
+ mv -f out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" || die |
127 |
+ |
128 |
+ sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \ |
129 |
+ || die "sed failed" |
130 |
+ |
131 |
+ sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config/Defaults.pm \ |
132 |
+ || die "sed failed" |
133 |
+ |
134 |
+ grep -lR "/opt" "${S}"/scripts | \ |
135 |
+ xargs sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" \ |
136 |
+ || die "sed failed" |
137 |
+ |
138 |
+ echo "CONFIG_PROTECT=\"${EPREFIX%/}${OTRS_HOME}/Kernel/Config.pm \ |
139 |
+ ${EPREFIX%/}${OTRS_HOME}/Kernel/Config/GenericAgent.pm\"" > "${T}/50${PN}" || die |
140 |
+ |
141 |
+ eapply_user |
142 |
+} |
143 |
+ |
144 |
+# This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred |
145 |
+pkg_config() { |
146 |
+ einfo "Installing cronjobs" |
147 |
+ crontab -u otrs "${EROOT%/}"/usr/share/doc/${PF}/crontab || die |
148 |
+} |
149 |
+ |
150 |
+src_install() { |
151 |
+ dodoc CHANGES.md README* |
152 |
+ |
153 |
+ insinto "${OTRS_HOME}" |
154 |
+ doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE \ |
155 |
+ Custom Kernel bin scripts var |
156 |
+ |
157 |
+ cat "${S}"/var/cron/*.dist > "${T}"/crontab || die |
158 |
+ insinto /usr/share/doc/${PF}/ |
159 |
+ doins "${T}"/crontab |
160 |
+ |
161 |
+ local a |
162 |
+ for a in article log pics/images pics/stats pics sessions spool tmp tmp/CacheFileStorable |
163 |
+ do |
164 |
+ keepdir "${OTRS_HOME}/var/${a}" |
165 |
+ done |
166 |
+ doenvd "${T}/50${PN}" |
167 |
+ |
168 |
+ systemd_dounit "${FILESDIR}/otrs.service" |
169 |
+} |
170 |
+ |
171 |
+pkg_postinst() { |
172 |
+ einfo "Setting correct permissions ..." |
173 |
+ /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.SetPermissions.pl "${EROOT%/}${OTRS_HOME}" \ |
174 |
+ --otrs-user=otrs \ |
175 |
+ --web-group=apache \ |
176 |
+ || die "Could not set permissions" |
177 |
+ |
178 |
+ einfo "Installation done!" |
179 |
+ elog "1) Rebuild your config now by running the following commands:" |
180 |
+ elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Config::Rebuild" |
181 |
+ elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Cache::Delete" |
182 |
+ elog "" |
183 |
+ elog "2) Enable cronjobs with the following command:" |
184 |
+ elog "crontab -u otrs crontab" |
185 |
+ elog "" |
186 |
+ elog "3) systemd users: enable and start OTRS daemon:" |
187 |
+ elog "systemctl enable otrs" |
188 |
+ elog "systemctl start otrs" |
189 |
+} |
190 |
|
191 |
diff --git a/www-apps/otrs/otrs-6.0.4.ebuild b/www-apps/otrs/otrs-6.0.4.ebuild |
192 |
new file mode 100644 |
193 |
index 00000000000..5ab8f192a5b |
194 |
--- /dev/null |
195 |
+++ b/www-apps/otrs/otrs-6.0.4.ebuild |
196 |
@@ -0,0 +1,156 @@ |
197 |
+# Copyright 1999-2017 Gentoo Foundation |
198 |
+# Distributed under the terms of the GNU General Public License v2 |
199 |
+ |
200 |
+EAPI="6" |
201 |
+ |
202 |
+inherit user systemd |
203 |
+ |
204 |
+DESCRIPTION="OTRS is an Open source Ticket Request System" |
205 |
+HOMEPAGE="https://www.otrs.com/" |
206 |
+SRC_URI="https://ftp.otrs.org/pub/${PN}/${P}.tar.bz2" |
207 |
+ |
208 |
+LICENSE="AGPL-3+" |
209 |
+KEYWORDS="~amd64 ~x86" |
210 |
+IUSE="apache2 fastcgi +gd ldap mod_perl +mysql pdf postgres soap" |
211 |
+SLOT="0" |
212 |
+ |
213 |
+REQUIRED_USE="|| ( mysql postgres )" |
214 |
+ |
215 |
+DEPEND="media-libs/libpng:0" |
216 |
+ |
217 |
+RDEPEND="dev-perl/Apache-Reload |
218 |
+ dev-perl/Archive-Zip |
219 |
+ dev-perl/DBI |
220 |
+ dev-perl/IO-Socket-SSL |
221 |
+ dev-perl/JSON-XS |
222 |
+ dev-perl/LWP-UserAgent-Determined |
223 |
+ dev-perl/Mail-POP3Client |
224 |
+ dev-perl/Mail-IMAPClient |
225 |
+ >dev-perl/Net-DNS-0.60 |
226 |
+ dev-perl/Template-Toolkit |
227 |
+ dev-perl/Text-CSV_XS |
228 |
+ dev-perl/TimeDate |
229 |
+ dev-perl/DateTime |
230 |
+ dev-perl/XML-LibXML-Simple |
231 |
+ dev-perl/XML-Parser |
232 |
+ dev-perl/YAML-LibYAML |
233 |
+ apache2? ( |
234 |
+ mod_perl? ( |
235 |
+ www-servers/apache:2 |
236 |
+ =www-apache/libapreq2-2* www-apache/mod_perl |
237 |
+ ) |
238 |
+ !fastcgi? ( !mod_perl? ( www-servers/apache:2[suexec] ) ) |
239 |
+ ) |
240 |
+ fastcgi? ( |
241 |
+ dev-perl/FCGI |
242 |
+ virtual/httpd-fastcgi |
243 |
+ ) |
244 |
+ !fastcgi? ( !apache2? ( virtual/httpd-cgi ) ) |
245 |
+ gd? ( |
246 |
+ dev-perl/GD |
247 |
+ dev-perl/GDTextUtil |
248 |
+ dev-perl/GDGraph |
249 |
+ ) |
250 |
+ ldap? ( dev-perl/perl-ldap ) |
251 |
+ mysql? ( dev-perl/DBD-mysql ) |
252 |
+ postgres? ( dev-perl/DBD-Pg ) |
253 |
+ pdf? ( |
254 |
+ >=dev-perl/PDF-API2-0.73 |
255 |
+ virtual/perl-Compress-Raw-Zlib |
256 |
+ ) |
257 |
+ soap? ( |
258 |
+ dev-perl/SOAP-Lite |
259 |
+ !=dev-perl/SOAP-Lite-0.711 |
260 |
+ !=dev-perl/SOAP-Lite-0.712 |
261 |
+ ) |
262 |
+ " |
263 |
+ |
264 |
+OTRS_HOME="/var/lib/otrs" |
265 |
+ |
266 |
+pkg_setup() { |
267 |
+ # The enewuser otrs will fail if apache isn't there, but it's an optional dep |
268 |
+ # so we create the apache user here just in case |
269 |
+ enewgroup apache 81 |
270 |
+ enewuser apache 81 -1 /var/www apache |
271 |
+ enewuser otrs -1 -1 "${OTRS_HOME}" apache |
272 |
+} |
273 |
+ |
274 |
+src_prepare() { |
275 |
+ rm -r "${S}/scripts"/auto_* || die |
276 |
+ |
277 |
+ pushd Kernel >/dev/null || die |
278 |
+ local i |
279 |
+ for i in *.dist; do |
280 |
+ cp "${i}" $(basename "${i}" .dist) || die |
281 |
+ done |
282 |
+ popd >/dev/null || die |
283 |
+ |
284 |
+ # Fix broken png file (and see pngfix help for exit codes) |
285 |
+ pngfix -q --out=out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" |
286 |
+ if [[ $? -gt 15 ]]; then |
287 |
+ die "pngfix failed" |
288 |
+ fi |
289 |
+ mv -f out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" || die |
290 |
+ |
291 |
+ sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \ |
292 |
+ || die "sed failed" |
293 |
+ |
294 |
+ sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config/Defaults.pm \ |
295 |
+ || die "sed failed" |
296 |
+ |
297 |
+ grep -lR "/opt" "${S}"/scripts | \ |
298 |
+ xargs sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" \ |
299 |
+ || die "sed failed" |
300 |
+ |
301 |
+ echo "CONFIG_PROTECT=\"${EPREFIX%/}${OTRS_HOME}/Kernel/Config.pm \ |
302 |
+ ${EPREFIX%/}${OTRS_HOME}/Kernel/Config/GenericAgent.pm\"" > "${T}/50${PN}" || die |
303 |
+ |
304 |
+ eapply_user |
305 |
+} |
306 |
+ |
307 |
+# This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred |
308 |
+pkg_config() { |
309 |
+ einfo "Installing cronjobs" |
310 |
+ crontab -u otrs "${EROOT%/}"/usr/share/doc/${PF}/crontab || die |
311 |
+} |
312 |
+ |
313 |
+src_install() { |
314 |
+ dodoc CHANGES.md README* |
315 |
+ |
316 |
+ insinto "${OTRS_HOME}" |
317 |
+ doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE \ |
318 |
+ Custom Kernel bin scripts var |
319 |
+ |
320 |
+ cat "${S}"/var/cron/*.dist > "${T}"/crontab || die |
321 |
+ insinto /usr/share/doc/${PF}/ |
322 |
+ doins "${T}"/crontab |
323 |
+ |
324 |
+ local a |
325 |
+ for a in article log pics/images pics/stats pics sessions spool tmp tmp/CacheFileStorable |
326 |
+ do |
327 |
+ keepdir "${OTRS_HOME}/var/${a}" |
328 |
+ done |
329 |
+ doenvd "${T}/50${PN}" |
330 |
+ |
331 |
+ systemd_dounit "${FILESDIR}/otrs.service" |
332 |
+} |
333 |
+ |
334 |
+pkg_postinst() { |
335 |
+ einfo "Setting correct permissions ..." |
336 |
+ /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.SetPermissions.pl "${EROOT%/}${OTRS_HOME}" \ |
337 |
+ --otrs-user=otrs \ |
338 |
+ --web-group=apache \ |
339 |
+ || die "Could not set permissions" |
340 |
+ |
341 |
+ einfo "Installation done!" |
342 |
+ elog "1) Rebuild your config now by running the following commands:" |
343 |
+ elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Config::Rebuild" |
344 |
+ elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Cache::Delete" |
345 |
+ elog "" |
346 |
+ elog "2) Enable cronjobs with the following command:" |
347 |
+ elog "crontab -u otrs crontab" |
348 |
+ elog "" |
349 |
+ elog "3) systemd users: enable and start OTRS daemon:" |
350 |
+ elog "systemctl enable otrs" |
351 |
+ elog "systemctl start otrs" |
352 |
+} |
353 |
|
354 |
diff --git a/www-apps/otrs/otrs-6.0.5.ebuild b/www-apps/otrs/otrs-6.0.5.ebuild |
355 |
new file mode 100644 |
356 |
index 00000000000..5ab8f192a5b |
357 |
--- /dev/null |
358 |
+++ b/www-apps/otrs/otrs-6.0.5.ebuild |
359 |
@@ -0,0 +1,156 @@ |
360 |
+# Copyright 1999-2017 Gentoo Foundation |
361 |
+# Distributed under the terms of the GNU General Public License v2 |
362 |
+ |
363 |
+EAPI="6" |
364 |
+ |
365 |
+inherit user systemd |
366 |
+ |
367 |
+DESCRIPTION="OTRS is an Open source Ticket Request System" |
368 |
+HOMEPAGE="https://www.otrs.com/" |
369 |
+SRC_URI="https://ftp.otrs.org/pub/${PN}/${P}.tar.bz2" |
370 |
+ |
371 |
+LICENSE="AGPL-3+" |
372 |
+KEYWORDS="~amd64 ~x86" |
373 |
+IUSE="apache2 fastcgi +gd ldap mod_perl +mysql pdf postgres soap" |
374 |
+SLOT="0" |
375 |
+ |
376 |
+REQUIRED_USE="|| ( mysql postgres )" |
377 |
+ |
378 |
+DEPEND="media-libs/libpng:0" |
379 |
+ |
380 |
+RDEPEND="dev-perl/Apache-Reload |
381 |
+ dev-perl/Archive-Zip |
382 |
+ dev-perl/DBI |
383 |
+ dev-perl/IO-Socket-SSL |
384 |
+ dev-perl/JSON-XS |
385 |
+ dev-perl/LWP-UserAgent-Determined |
386 |
+ dev-perl/Mail-POP3Client |
387 |
+ dev-perl/Mail-IMAPClient |
388 |
+ >dev-perl/Net-DNS-0.60 |
389 |
+ dev-perl/Template-Toolkit |
390 |
+ dev-perl/Text-CSV_XS |
391 |
+ dev-perl/TimeDate |
392 |
+ dev-perl/DateTime |
393 |
+ dev-perl/XML-LibXML-Simple |
394 |
+ dev-perl/XML-Parser |
395 |
+ dev-perl/YAML-LibYAML |
396 |
+ apache2? ( |
397 |
+ mod_perl? ( |
398 |
+ www-servers/apache:2 |
399 |
+ =www-apache/libapreq2-2* www-apache/mod_perl |
400 |
+ ) |
401 |
+ !fastcgi? ( !mod_perl? ( www-servers/apache:2[suexec] ) ) |
402 |
+ ) |
403 |
+ fastcgi? ( |
404 |
+ dev-perl/FCGI |
405 |
+ virtual/httpd-fastcgi |
406 |
+ ) |
407 |
+ !fastcgi? ( !apache2? ( virtual/httpd-cgi ) ) |
408 |
+ gd? ( |
409 |
+ dev-perl/GD |
410 |
+ dev-perl/GDTextUtil |
411 |
+ dev-perl/GDGraph |
412 |
+ ) |
413 |
+ ldap? ( dev-perl/perl-ldap ) |
414 |
+ mysql? ( dev-perl/DBD-mysql ) |
415 |
+ postgres? ( dev-perl/DBD-Pg ) |
416 |
+ pdf? ( |
417 |
+ >=dev-perl/PDF-API2-0.73 |
418 |
+ virtual/perl-Compress-Raw-Zlib |
419 |
+ ) |
420 |
+ soap? ( |
421 |
+ dev-perl/SOAP-Lite |
422 |
+ !=dev-perl/SOAP-Lite-0.711 |
423 |
+ !=dev-perl/SOAP-Lite-0.712 |
424 |
+ ) |
425 |
+ " |
426 |
+ |
427 |
+OTRS_HOME="/var/lib/otrs" |
428 |
+ |
429 |
+pkg_setup() { |
430 |
+ # The enewuser otrs will fail if apache isn't there, but it's an optional dep |
431 |
+ # so we create the apache user here just in case |
432 |
+ enewgroup apache 81 |
433 |
+ enewuser apache 81 -1 /var/www apache |
434 |
+ enewuser otrs -1 -1 "${OTRS_HOME}" apache |
435 |
+} |
436 |
+ |
437 |
+src_prepare() { |
438 |
+ rm -r "${S}/scripts"/auto_* || die |
439 |
+ |
440 |
+ pushd Kernel >/dev/null || die |
441 |
+ local i |
442 |
+ for i in *.dist; do |
443 |
+ cp "${i}" $(basename "${i}" .dist) || die |
444 |
+ done |
445 |
+ popd >/dev/null || die |
446 |
+ |
447 |
+ # Fix broken png file (and see pngfix help for exit codes) |
448 |
+ pngfix -q --out=out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" |
449 |
+ if [[ $? -gt 15 ]]; then |
450 |
+ die "pngfix failed" |
451 |
+ fi |
452 |
+ mv -f out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" || die |
453 |
+ |
454 |
+ sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \ |
455 |
+ || die "sed failed" |
456 |
+ |
457 |
+ sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config/Defaults.pm \ |
458 |
+ || die "sed failed" |
459 |
+ |
460 |
+ grep -lR "/opt" "${S}"/scripts | \ |
461 |
+ xargs sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" \ |
462 |
+ || die "sed failed" |
463 |
+ |
464 |
+ echo "CONFIG_PROTECT=\"${EPREFIX%/}${OTRS_HOME}/Kernel/Config.pm \ |
465 |
+ ${EPREFIX%/}${OTRS_HOME}/Kernel/Config/GenericAgent.pm\"" > "${T}/50${PN}" || die |
466 |
+ |
467 |
+ eapply_user |
468 |
+} |
469 |
+ |
470 |
+# This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred |
471 |
+pkg_config() { |
472 |
+ einfo "Installing cronjobs" |
473 |
+ crontab -u otrs "${EROOT%/}"/usr/share/doc/${PF}/crontab || die |
474 |
+} |
475 |
+ |
476 |
+src_install() { |
477 |
+ dodoc CHANGES.md README* |
478 |
+ |
479 |
+ insinto "${OTRS_HOME}" |
480 |
+ doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE \ |
481 |
+ Custom Kernel bin scripts var |
482 |
+ |
483 |
+ cat "${S}"/var/cron/*.dist > "${T}"/crontab || die |
484 |
+ insinto /usr/share/doc/${PF}/ |
485 |
+ doins "${T}"/crontab |
486 |
+ |
487 |
+ local a |
488 |
+ for a in article log pics/images pics/stats pics sessions spool tmp tmp/CacheFileStorable |
489 |
+ do |
490 |
+ keepdir "${OTRS_HOME}/var/${a}" |
491 |
+ done |
492 |
+ doenvd "${T}/50${PN}" |
493 |
+ |
494 |
+ systemd_dounit "${FILESDIR}/otrs.service" |
495 |
+} |
496 |
+ |
497 |
+pkg_postinst() { |
498 |
+ einfo "Setting correct permissions ..." |
499 |
+ /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.SetPermissions.pl "${EROOT%/}${OTRS_HOME}" \ |
500 |
+ --otrs-user=otrs \ |
501 |
+ --web-group=apache \ |
502 |
+ || die "Could not set permissions" |
503 |
+ |
504 |
+ einfo "Installation done!" |
505 |
+ elog "1) Rebuild your config now by running the following commands:" |
506 |
+ elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Config::Rebuild" |
507 |
+ elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Cache::Delete" |
508 |
+ elog "" |
509 |
+ elog "2) Enable cronjobs with the following command:" |
510 |
+ elog "crontab -u otrs crontab" |
511 |
+ elog "" |
512 |
+ elog "3) systemd users: enable and start OTRS daemon:" |
513 |
+ elog "systemctl enable otrs" |
514 |
+ elog "systemctl start otrs" |
515 |
+} |