]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
1ba9661289c4fa08e40fc10b2f89b6909a7c7e8b
[packages/eventum.git] / eventum.spec
1 #
2 # Conditional build:
3 %bcond_with     order   # with experimental order patch
4
5 %define         rel             1.2
6 %define         subver  327
7 %define         githash 34e5417
8 %define         php_min_version 5.3.7
9 %include        /usr/lib/rpm/macros.php
10 Summary:        Eventum Issue / Bug tracking system
11 Summary(pl.UTF-8):      Eventum - system śledzenia spraw/błędów
12 Name:           eventum
13 Version:        3.0.6
14 Release:        %{?subver:1.%{subver}.%{?githash:g%{githash}.}}%{rel}
15 License:        GPL v2
16 Group:          Applications/WWW
17 #Source0:       https://github.com/eventum/eventum/releases/download/v%{version}/%{name}-%{version}.tar.gz
18 Source0:        %{name}-%{version}-%{subver}-g%{githash}.tar.gz
19 # Source0-md5:  7df9693ab6f2912a959a738c9ac89482
20 Source1:        %{name}-apache.conf
21 Source2:        %{name}-mail-queue.cron
22 Source3:        %{name}-mail-download.cron
23 Source4:        %{name}-reminder.cron
24 Source5:        %{name}-monitor.cron
25 Source6:        %{name}-cvs.php
26 Source8:        %{name}-irc.init
27 Source9:        %{name}-irc.sysconfig
28 Source10:       sphinx.crontab
29 Source13:       %{name}-router-postfix.sh
30 Source14:       %{name}.logrotate
31 Source15:       %{name}-lighttpd.conf
32 Source16:       http://www.isocra.com/images/updown2.gif
33 # Source16-md5: deb6eeb2552ba757d3a949ed10c4107d
34 Source17:       %{name}.tmpfiles
35 Patch2:         %{name}-order.patch
36 #Patch3:                group-users.patch
37 #Patch4:                https://github.com/glensc/eventum/compare/cf_escape.patch
38 # packaging patches that probably never go upstream
39 Patch100:       %{name}-paths.patch
40 Patch101:       %{name}-cvs-config.patch
41 Patch107:       %{name}-gettext.patch
42 Patch108:       autoload.patch
43 # some tests
44 Patch200:       %{name}-fixed-nav.patch
45 URL:            http://eventum.mysql.org/
46 BuildRequires:  /usr/bin/php
47 BuildRequires:  gettext-devel
48 BuildRequires:  php(core) >= %{php_min_version}
49 BuildRequires:  rpm-php-pearprov >= 4.0.2-98
50 BuildRequires:  rpmbuild(macros) >= 1.654
51 BuildRequires:  sed >= 4.0
52 Requires(postun):       /usr/sbin/groupdel
53 Requires(postun):       /usr/sbin/userdel
54 Requires(pre):  /bin/id
55 Requires(pre):  /usr/bin/getgid
56 Requires(pre):  /usr/sbin/groupadd
57 Requires(pre):  /usr/sbin/useradd
58 Requires:       fonts-TTF-RedHat-liberation
59 Requires:       php(core) >= %{php_min_version}
60 Requires:       php(filter)
61 Requires:       php(iconv)
62 Requires:       php(imap)
63 Requires:       php(json)
64 Requires:       php(mbstring)
65 Requires:       php(mysqli)
66 Requires:       php(pcre)
67 Requires:       php(session)
68 Requires:       php-Smarty >= 3.1
69 Requires:       php-Smarty-plugin-gettext
70 Requires:       php-ZendFramework-Config >= 2.4
71 Requires:       php-pear-DB
72 Requires:       php-pear-Mail
73 Requires:       php-pear-Mail_Mime
74 Requires:       php-pear-Mail_mimeDecode
75 Requires:       php-pear-Math_Stats
76 Requires:       php-pear-Net_DIME
77 Requires:       php-pear-Net_SMTP
78 Requires:       php-pear-Net_Socket
79 Requires:       php-pear-Net_URL
80 Requires:       php-pear-Net_UserAgent_Detect
81 Requires:       php-pear-PEAR-core
82 Requires:       php-pear-Text_Diff
83 Requires:       php-pear-XML_RPC
84 Requires:       php-psr-Log >= 1.0.0
85 Requires:       phplot >= 5.8.0
86 Requires:       webapps
87 Requires:       webserver(access)
88 Requires:       webserver(alias)
89 Requires:       webserver(indexfile)
90 Requires:       webserver(php) >= 4.2.0
91 Suggests:       localedb
92 Suggests:       php-pear-Net_LDAP2
93 Suggests:       webserver(setenv)
94 Provides:       group(eventum)
95 Provides:       user(eventum)
96 Obsoletes:      eventum-base < 3.0.3-1.305
97 Conflicts:      logrotate < 3.8.0
98 BuildArch:      noarch
99 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
100
101 %define         _noautoreq_pear ../init.php ../../init.php init.php /usr/share/eventum/init.php /etc/webapps/.* %{_appdir}/.* .*Smarty.class.php Services/JSON.php class.date_helper.php sphinxapi.php Net/LDAP2.* Auth/SASL.* Util.php smarty_internal.*
102
103 # exclude optional php dependencies
104 %define         _noautophp      php-gnupg php-hash php-pecl-http php-tk
105
106 %define         _noautoreq      %{_noautophp}
107
108 %define         _libdir         %{_prefix}/lib/%{name}
109 %define         _appdir         %{_datadir}/%{name}
110 %define         _smartydir      %{php_data_dir}/Smarty
111 %define         _webapps        /etc/webapps
112 %define         _webapp         %{name}
113 %define         _webappdir      %{_webapps}/%{_webapp}
114 %define         _sysconfdir     /etc/%{name}
115
116 %description
117 Eventum is a user-friendly and flexible issue tracking system that can
118 be used by a support department to track incoming technical support
119 requests, or by a software development team to quickly organize tasks
120 and bugs. Eventum is used by the MySQL AB Technical Support team, and
121 has allowed us to dramatically improve our response times.
122
123 %description -l pl.UTF-8
124 Eventum to przyjazny dla użytkownika system śledzenia spraw, który
125 może być używany przez dział obsługi do śledzenia przychodzących żądań
126 obsługi technicznej albo przez zespół tworzący oprogramowanie do
127 szybkiej organizacji zadań i błędów. Eventum jest używany przez zespół
128 Technical Support MySQL AB i umożliwił im znacząco poprawić czasy
129 reakcji.
130
131 %package setup
132 Summary:        Eventum setup package
133 Summary(pl.UTF-8):      Pakiet do wstępnej konfiguracji Eventum
134 Group:          Applications/WWW
135 Requires:       %{name} = %{version}-%{release}
136
137 %description setup
138 Install this package to configure initial Eventum installation. You
139 should uninstall this package when you're done, as it considered
140 insecure to keep the setup files in place.
141
142 %description setup -l pl.UTF-8
143 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Eventum po
144 pierwszej instalacji. Potem należy go odinstalować, jako że
145 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
146
147 %package doc
148 Summary:        Eventum documentation and Wiki
149 Group:          Documentation
150
151 %description doc
152 Eventum documentation and copy of Wiki.
153
154 %package mail-queue
155 Summary:        Eventum mail queue process
156 Summary(pl.UTF-8):      Przetwarzanie kolejki poczty Eventum
157 Group:          Applications/WWW
158 Requires:       %{name} = %{version}-%{release}
159 Requires:       crondaemon
160
161 %description mail-queue
162 Beginning with the first release of Eventum, emails are not directly
163 sent out from the various scripts, but rather added to a mail queue
164 table that is processed by a cron job. If an email cannot be sent, it
165 will be marked as such in the mail queue log, and the cron job script
166 will re-try to send it again the next time it runs.
167
168 This package contains the cron job.
169
170 %description mail-queue -l pl.UTF-8
171 Od pierwszego wydania Eventum poczta nie jest wysyłana bezpośrednio z
172 różnych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
173 Jeśli poczta nie może być wysłana, będzie odpowiednio oznaczona w logu
174 kolejki poczty, a skrypt z crona będzie próbował wysłać ją ponownie
175 następnym razem.
176
177 Ten pakiet zawiera zadanie dla crona.
178
179 %package mail-download
180 Summary:        Eventum email download
181 Summary(pl.UTF-8):      Ściąganie poczty Eventum
182 Group:          Applications/WWW
183 Requires:       %{name} = %{version}-%{release}
184 Requires:       crondaemon
185
186 %description mail-download
187 In order for Eventum's email integration feature to work, you need to
188 setup a cron job to run the script every so often.
189
190 This package contains the cron job.
191
192 %description mail-download -l pl.UTF-8
193 Aby integracja poczty elektronicznej w Eventum działała, trzeba
194 ustawić zadanie crona, aby uruchamiał odpowiedni skrypt wystarczająco
195 często.
196
197 Ten pakiet zawiera zadanie dla crona.
198
199 %package reminder
200 Summary:        Eventum Reminder System
201 Summary(pl.UTF-8):      System przypominania dla Eventum
202 Group:          Applications/WWW
203 Requires:       %{name} = %{version}-%{release}
204 Requires:       crondaemon
205
206 %description reminder
207 The reminder system was designed with the objective as serving as a
208 safe net for issues that need attention. Depending on what
209 configuration you create, you may have several reminders (or alerts)
210 be sent out whenever an issue needs attention, for whatever parameter
211 you may deem necessary.
212
213 This package contains the cron job.
214
215 %description reminder -l pl.UTF-8
216 System przypominania został zaprojektowany tak, aby służył jako
217 bezpieczna sieć dla spraw wymagających uwagi. W zależności od
218 konfiguracji można ustawić różne przypominajki (lub alarmy) wysyłane
219 przy każdej sprawie wymagającej uwagi lub przy parametrze, który można
220 uważać za potrzebny.
221
222 Ten pakiet zawiera zadanie dla crona.
223
224 %package monitor
225 Summary:        Eventum Heartbeat Monitor
226 Summary(pl.UTF-8):      Monitor życia dla Eventum
227 Group:          Applications/WWW
228 Requires:       %{name} = %{version}-%{release}
229 Requires:       crondaemon
230 Requires:       php(posix)
231
232 %description monitor
233 The heartbeat monitor is a feature designed for the administrator that
234 wants to be alerted whenever a common problem in Eventum is detected,
235 like the database server not being available anymore, or maybe when
236 the recommended permissions for certain configuration files are
237 changed.
238
239 Please note that before running the heartbeat monitor, you may need to
240 customize some of the checks to be appropriate for your own system,
241 particularly the permission and file checks on
242 Monitor::checkConfiguration().
243
244 This package contains the cron job.
245
246 %description monitor -l pl.UTF-8
247 Monitor życia to funkcjonalność zaprojektowana dla administratora
248 chcącego być alarmowanym przy każdym wykryciu popularnego problemu z
249 Eventum, jak nie działanie serwera bazy danych albo zmiana uprawnień
250 do plików konfiguracyjnych.
251
252 Należy zauważyć, że przed uruchomieniem tego monitora może być
253 konieczne dostosowanie niektórych testów do systemu, w szczególności
254 testów uprawnień i plików w Monitor::checkConfiguration().
255
256 Ten pakiet zawiera zadanie dla crona.
257
258 %package route-drafts
259 Summary:        Eventum Draft Routing
260 Summary(pl.UTF-8):      Przekazywanie szkiców dla Eventum
261 Group:          Applications/WWW
262 Requires:       %{name} = %{version}-%{release}
263 Requires:       eventum(router)
264
265 %description route-drafts
266 The draft routing feature is used to automatically associate a thread
267 of drafts into an Eventum issue. By setting up Postfix to deliver
268 emails sent to a specific address (usually draft-<number>@<domain>) to
269 the above script, users are able to send drafts written in their mail
270 client to be stored in Eventum. These drafts will NOT broadcasted to
271 the notification list.
272
273 %description route-drafts -l pl.UTF-8
274 Przekazywanie szkiców służy do automatycznego wiązania wątku szkiców z
275 problemem w Eventum. Ustawiając Postfiksa, aby dostarczał pocztę
276 wysłaną na podany adres (zwykle draft-<liczba>@<domena>) do tego
277 skryptu umożliwia się użytkownikom wysyłanie szkiców napisanych w ich
278 kliencie pocztowym do zapisania w Eventum. Szkice te NIE będą wysyłane
279 na listę powiadomień.
280
281 %package route-emails
282 Summary:        Eventum Email Routing
283 Summary(pl.UTF-8):      Przekazywanie poczty dla Eventum
284 Group:          Applications/WWW
285 Requires:       %{name} = %{version}-%{release}
286 Requires:       eventum(router)
287
288 %description route-emails
289 The email routing feature is used to automatically associate a thread
290 of emails into an Eventum issue. By setting up Postfix to deliver
291 emails sent to a specific address (usually issue-<number>@<domain>) to
292 the above script, users are able to use their email clients to reply
293 to emails coming from Eventum, and those replies will be automatically
294 associated with the issue and broadcasted to the entire notification
295 list.
296
297 %description route-emails -l pl.UTF-8
298 Funkcjonalność przekazywania poczty służy do automatycznego wiązania
299 wątku listów ze sprawą w Eventum. Po ustawieniu czy nawet Postfiksa,
300 aby dostarczał listy wysyłane na pewien adres (zwykle
301 issue-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
302 używać klientów pocztowych do odpowiadania na listy przychodzące z
303 Eventum, a odpowiedzi te będą automatycznie wiązane ze sprawą i
304 rozprowadzane do całej listy ogłoszeniowej.
305
306 %package route-notes
307 Summary:        Eventum Note Routing
308 Summary(pl.UTF-8):      Przekazywanie notatek dla Eventum
309 Group:          Applications/WWW
310 Requires:       %{name} = %{version}-%{release}
311 Requires:       eventum(router)
312
313 %description route-notes
314 The note routing feature is used to automatically associate a thread
315 of notes into an Eventum issue. By setting up Postfix to deliver
316 emails sent to a specific address (usually note-<number>@<domain>) to
317 the above script, users are able to use their email clients to reply
318 to internal notes coming from Eventum, and those replies will be
319 automatically associated with the issue and broadcasted to the
320 notification list staff members.
321
322 %description route-notes -l pl.UTF-8
323 Funkcjonalność przekazywania notatek służy do automatycznego wiązania
324 wątku notatek ze sprawą w Eventum. Po ustawieniu Postfiksa, aby
325 dostarczał listy wysyłane na pewien adres (zwykle
326 note-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
327 używać klientów pocztowych do odpowiadania na wewnętrzne notatki
328 pochodzące od Eventu, a odpowiedzi te będą automatycznie wiązane ze
329 sprawą i rozprowadzane do członków personelu listy ogłoszeniowej.
330
331 %package router-postfix
332 Summary:        Eventum Mail Routing - Postfix
333 Summary(pl.UTF-8):      Przekazywanie poczty Eventum - Postfix
334 Group:          Applications/Mail
335 Requires:       %{name} = %{version}-%{release}
336 Requires:       postfix
337 Provides:       eventum(router)
338 Obsoletes:      eventum(router)
339
340 %description router-postfix
341 This package provides way of routing notes and emails back to Eventum
342 via Postfix.
343
344 The Postfix configuration instructions you can find from
345 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
346
347 %description router-postfix -l pl.UTF-8
348 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
349 przez Postfiksa.
350
351 Opis konfiguracji Postfiksa można znaleźć pod adresem
352 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
353
354 %package irc
355 Summary:        Eventum IRC Notification Bot
356 Summary(pl.UTF-8):      IRC-owy bot powiadamiający dla Eventum
357 Group:          Applications/WWW
358 Requires(post,preun):   /sbin/chkconfig
359 Requires:       %{name} = %{version}-%{release}
360 Requires:       php(pcntl)
361 Requires:       php(sockets)
362 Requires:       php-pear-Net_SmartIRC >= 1.1.9
363 Requires:       rc-scripts >= 0.4.0.18
364
365 %description irc
366 The IRC notification bot is a nice feature for remote teams that want
367 to handle issues and want to have a quick and easy way to get simple
368 notifications. Right now the bot notifies of the following actions:
369 - New Issues
370 - Blocked emails
371 - Issues that got their assignment list changed
372
373 NOTE: You will need to manually edit the bot.php script to set your
374 appropriate preferences, like IRC server and channel that the bot
375 should join.
376
377 %description irc -l pl.UTF-8
378 IRC-owy bot powiadamiający to miła funkcjonalność dla zdalnych
379 zespołów chcących obsługiwać sprawy i mieć szybki i łatwy sposób na
380 uzyskiwanie prostych powiadomień. Aktualnie bot powiadamia o
381 następujących zdarzeniach:
382 - nowych sprawach
383 - zablokowanych listach
384 - sprawach, dla których zmieniła się lista powiązań
385
386 UWAGA: w celu wprowadzenia własnych ustawień, takich jak serwer IRC i
387 kanał używany przez bota, trzeba ręcznie zmodyfikować skrypt bot.php .
388
389 %package cli
390 Summary:        Eventum command-line interface
391 Summary(pl.UTF-8):      Interfejs linii poleceń dla Eventum
392 Group:          Applications/WWW
393 Requires:       php(core) >= %{php_min_version}
394 Requires:       php(phar)
395 Requires:       php-pear-XML_RPC
396
397 %description cli
398 The Eventum command-line interface allows you to access most of the
399 features of the web interface straight from your command shell.
400
401 %description cli -l pl.UTF-8
402 Interfejs linii poleceń Eventum pozwala na dostęp do większości
403 funkcji interfejsu WWW prosto z linii poleceń powłoki.
404
405 %package scm
406 Summary:        Eventum SCM integration
407 Summary(pl.UTF-8):      Integracja SCM dla Eventum
408 Group:          Applications/WWW
409 Requires:       php(core) >= %{php_min_version}
410 Requires:       php(json)
411 Requires:       php(pcre)
412 Requires:       php(spl)
413 Suggests:       cvs
414 Suggests:       git-core
415 Suggests:       php(openssl)
416 Suggests:       subversion
417
418 %description scm
419 This feature allows your software development teams to integrate your
420 Source Control Management system with your Issue Tracking System.
421
422 The integration is implemented in such a way that it will be forward
423 compatible with pretty much any SCM system, such as CVS.
424
425 For installation see
426 </eventum/help.php?topic=scm_integration_installation>.
427
428 %description scm -l pl.UTF-8
429 Ten pakiet pozwala zespołom programistów na integrację systemu
430 zarządzania źródłami (SCM - Source Control Management) z systemem
431 śledzenia spraw.
432
433 Integracja jest zaimplementowana tak, aby być kompatybilna w przód z
434 prawie każdym systemem SCM, jak np. CVS.
435
436 Szczegóły na temat instalacji można przeczytać pod
437 </eventum/help.php?topic=scm_integration_installation>.
438
439 %package sphinx
440 Summary:        Eventum Sphinx Search
441 Group:          Applications/WWW
442 Requires:       %{name} = %{version}-%{release}
443 Requires:       crondaemon
444 Requires:       sphinx
445
446 %description sphinx
447 Sphinx search integration for Eventum.
448
449 This package contains the cron job.
450
451 %prep
452 %setup -q -n %{name}-%{version}%{?githash:-%{subver}-g%{githash}}
453
454 mv docs/examples .
455
456 # bug fixes / features
457 %{?with_order:%patch2 -p1}
458 #%patch3 -p0
459 #%patch4 -p1
460
461 %{?with_order:cp -p %{SOURCE16} htdocs/images}
462
463 #%patch200 -p1
464
465 # produce default sphinx config
466 # must be run before paths.patch
467 %if 0
468 cat <<'EOF' > config/config.php
469 <?php
470 define('APP_SQL_DBTYPE', 'mysql');
471 define('APP_SQL_DBHOST', 'localhost:/var/lib/mysql/mysql.sock');
472 define('APP_SQL_DBPORT', 3306);
473 define('APP_SQL_DBNAME', 'eventum');
474 define('APP_SQL_DBUSER', 'mysql');
475 define('APP_SQL_DBPASS', '');
476 define('APP_TABLE_PREFIX', 'eventum_');
477 EOF
478 php config/sphinx.conf.php > config/sphinx.conf
479 rm config/config.php
480 %endif
481
482 # packaging
483 %patch100 -p1
484 %patch101 -p1
485 %patch107 -p1
486 %patch108 -p1
487
488 rm htdocs/.htaccess.dist
489
490 # cleanup vendor. keep only needed libraries.
491 # (the rest are packaged with system packages)
492 mv vendor vendor.dist
493 vendor() {
494         local path dir
495         for path; do
496                 dir=$(dirname $path)
497                 test -d vendor/$dir || mkdir -p vendor/$dir
498                 mv vendor.dist/$path vendor/$path
499         done
500 }
501 vendor autoload.php
502 vendor composer/autoload_{classmap,files,namespaces,real,psr4}.php
503 vendor composer/ClassLoader.php
504 vendor ircmaxell/{password-compat,random-lib,security-lib}
505
506 # remove backups from patching as we use globs to package files to buildroot
507 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
508
509 %build
510 %{__make} -C localization
511
512 %install
513 rm -rf $RPM_BUILD_ROOT
514 install -d \
515         $RPM_BUILD_ROOT{%{_webappdir}/{custom_field,templates,workflow},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
516         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,logrotate.d,sysconfig} \
517         $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
518         $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \
519         $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
520         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
521
522 %{__make} install-eventum install-cli install-scm install-localization \
523         sysconfdir=%{_webappdir} \
524         localedir=%{_localedir} \
525         DESTDIR=$RPM_BUILD_ROOT
526
527 ln -s %{_webappdir} $RPM_BUILD_ROOT%{_appdir}/config
528
529 cp -a vendor $RPM_BUILD_ROOT%{_appdir}
530
531 # unsupported locale
532 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ht
533
534 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
535 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
536
537 %{?with_order:cp -a htdocs/ajax $RPM_BUILD_ROOT%{_appdir}/htdocs}
538
539 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
540 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
541 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
542 cp -p %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
543
544 install -d $RPM_BUILD_ROOT/etc/sphinx
545 #cp -p config/sphinx.conf $RPM_BUILD_ROOT/etc/sphinx/%{name}.conf
546 cp -p config/sphinx.conf.php $RPM_BUILD_ROOT%{_webappdir}
547
548 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
549 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
550 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
551 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
552 cp -p %{SOURCE10} $RPM_BUILD_ROOT/etc/cron.d/%{name}-sphinx
553
554 cp -p config/irc_config.dist.php $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
555
556 install -p %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
557 cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
558
559 cp -p %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
560
561 # postfix router
562 install -p %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
563
564 cp -p %{SOURCE17} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
565
566 %find_lang %{name}
567
568 # scm
569 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
570
571 %clean
572 rm -rf $RPM_BUILD_ROOT
573
574 %pre
575 %groupadd -g 146 %{name}
576 %useradd -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
577 %addusertogroup http %{name}
578
579 %post
580 # create empty ghost files
581 # these permissions ensure the logs are write only
582 for a in \
583         errors.log login_attempts.log \
584         cli.log \
585         irc_bot_error.log irc_bot_smartirc.log \
586 ; do
587         test -f /var/log/%{name}/$a && continue
588         install -m 0620 -o root -g http /dev/null /var/log/%{name}/$a
589 done
590
591 # run database update if configured
592 test -s %{_webappdir}/config.php && \
593 %{_appdir}/bin/upgrade.php || :
594
595 # nuke Smarty templates cache after upgrade
596 rm -f /var/cache/eventum/*.php
597
598 # Restart webserver on upgrade to get .mo translations reloaded.
599 # actually php engines "php-fcgi" and "php-fpm" needed only, apache is restarted anyway via webapp trigger.
600 %php_webserver_restart
601
602 %preun
603 if [ "$1" = "0" ]; then
604         # nuke cache
605         rm -f /var/cache/eventum/*.php 2>/dev/null || :
606 fi
607
608 %postun
609 if [ "$1" = "0" ]; then
610         %userremove %{name}
611         %groupremove %{name}
612 fi
613
614 %post setup
615 chmod 660 %{_webappdir}/{config,private_key}.php
616 chown root:http %{_webappdir}/{config,private_key}.php
617
618 %postun setup
619 if [ "$1" = "0" ] && [ -f %{_webappdir}/config.php ]; then
620         chmod 640 %{_webappdir}/{config,private_key}.php
621         chown root:http %{_webappdir}/{config,private_key}.php
622 fi
623
624 %post irc
625 /sbin/chkconfig --add eventum-irc
626 %service eventum-irc restart "Eventum IRC Bot"
627
628 %preun irc
629 if [ "$1" = 0 ]; then
630         %service eventum-irc stop
631         /sbin/chkconfig --del eventum-irc
632 fi
633
634 %triggerin -- apache1 < 1.3.37-3, apache1-base
635 %webapp_register apache %{_webapp}
636
637 %triggerun -- apache1 < 1.3.37-3, apache1-base
638 %webapp_unregister apache %{_webapp}
639
640 %triggerin -- apache < 2.2.0, apache-base
641 %webapp_register httpd %{_webapp}
642
643 %triggerun -- apache < 2.2.0, apache-base
644 %webapp_unregister httpd %{_webapp}
645
646 %triggerin -- lighttpd
647 %webapp_register lighttpd %{_webapp}
648
649 %triggerun -- lighttpd
650 %webapp_unregister lighttpd %{_webapp}
651
652 %triggerpostun -- %{name} < 3.0.0-0.2
653 for f in /etc/cron.d/eventum-*; do
654         # crontabs moved to bin
655         %{__sed} -i -e '
656                 s,/usr/share/eventum/crons/process_mail_queue.php,%{_appdir}/bin/process_mail_queue.php,
657                 s,/usr/share/eventum/crons/download_emails.php,%{_appdir}/bin/download_emails.php,
658                 s,/usr/share/eventum/crons/check_reminders.php,%{_appdir}/bin/check_reminders.php,
659                 s,/usr/share/eventum/crons/monitor.php,%{_appdir}/bin/monitor.php,
660         ' $f
661 done
662
663 %files -f %{name}.lang
664 %defattr(644,root,root,755)
665 %attr(751,root,root) %dir %{_webappdir}
666 %attr(751,root,root) %dir %{_webappdir}/custom_field
667 %attr(751,root,root) %dir %{_webappdir}/templates
668 %attr(751,root,root) %dir %{_webappdir}/workflow
669 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
670 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
671 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
672 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
673 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
674 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
675 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
676
677 %dir %attr(711,root,http) /var/log/%{name}
678 %attr(620,root,http) %ghost /var/log/%{name}/*
679 %dir %attr(750,root,root) /var/log/archive/%{name}
680 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
681
682 %dir %{_appdir}
683 %{_appdir}/config
684
685 %dir %{_appdir}/bin
686 %attr(755,root,root) %{_appdir}/bin/process_all_emails.php
687 %attr(755,root,root) %{_appdir}/bin/upgrade.php
688
689 %{_appdir}/autoload.php
690 %{_appdir}/init.php
691 %dir %{_appdir}/htdocs
692 %{_appdir}/htdocs/*.php
693 %{_appdir}/htdocs/*.ico
694 %{_appdir}/htdocs/ajax
695 %{_appdir}/htdocs/css
696 %{_appdir}/htdocs/customer
697 %{_appdir}/htdocs/images
698 %{_appdir}/htdocs/js
699 %{_appdir}/htdocs/manage
700 %{_appdir}/htdocs/reports
701 %{_appdir}/htdocs/rpc
702 %{_appdir}/htdocs/components
703 %{_appdir}/templates
704
705 %dir %{_appdir}/upgrade
706 %{_appdir}/upgrade/flush_compiled_templates.php
707 %{_appdir}/upgrade/*.sql
708 %attr(755,root,root) %{_appdir}/upgrade/ldap_import.php
709 %attr(755,root,root) %{_appdir}/upgrade/ldap_update_users.php
710 %attr(755,root,root) %{_appdir}/upgrade/scm_trac_import.php
711 %{_appdir}/upgrade/patches
712
713 %{_appdir}/vendor
714
715 %dir %{_appdir}/lib
716 %{_appdir}/lib/eventum
717 %exclude %{_appdir}/lib/eventum/class.monitor.php
718
719 %dir %{_libdir}
720
721 %{systemdtmpfilesdir}/%{name}.conf
722
723 %dir /var/lib/%{name}
724 %dir %attr(730,root,http) /var/run/%{name}
725 %dir %attr(730,root,http) /var/cache/%{name}
726
727 # saved mail copies
728 %attr(770,root,http) %dir /var/lib/%{name}/routed_emails
729 %attr(770,root,http) %dir /var/lib/%{name}/routed_drafts
730 %attr(770,root,http) %dir /var/lib/%{name}/routed_notes
731
732 %files setup
733 %defattr(644,root,root,755)
734 %{_appdir}/htdocs/setup
735
736 %files doc
737 %defattr(644,root,root,755)
738 %doc docs/*
739 %{_examplesdir}/%{name}-%{version}
740
741 %files mail-queue
742 %defattr(644,root,root,755)
743 %attr(755,root,root) %{_appdir}/bin/process_mail_queue.php
744 %attr(755,root,root) %{_appdir}/bin/truncate_mail_queue.php
745 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
746
747 %files mail-download
748 %defattr(644,root,root,755)
749 %attr(755,root,root) %{_appdir}/bin/download_emails.php
750 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
751
752 %files reminder
753 %defattr(644,root,root,755)
754 %attr(755,root,root) %{_appdir}/bin/check_reminders.php
755 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
756
757 %files monitor
758 %defattr(644,root,root,755)
759 %{_appdir}/lib/eventum/class.monitor.php
760 %attr(755,root,root) %{_appdir}/bin/monitor.php
761 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
762
763 %files route-drafts
764 %defattr(644,root,root,755)
765 %attr(755,root,root) %{_appdir}/bin/route_drafts.php
766
767 %files route-emails
768 %defattr(644,root,root,755)
769 %attr(755,root,root) %{_appdir}/bin/route_emails.php
770
771 %files route-notes
772 %defattr(644,root,root,755)
773 %attr(755,root,root) %{_appdir}/bin/route_notes.php
774
775 %files router-postfix
776 %defattr(644,root,root,755)
777 %attr(755,root,root) %{_libdir}/router-postfix
778
779 %files irc
780 %defattr(644,root,root,755)
781 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
782 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
783 %attr(755,root,root) %{_appdir}/bin/irc-bot.php
784 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
785
786 %files cli
787 %defattr(644,root,root,755)
788 %doc cli/eventumrc
789 %attr(755,root,root) %{_bindir}/%{name}
790
791 %files scm
792 %defattr(644,root,root,755)
793 %attr(751,root,root) %dir %{_sysconfdir}
794 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
795 %attr(755,root,root) %{_sbindir}/eventum-cvs-hook
796 %attr(755,root,root) %{_sbindir}/eventum-git-hook
797 %attr(755,root,root) %{_sbindir}/eventum-svn-hook
798 %attr(755,root,root) %{_sbindir}/helpers.php
799
800 %files sphinx
801 %defattr(644,root,root,755)
802 %{_webappdir}/sphinx.conf.php
803 #%attr(750,root,http) %config(noreplace) %verify(not md5 mtime size) /etc/sphinx/%{name}.conf
804 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-sphinx
This page took 0.074345 seconds and 3 git commands to generate.