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