1 |
%define _exclude_files_from_autoprov %{_var}/www/otrs/Kernel/cpan-lib |
2 |
%define _requires_exceptions perl.Kernel\\|perl.HTML..Safe.|perl.Algorithm|perl.Apache|perl.Authen|perl.Crypt|perl.Date|perl.File|perl.IO|perl.MIME|perl.Mail|perl.Net|perl.Text|perl.XML |
3 |
%define _provides_exceptions %_requires_exceptions |
4 |
Name: otrs |
5 |
Version: 3.1.2 |
6 |
Release: %mkrel 1 |
7 |
Summary: The Open Ticket Request System |
8 |
License: GPLv3+ |
9 |
Group: Networking/Other |
10 |
URL: http://www.otrs.com |
11 |
Source: http://ftp.otrs.org/pub/otrs/otrs-%{version}.tar.bz2 |
12 |
# Disable Auto requires/provides as it conflicts with a lot of perl rpms |
13 |
AutoReqProv: 1 |
14 |
Requires: apache-mod_perl |
15 |
Requires: perl-CGI |
16 |
Requires: perl-DBI |
17 |
Requires: perl-DBD-mysql |
18 |
Requires: perl-Digest-MD5 |
19 |
Requires: perl-MIME-Base64 |
20 |
Requires: perl-MIME-tools |
21 |
Requires: perl-Net-DNS |
22 |
Requires: perl-Authen-SASL |
23 |
Suggests: perl-GDTextUtil |
24 |
Suggests: perl-GDGraph |
25 |
Suggests: perl-PDF-API2 |
26 |
Requires: perl-Compress-Raw-Zlib |
27 |
Requires: perl-Date-Calc |
28 |
Suggests: perl-IO-Socket-SSL |
29 |
Suggests: perl-Encode-HanExtra |
30 |
Suggests: perl-Net-IMAP-Simple-SSL |
31 |
Suggests: perl-ldap |
32 |
Suggests: perl-SOAP-Lite |
33 |
Suggests: perl-Apache-DBI |
34 |
Suggests: perl-Net-SMTP-SSL |
35 |
Suggests: perl-Authen-Radius |
36 |
Suggests: procmail |
37 |
Requires: perl(Algorithm::Diff) |
38 |
Requires: perl(Apache::DBI) |
39 |
Requires: perl(Apache2::Reload) |
40 |
Requires: perl(Authen::SASL) |
41 |
Requires: perl(CGI) |
42 |
Requires: perl(Crypt::PasswdMD5) |
43 |
Requires: perl(Date::Pcalc) |
44 |
Requires: perl(Digest::SHA::PurePerl) |
45 |
Requires: perl(File::Temp) |
46 |
Requires: perl-IO-stringy |
47 |
Requires: perl(JSON::PP) |
48 |
Requires: perl(CSS) |
49 |
Requires: perl(JavaScript) |
50 |
Requires: perl-MIME-tools |
51 |
Requires: perl-MailTools |
52 |
Requires: perl(Net::IMAP::Simple) |
53 |
Requires: perl(Net::SMTP::SSL) |
54 |
Requires: perl(Text::CSV) |
55 |
Requires: perl(Text::Diff) |
56 |
Requires: perl(XML::FeedPP) |
57 |
Requires: perl(XML::Parser::Lite) |
58 |
BuildArch: noarch |
59 |
|
60 |
%description |
61 |
OTRS is the leading open-source Help Desk and IT Service Management (ITSM) |
62 |
solution used by thousands of organizations worldwide, enabling transparency |
63 |
and collaboration for service desk and customer support teams, including those |
64 |
implementing ITIL Best Practices. OTRS Group offers consulting, support, |
65 |
customization and hosting services. |
66 |
|
67 |
%prep |
68 |
%setup |
69 |
|
70 |
%build |
71 |
pushd Kernel/cpan-lib/ |
72 |
rm -rf Algorithm/ Apache Apache2 Authen/ CGI* Crypt/ Date/ Digest/ File/ IO/ JSON* CSS/ JavaScript/ MIME/ Mail/ Net/IMAP/ Net/SMTP/ Text/ XML/ |
73 |
popd |
74 |
|
75 |
find -type f | xargs perl -pi -e "s|/opt|/var/www|g" |
76 |
# copy config file |
77 |
cp Kernel/Config.pm.dist Kernel/Config.pm |
78 |
cd Kernel/Config/ && for foo in *.dist; do cp $foo `basename $foo .dist`; done && cd ../../ |
79 |
# copy all crontab dist files |
80 |
for foo in var/cron/*.dist; do mv $foo var/cron/`basename $foo .dist`; done |
81 |
# copy all .dist files |
82 |
cp .procmailrc.dist .procmailrc |
83 |
cp .fetchmailrc.dist .fetchmailrc |
84 |
cp .mailfilter.dist .mailfilter |
85 |
|
86 |
%install |
87 |
rm -rf %{buildroot} |
88 |
|
89 |
# set DESTROOT |
90 |
export DESTROOT="/var/www/otrs" |
91 |
install -d %{buildroot}%{_var}/www/otrs |
92 |
cp -R . %{buildroot}%{_var}/www/otrs |
93 |
|
94 |
install -d -m 755 %{buildroot}/%{_webconfdir}/webapps.d |
95 |
|
96 |
cat > %{buildroot}/%{_webconfdir}/webapps.d/otrs.conf << EOF |
97 |
|
98 |
# added for OTRS (http://otrs.org/) |
99 |
#$Id: installation-and-basic-configuration.xml,v 1.24 2009/08/27 22:34:47 martin Exp $ |
100 |
|
101 |
# agent, admin and customer frontend |
102 |
ScriptAlias /otrs/ "/var/www/otrs/bin/cgi-bin/" |
103 |
Alias /otrs-web/ "/var/www/otrs/var/httpd/htdocs/" |
104 |
# if mod_perl is used |
105 |
<IfModule mod_perl.c> |
106 |
# load all otrs modules |
107 |
Perlrequire /var/www/otrs/scripts/apache2-perl-startup.pl |
108 |
# Apache::Reload - Reload Perl Modules when Changed on Disk |
109 |
PerlModule Apache2::Reload |
110 |
PerlInitHandler Apache2::Reload |
111 |
PerlModule Apache2::RequestRec |
112 |
|
113 |
# set mod_perl2 options |
114 |
<Location /otrs> |
115 |
# ErrorDocument 403 /otrs/customer.pl |
116 |
ErrorDocument 403 /otrs/index.pl |
117 |
SetHandler perl-script |
118 |
PerlResponseHandler ModPerl::Registry |
119 |
Options +ExecCGI |
120 |
# |
121 |
PerlOptions +ParseHeaders |
122 |
PerlOptions +SetupEnv |
123 |
Order allow,deny |
124 |
Allow from all |
125 |
</Location> |
126 |
</IfModule> |
127 |
|
128 |
# directory settings |
129 |
<Directory "/var/www/otrs/bin/cgi-bin/"> |
130 |
AllowOverride None |
131 |
Options +ExecCGI -Includes |
132 |
Order allow,deny |
133 |
Allow from all |
134 |
</Directory> |
135 |
|
136 |
<Directory "/var/www/otrs/var/httpd/htdocs/"> |
137 |
AllowOverride None |
138 |
Order allow,deny |
139 |
Allow from all |
140 |
</Directory> |
141 |
# MaxRequestsPerChild (so no apache child will be to big!) |
142 |
MaxRequestsPerChild 400 |
143 |
EOF |
144 |
|
145 |
%pre |
146 |
%_pre_useradd otrs %{_var}/www/otrs /bin/false |
147 |
|
148 |
%preun |
149 |
%{_var}/www/otrs/bin/Cron.sh stop otrs |
150 |
|
151 |
%post |
152 |
%{_var}/www/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=otrs --web-group=apache %{_var}/www/otrs |
153 |
cd %{_var}/www/otrs/var/cron |
154 |
for foo in *.dist; do cp $foo `basename $foo .dist`; done |
155 |
%{_var}/www/otrs/bin/Cron.sh start otrs |
156 |
|
157 |
%postun |
158 |
%_postun_userdel otrs |
159 |
%_postun_groupdel otrs |
160 |
|
161 |
%files |
162 |
%doc doc/* doc/manual/* ARCHIVE CHANGES COPYING COPYING-Third-Party CREDITS |
163 |
%doc INSTALL INSTALL.RedHat INSTALL.SuSE README README.database README.webserver |
164 |
%doc UPGRADING |
165 |
%dir %{_var}/www/otrs/doc/ |
166 |
%{_var}/www/otrs/ARCHIVE |
167 |
%{_var}/www/otrs/CHANGES |
168 |
%{_var}/www/otrs/COPYING |
169 |
%{_var}/www/otrs/COPYING-Third-Party |
170 |
%{_var}/www/otrs/CREDITS |
171 |
%dir %{_var}/www/otrs/Custom/ |
172 |
%{_var}/www/otrs/INSTALL |
173 |
%{_var}/www/otrs/INSTALL.RedHat |
174 |
%{_var}/www/otrs/INSTALL.SuSE |
175 |
%{_var}/www/otrs/README |
176 |
%{_var}/www/otrs/README.database |
177 |
%{_var}/www/otrs/README.webserver |
178 |
%{_var}/www/otrs/UPGRADING |
179 |
%dir %{_var}/www/otrs/var/fonts/ |
180 |
%{_var}/www/otrs/var/fonts/* |
181 |
%{_var}/www/otrs/RELEASE |
182 |
%config(noreplace) %{_webconfdir}/webapps.d/otrs.conf |
183 |
%config(noreplace) %attr(0644,otrs,apache) %{_var}/www/otrs/Kernel/Config.pm |
184 |
%config(noreplace) %{_var}/www/otrs/Kernel/Config/GenericAgent.pm |
185 |
%config(noreplace) %{_var}/www/otrs/.procmailrc |
186 |
%config(noreplace) %{_var}/www/otrs/.fetchmailrc |
187 |
%config(noreplace) %{_var}/www/otrs/.mailfilter |
188 |
%config(noreplace) %{_var}/www/otrs/Kernel/Output/HTML/Standard/*.dtl |
189 |
#config(noreplace) %{_var}/www/otrs/Kernel/Output/HTML/Lite/*.dtl |
190 |
%config(noreplace) %{_var}/www/otrs/Kernel/Language/*.pm |
191 |
%config(noreplace) %{_var}/www/otrs/var/cron/* |
192 |
%config(noreplace) %{_var}/www/otrs/var/logo-otrs.png |
193 |
|
194 |
%attr(0775,otrs,apache) %dir %{_var}/www/otrs/ |
195 |
%{_var}/www/otrs/.procmailrc.dist |
196 |
%{_var}/www/otrs/.fetchmailrc.dist |
197 |
%{_var}/www/otrs/.mailfilter.dist |
198 |
%dir %{_var}/www/otrs/Kernel/ |
199 |
%dir %{_var}/www/otrs/Kernel/Config/ |
200 |
%{_var}/www/otrs/Kernel/Config.pm.dist |
201 |
%attr(0775,otrs,apache) %{_var}/www/otrs/Kernel/Config/Files/ |
202 |
%{_var}/www/otrs/Kernel/Config/GenericAgent.pm.dist |
203 |
%{_var}/www/otrs/Kernel/Config/GenericAgent.pm.examples |
204 |
%{_var}/www/otrs/Kernel/Config/Defaults.pm |
205 |
%{_var}/www/otrs/Kernel/Language.pm |
206 |
%dir %{_var}/www/otrs/Kernel/Language/ |
207 |
%{_var}/www/otrs/Kernel/Modules* |
208 |
%dir %{_var}/www/otrs/Kernel/Output/ |
209 |
%dir %{_var}/www/otrs/Kernel/Output/HTML/ |
210 |
%dir %{_var}/www/otrs/Kernel/Output/HTML/Standard/ |
211 |
#dir %{_var}/www/otrs/Kernel/Output/HTML/Lite/ |
212 |
%{_var}/www/otrs/Kernel/Output/HTML/*.pm |
213 |
%{_var}/www/otrs/Kernel/System* |
214 |
%attr(0775,otrs,apache) %{_var}/www/otrs/bin* |
215 |
%{_var}/www/otrs/scripts* |
216 |
%dir %{_var}/www/otrs/var/ |
217 |
%dir %{_var}/www/otrs/var/packages/ |
218 |
%{_var}/www/otrs/var/packages/*.opm |
219 |
%attr(0775,otrs,apache) %dir %{_var}/www/otrs/var/article/ |
220 |
%{_var}/www/otrs/var/httpd/ |
221 |
%attr(0775,otrs,apache) %dir %{_var}/www/otrs/var/log/ |
222 |
%attr(0775,otrs,apache) %dir %{_var}/www/otrs/var/sessions/ |
223 |
%attr(0775,otrs,apache) %dir %{_var}/www/otrs/var/spool/ |
224 |
%dir %{_var}/www/otrs/var/cron/ |
225 |
%attr(0775,otrs,apache) %dir %{_var}/www/otrs/var/tmp/ |
226 |
%attr(0775,otrs,apache) %dir %{_var}/www/otrs/var/stats/ |
227 |
%{_var}/www/otrs/var/stats/*.xml |
228 |
%dir %{_var}/www/otrs/var/tmp/Cache |
229 |
#dir %{_var}/www/otrs/var/pics/stats/ |
230 |
|
231 |
%{_var}/www/otrs/Kernel/cpan-lib* |
232 |
|
233 |
%{_var}/www/otrs/Custom/README |
234 |
%{_var}/www/otrs/Kernel/GenericInterface/Debugger.pm |
235 |
%{_var}/www/otrs/Kernel/GenericInterface/Event/Handler.pm |
236 |
%{_var}/www/otrs/Kernel/GenericInterface/Invoker.pm |
237 |
%{_var}/www/otrs/Kernel/GenericInterface/Invoker/Test/Test.pm |
238 |
%{_var}/www/otrs/Kernel/GenericInterface/Invoker/Test/TestSimple.pm |
239 |
%{_var}/www/otrs/Kernel/GenericInterface/Mapping.pm |
240 |
%{_var}/www/otrs/Kernel/GenericInterface/Mapping/Simple.pm |
241 |
%{_var}/www/otrs/Kernel/GenericInterface/Mapping/Test.pm |
242 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation.pm |
243 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Common.pm |
244 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Session/Common.pm |
245 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Session/SessionCreate.pm |
246 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Test/Test.pm |
247 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Ticket/Common.pm |
248 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Ticket/TicketCreate.pm |
249 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Ticket/TicketGet.pm |
250 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Ticket/TicketSearch.pm |
251 |
%{_var}/www/otrs/Kernel/GenericInterface/Operation/Ticket/TicketUpdate.pm |
252 |
%{_var}/www/otrs/Kernel/GenericInterface/Provider.pm |
253 |
%{_var}/www/otrs/Kernel/GenericInterface/Requester.pm |
254 |
%{_var}/www/otrs/Kernel/GenericInterface/Transport.pm |
255 |
%{_var}/www/otrs/Kernel/GenericInterface/Transport/HTTP/REST.pm |
256 |
%{_var}/www/otrs/Kernel/GenericInterface/Transport/HTTP/SOAP.pm |
257 |
%{_var}/www/otrs/Kernel/GenericInterface/Transport/HTTP/Test.pm |
258 |
%{_var}/www/otrs/Kernel/Scheduler.pm |
259 |
%{_var}/www/otrs/Kernel/Scheduler/TaskHandler.pm |
260 |
%{_var}/www/otrs/Kernel/Scheduler/TaskHandler/GenericInterface.pm |
261 |
%{_var}/www/otrs/Kernel/Scheduler/TaskHandler/Test.pm |
262 |
%{_var}/www/otrs/doc/OTRSDatabaseDiagram.mwb |
263 |
%{_var}/www/otrs/doc/OTRSDatabaseDiagram.png |
264 |
%{_var}/www/otrs/doc/X-OTRS-Headers.txt |
265 |
%{_var}/www/otrs/doc/manual/de/otrs_admin_book.pdf |
266 |
%{_var}/www/otrs/doc/manual/en/otrs_admin_book.pdf |
267 |
%{_var}/www/otrs/doc/sample_mails/Readme.txt |
268 |
%{_var}/www/otrs/doc/sample_mails/test-email-1.box |
269 |
%{_var}/www/otrs/doc/sample_mails/test-email-10-ks_c_5601-1987.box |
270 |
%{_var}/www/otrs/doc/sample_mails/test-email-2.box |
271 |
%{_var}/www/otrs/doc/sample_mails/test-email-3.box |
272 |
%{_var}/www/otrs/doc/sample_mails/test-email-4-html.box |
273 |
%{_var}/www/otrs/doc/sample_mails/test-email-5-iso-8859-1.box |
274 |
%{_var}/www/otrs/doc/sample_mails/test-email-6-euro-utf-8.box |
275 |
%{_var}/www/otrs/doc/sample_mails/test-email-7-euro-iso-8859-15.box |
276 |
%{_var}/www/otrs/doc/sample_mails/test-email-8-bulgarian-cp1251.box |
277 |
%{_var}/www/otrs/doc/sample_mails/test-email-9-html-multicharset.box |
278 |
|