]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- update to r3615
[packages/eventum.git] / eventum.spec
1 # TODO
2 # - discard bundled packages (from INSTALL):
3 #  - JpGraph 1.5.3 (last GPL version)
4 #  - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
5 #  - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
6 #  - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
7 #  - A few other small javascript libraries
8 #
9 # Conditional build:
10 %bcond_with     qmail   # build the router-qmail subpackage
11
12 #define snap    20060921
13 %define svn             r3615
14 %define rel             0.19
15 #define _rc             RC3
16
17 %include        /usr/lib/rpm/macros.php
18 Summary:        Eventum Issue / Bug tracking system
19 Summary(pl.UTF-8):      Eventum - system śledzenia spraw/błędów
20 Name:           eventum
21 Version:        2.2
22 Release:        %{?_rc:%{_rc}.}%{rel}%{?snap:.%{snap}}%{?svn:.%{svn}}
23 License:        GPL
24 Group:          Applications/WWW
25 #Source0:       http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{snap}.tar.gz
26 #Source0:       http://eventum.mysql.org/downloads/eventum-2.0.RC3.tar.gz
27 #Source0:       http://mysql.tonnikala.org/Downloads/eventum/%{name}-%{version}.tar.gz
28 Source0:        %{name}-%{svn}.tar.bz2
29 # Source0-md5:  65014cd0db22f54d293b165504fb7b65
30 Source1:        %{name}-apache.conf
31 Source2:        %{name}-mail-queue.cron
32 Source3:        %{name}-mail-download.cron
33 Source4:        %{name}-reminder.cron
34 Source5:        %{name}-monitor.cron
35 Source6:        %{name}-cvs.php
36 Source7:        %{name}-irc.php
37 Source8:        %{name}-irc.init
38 Source9:        %{name}-irc.sysconfig
39 Source10:       %{name}-router-qmail.sh
40 Source12:       %{name}-upgrade.sh
41 Source13:       %{name}-router-postfix.sh
42 Source14:       %{name}.logrotate
43 Source15:       %{name}-lighttpd.conf
44 Patch0:         %{name}-lf.patch
45 Patch1:         %{name}-bounce-notes.patch
46 # packaging patches that probably never go upstream
47 Patch100:       %{name}-paths.patch
48 Patch101:       %{name}-cvs-config.patch
49 Patch102:       %{name}-irc-config.patch
50 Patch105:       %{name}-bot-reconnect.patch
51 Patch106:       %{name}-mem-limits.patch
52 Patch107:       %{name}-gettext.patch
53 # some tests
54 Patch200:       %{name}-fixed-nav.patch
55 URL:            http://eventum.mysql.org/
56 BuildRequires:  gettext-devel
57 BuildRequires:  rpm-php-pearprov >= 4.0.2-98
58 BuildRequires:  rpmbuild(macros) >= 1.268
59 BuildRequires:  sed >= 4.0
60 Requires(triggerpostun):        /usr/bin/php
61 Requires(triggerpostun):        sed >= 4.0
62 Requires:       %{name}-base = %{version}-%{release}
63 Requires:       Smarty >= 2.6.10-4
64 Requires:       php(gd)
65 Requires:       php(imap)
66 Requires:       php(mbstring)
67 Requires:       php(mysql)
68 Requires:       php(pcre)
69 Requires:       php(session)
70 Requires:       php-pear-DB
71 Requires:       php-pear-Date
72 Requires:       php-pear-HTTP_Request
73 Requires:       php-pear-Mail
74 Requires:       php-pear-Mail_Mime
75 Requires:       php-pear-Mail_mimeDecode
76 Requires:       php-pear-Math_Stats
77 Requires:       php-pear-Net_DIME
78 Requires:       php-pear-Net_SMTP
79 Requires:       php-pear-Net_Socket
80 Requires:       php-pear-Net_URL
81 Requires:       php-pear-Net_UserAgent_Detect
82 Requires:       php-pear-PEAR-core
83 Requires:       php-pear-Text_Diff
84 Requires:       php-pear-XML_RPC
85 Requires:       smarty-gettext
86 Requires:       webapps
87 Requires:       webserver(access)
88 Requires:       webserver(alias)
89 Requires:       webserver(indexfile)
90 Requires:       webserver(php) >= 4.2.0
91 Conflicts:      logrotate < 3.7-4
92 BuildArch:      noarch
93 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94
95 %define         _noautoreq      'pear(/etc/webapps/.*)' 'pear(%{_appdir}/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' 'pear(Benchmark/.*)'
96
97 %define         _libdir         %{_prefix}/lib/%{name}
98 %define         _appdir         %{_datadir}/%{name}
99 %define         _smartyplugindir        %{_appdir}/include/smarty
100 %define         _smartydir      /usr/share/php/Smarty
101 %define         _webapps        /etc/webapps
102 %define         _webapp         %{name}
103 %define         _webappdir      %{_webapps}/%{_webapp}
104 %define         _sysconfdir     /etc/%{name}
105
106 %description
107 Eventum is a user-friendly and flexible issue tracking system that can
108 be used by a support department to track incoming technical support
109 requests, or by a software development team to quickly organize tasks
110 and bugs. Eventum is used by the MySQL AB Technical Support team, and
111 has allowed us to dramatically improve our response times.
112
113 %description -l pl.UTF-8
114 Eventum to przyjazny dla użytkownika system śledzenia spraw, który
115 może być używany przez dział obsługi do śledzenia przychodzących żądań
116 obsługi technicznej albo przez zespół tworzący oprogramowanie do
117 szybkiej organizacji zadań i błędów. Eventum jest używany przez zespół
118 Technical Support MySQL AB i umożliwił im znacząco poprawić czasy
119 reakcji.
120
121 %package base
122 Summary:        Eventum base package
123 Summary(pl.UTF-8):      Podstawowy pakiet Eventum
124 Group:          Applications/WWW
125 Requires(postun):       /usr/sbin/groupdel
126 Requires(postun):       /usr/sbin/userdel
127 Requires(pre):  /bin/id
128 Requires(pre):  /usr/bin/getgid
129 Requires(pre):  /usr/sbin/groupadd
130 Requires(pre):  /usr/sbin/useradd
131 Provides:       group(eventum)
132 Provides:       user(eventum)
133
134 %description base
135 This package contains base directory structure for Eventum.
136
137 %description base -l pl.UTF-8
138 Ten pakiet zawiera podstawową strukturę katalogów dla Eventum.
139
140 %package setup
141 Summary:        Eventum setup package
142 Summary(pl.UTF-8):      Pakiet do wstępnej konfiguracji Eventum
143 Group:          Applications/WWW
144 Requires:       %{name} = %{version}-%{release}
145
146 %description setup
147 Install this package to configure initial Eventum installation. You
148 should uninstall this package when you're done, as it considered
149 insecure to keep the setup files in place.
150
151 %description setup -l pl.UTF-8
152 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Eventum po
153 pierwszej instalacji. Potem należy go odinstalować, jako że
154 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
155
156 %package mail-queue
157 Summary:        Eventum mail queue process
158 Summary(pl.UTF-8):      Przetwarzanie kolejki poczty Eventum
159 Group:          Applications/WWW
160 Requires:       %{name} = %{version}-%{release}
161 Requires:       crondaemon
162
163 %description mail-queue
164 Beginning with the first release of Eventum, emails are not directly
165 sent out from the various scripts, but rather added to a mail queue
166 table that is processed by a cron job. If an email cannot be sent, it
167 will be marked as such in the mail queue log, and the cron job script
168 will re-try to send it again the next time it runs.
169
170 This package contains the cron job.
171
172 %description mail-queue -l pl.UTF-8
173 Od pierwszego wydania Eventum poczta nie jest wysyłana bezpośrednio z
174 różnych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
175 Jeśli poczta nie może być wysłana, będzie odpowiednio oznaczona w logu
176 kolejki poczty, a skrypt z crona będzie próbował wysłać ją ponownie
177 następnym razem.
178
179 Ten pakiet zawiera zadanie dla crona.
180
181 %package mail-download
182 Summary:        Eventum email download
183 Summary(pl.UTF-8):      Ściąganie poczty Eventum
184 Group:          Applications/WWW
185 Requires:       %{name} = %{version}-%{release}
186 Requires:       crondaemon
187
188 %description mail-download
189 In order for Eventum's email integration feature to work, you need to
190 setup a cron job to run the script every so often.
191
192 This package contains the cron job.
193
194 %description mail-download -l pl.UTF-8
195 Aby integracja poczty elektronicznej w Eventum działała, trzeba
196 ustawić zadanie crona, aby uruchamiał odpowiedni skrypt wystarczająco
197 często.
198
199 Ten pakiet zawiera zadanie dla crona.
200
201 %package reminder
202 Summary:        Eventum Reminder System
203 Summary(pl.UTF-8):      System przypominania dla Eventum
204 Group:          Applications/WWW
205 Requires:       %{name} = %{version}-%{release}
206 Requires:       crondaemon
207
208 %description reminder
209 The reminder system was designed with the objective as serving as a
210 safe net for issues that need attention. Depending on what
211 configuration you create, you may have several reminders (or alerts)
212 be sent out whenever an issue needs attention, for whatever parameter
213 you may deem necessary.
214
215 This package contains the cron job.
216
217 %description reminder -l pl.UTF-8
218 System przypominania został zaprojektowany tak, aby służył jako
219 bezpieczna sieć dla spraw wymagających uwagi. W zależności od
220 konfiguracji można ustawić różne przypominajki (lub alarmy) wysyłane
221 przy każdej sprawie wymagającej uwagi lub przy parametrze, który można
222 uważać za potrzebny.
223
224 Ten pakiet zawiera zadanie dla crona.
225
226 %package monitor
227 Summary:        Eventum Heartbeat Monitor
228 Summary(pl.UTF-8):      Monitor życia dla Eventum
229 Group:          Applications/WWW
230 Requires:       %{name} = %{version}-%{release}
231 Requires:       crondaemon
232 Requires:       php(posix)
233
234 %description monitor
235 The heartbeat monitor is a feature designed for the administrator that
236 wants to be alerted whenever a common problem in Eventum is detected,
237 like the database server not being available anymore, or maybe when
238 the recommended permissions for certain configuration files are
239 changed.
240
241 Please note that before running the heartbeat monitor, you may need to
242 customize some of the checks to be appropriate for your own system,
243 particularly the permission and file checks on
244 Monitor::checkConfiguration().
245
246 This package contains the cron job.
247
248 %description monitor -l pl.UTF-8
249 Monitor życia to funkcjonalność zaprojektowana dla administratora
250 chcącego być alarmowanym przy każdym wykryciu popularnego problemu z
251 Eventum, jak nie działanie serwera bazy danych albo zmiana uprawnień
252 do plików konfiguracyjnych.
253
254 Należy zauważyć, że przed uruchomieniem tego monitora może być
255 konieczne dostosowanie niektórych testów do systemu, w szczególności
256 testów uprawnień i plików w Monitor::checkConfiguration().
257
258 Ten pakiet zawiera zadanie dla crona.
259
260 %package route-drafts
261 Summary:        Eventum Draft Routing
262 Summary(pl.UTF-8):      Przekazywanie szkiców dla Eventum
263 Group:          Applications/WWW
264 Requires:       %{name} = %{version}-%{release}
265 Requires:       eventum(router)
266
267 %description route-drafts
268 The draft routing feature is used to automatically associate a thread
269 of drafts into an Eventum issue. By setting up qmail (or even Postfix)
270 to deliver emails sent to a specific address (usually
271 draft-<number>@<domain>) to the above script, users are able to send
272 drafts written in their mail client to be stored in Eventum. These
273 drafts will NOT broadcasted to the notification list.
274
275 %description route-drafts -l pl.UTF-8
276 Przekazywanie szkiców służy do automatycznego wiązania wątku szkiców z
277 problemem w Eventum. Ustawiając qmaila (czy nawet Postfiksa), aby
278 dostarczał pocztę wysłaną na podany adres (zwykle
279 draft-<liczba>@<domena>) do tego skryptu umożliwia się użytkownikom
280 wysyłanie szkiców napisanych w ich kliencie pocztowym do zapisania w
281 Eventum. Szkice te NIE będą wysyłane na listę powiadomień.
282
283 %package route-emails
284 Summary:        Eventum Email Routing
285 Summary(pl.UTF-8):      Przekazywanie poczty dla Eventum
286 Group:          Applications/WWW
287 Requires:       %{name} = %{version}-%{release}
288 Requires:       eventum(router)
289
290 %description route-emails
291 The email routing feature is used to automatically associate a thread
292 of emails into an Eventum issue. By setting up qmail (or even postfix)
293 to deliver emails sent to a specific address (usually
294 issue-<number>@<domain>) to the above script, users are able to use
295 their email clients to reply to emails coming from Eventum, and those
296 replies will be automatically associated with the issue and
297 broadcasted to the entire notification list.
298
299 %description route-emails -l pl.UTF-8
300 Funkcjonalność przekazywania poczty służy do automatycznego wiązania
301 wątku listów ze sprawą w Eventum. Po ustawieniu qmaila (czy nawet
302 postfiksa), aby dostarczał listy wysyłane na pewien adres (zwykle
303 issue-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
304 używać klientów pocztowych do odpowiadania na listy przychodzące z
305 Eventum, a odpowiedzi te będą automatycznie wiązane ze sprawą i
306 rozprowadzane do całej listy ogłoszeniowej.
307
308 %package route-notes
309 Summary:        Eventum Note Routing
310 Summary(pl.UTF-8):      Przekazywanie notatek dla Eventum
311 Group:          Applications/WWW
312 Requires:       %{name} = %{version}-%{release}
313 Requires:       eventum(router)
314
315 %description route-notes
316 The note routing feature is used to automatically associate a thread
317 of notes into an Eventum issue. By setting up qmail (or even postfix)
318 to deliver emails sent to a specific address (usually
319 note-<number>@<domain>) to the above script, users are able to use
320 their email clients to reply to internal notes coming from Eventum,
321 and those replies will be automatically associated with the issue and
322 broadcasted to the notification list staff members.
323
324 %description route-notes -l pl.UTF-8
325 Funkcjonalność przekazywania notatek służy do automatycznego wiązania
326 wątku notatek ze sprawą w Eventum. Po ustawieniu qmaila (czy nawet
327 postfiksa), aby dostarczał listy wysyłane na pewien adres (zwykle
328 note-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
329 używać klientów pocztowych do odpowiadania na wewnętrzne notatki
330 pochodzące od Eventu, a odpowiedzi te będą automatycznie wiązane ze
331 sprawą i rozprowadzane do członków personelu listy ogłoszeniowej.
332
333 %package router-qmail
334 Summary:        Eventum Mail Routing - qmail
335 Summary(pl.UTF-8):      Przekazywanie poczty Eventum - qmail
336 Group:          Applications/Mail
337 # loose dep is intentional. qmail subpackage isn't built on PLD
338 # builders and there really nothing changes.
339 Requires:       %{name} >= %{version}-%{release}
340 Requires:       qmail >= 1.03
341 Provides:       eventum(router)
342 Obsoletes:      eventum(router)
343
344 %description router-qmail
345 This package provides way of routing notes and emails back to Eventum
346 via qmail.
347
348 %description router-qmail -l pl.UTF-8
349 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
350 przez qmaila.
351
352 %package router-postfix
353 Summary:        Eventum Mail Routing - Postfix
354 Summary(pl.UTF-8):      Przekazywanie poczty Eventum - Postfix
355 Group:          Applications/Mail
356 Requires:       %{name} = %{version}-%{release}
357 Requires:       postfix
358 Provides:       eventum(router)
359 Obsoletes:      eventum(router)
360
361 %description router-postfix
362 This package provides way of routing notes and emails back to Eventum
363 via Postfix.
364
365 The Postfix configuration instructions you can find from
366 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
367
368 %description router-postfix -l pl.UTF-8
369 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
370 przez Postfiksa.
371
372 Opis konfiguracji Postfiksa można znaleźć pod adresem
373 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
374
375 %package irc
376 Summary:        Eventum IRC Notification Bot
377 Summary(pl.UTF-8):      IRC-owy bot powiadamiający dla Eventum
378 Group:          Applications/WWW
379 Requires(post,preun):   /sbin/chkconfig
380 Requires(triggerpostun):        sed >= 4.0
381 Requires:       %{name} = %{version}-%{release}
382 Requires:       php(sockets)
383 Requires:       php-pear-Net_SmartIRC
384 Requires:       rc-scripts >= 0.4.0.18
385
386 %description irc
387 The IRC notification bot is a nice feature for remote teams that want
388 to handle issues and want to have a quick and easy way to get simple
389 notifications. Right now the bot notifies of the following actions:
390 - New Issues
391 - Blocked emails
392 - Issues that got their assignment list changed
393
394 NOTE: You will need to manually edit the bot.php script to set your
395 appropriate preferences, like IRC server and channel that the bot
396 should join.
397
398 %description irc -l pl.UTF-8
399 IRC-owy bot powiadamiający to miła funkcjonalność dla zdalnych
400 zespołów chcących obsługiwać sprawy i mieć szybki i łatwy sposób na
401 uzyskiwanie prostych powiadomień. Aktualnie bot powiadamia o
402 następujących zdarzeniach:
403 - nowych sprawach
404 - zablokowanych listach
405 - sprawach, dla których zmieniła się lista powiązań
406
407 UWAGA: w celu wprowadzenia własnych ustawień, takich jak serwer IRC i
408 kanał używany przez bota, trzeba ręcznie zmodyfikować skrypt bot.php .
409
410 %package cli
411 Summary:        Eventum command-line interface
412 Summary(pl.UTF-8):      Interfejs linii poleceń dla Eventum
413 Group:          Applications/WWW
414 Requires:       %{name}-base = %{version}-%{release}
415 Requires:       php-cli
416 Requires:       php-common >= 3:4.1.0
417 Requires:       php-pear-XML_RPC
418
419 %description cli
420 The Eventum command-line interface allows you to access most of the
421 features of the web interface straight from your command shell.
422
423 %description cli -l pl.UTF-8
424 Interfejs linii poleceń Eventum pozwala na dostęp do większości
425 funkcji interfejsu WWW prosto z linii poleceń powłoki.
426
427 %package scm
428 Summary:        Eventum SCM integration
429 Summary(pl.UTF-8):      Integracja SCM dla Eventum
430 Group:          Applications/WWW
431 Requires:       %{name}-base = %{version}-%{release}
432 Requires:       php(pcre)
433 Requires:       php-cli
434 Requires:       php-common >= 3:4.1.0
435
436 %description scm
437 This feature allows your software development teams to integrate your
438 Source Control Management system with your Issue Tracking System.
439
440 The integration is implemented in such a way that it will be forward
441 compatible with pretty much any SCM system, such as CVS.
442
443 For installation see
444 </eventum/help.php?topic=scm_integration_installation>.
445
446 %description scm -l pl.UTF-8
447 Ten pakiet pozwala zespołom programistów na integrację systemu
448 zarządzania źródłami (SCM - Source Control Management) z systemem
449 śledzenia spraw.
450
451 Integracja jest zaimplementowana tak, aby być kompatybilna w przód z
452 prawie każdym systemem SCM, jak np. CVS.
453
454 Szczegóły na temat instalacji można przeczytać pod
455 </eventum/help.php?topic=scm_integration_installation>.
456
457 %prep
458 %setup -q %{?snap:-n %{name}-%{snap}}%{?svn:-n %{name}-%{svn}}
459 # undos the source
460 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
461
462 rm benchmark.php
463 rm -r misc/upgrade/*v1.[123]* # too old to support in PLD Linux
464 rm -r misc/upgrade/v{1.,2.0,2.1_}* # no longer supported in PLD Linux
465 rm misc/upgrade/flush_compiled_templates.php
466 rm -r misc/upgrade/{*/,}index.html # not needed in PLD Linux
467
468 rm -r include/php-gettext
469 # sample, not used in eventum
470 rm rpc/xmlrpc_client.php
471
472 # bug fixes / features
473 %patch0 -p1
474 %patch1 -p0
475
476 #%patch200 -p1
477
478 # packaging
479 %patch100 -p1
480 %patch101 -p1
481 %patch102 -p1
482 %patch105 -p1
483 %patch106 -p1
484 %patch107 -p1
485
486 cat <<'EOF'> mysql-permissions.sql
487 # use this schema if you want to grant permissions manually instead of using setup
488 # this schema is extracted from setup/index.php.
489 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
490 EOF
491
492 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
493 mv misc/cli/eventumrc_example eventumrc
494 sed -i -e '1i#!%{_bindir}/php' misc/*.php
495 chmod +x misc/*.php
496
497 %{__sed} -i -e "
498 s,require_once.*init.php.*;,require_once '%{_appdir}/htdocs/init.php';,
499 s;define('CONFIG_PATH'.*');define('CONFIG_PATH', '%{_webappdir}');
500 /define('INSTALL_PATH'/d
501 " misc/upgrade/{*/,}*.php
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 misc/localization
508
509 %install
510 rm -rf $RPM_BUILD_ROOT
511 install -d \
512         $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
513         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.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
519 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
520 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
521 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
522 cp -a templates $RPM_BUILD_ROOT%{_appdir}
523 cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
524 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
525 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
526 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
527
528 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
529 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
530
531 # cli
532 install -d $RPM_BUILD_ROOT%{_appdir}/cli
533 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
534 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
535 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
536 install misc/irc/bot.php $RPM_BUILD_ROOT%{_sbindir}/%{name}-bot
537
538 # scm
539 install misc/scm/process_cvs_commits.php $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
540 install misc/scm/process_svn_commits.php $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
541 ln -s process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
542 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
543
544 # private key
545 echo '<?php
546 $private_key = "DEFAULTPRIVATEKEY";' > $RPM_BUILD_ROOT%{_webappdir}/private_key.php
547 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
548
549 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
550 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
551 cp -a %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
552 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
553 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
554 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
555 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
556 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
557 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
558 cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
559
560
561 %{__sed} -i -e "/define('APP_VERSION'/ {
562     idefine('APP_VERSION', '%{version}%{?snap:-%{snap}}%{?_rc:-%{_rc}}%{?svn:-%{svn}}');
563     d
564
565 }" $RPM_BUILD_ROOT%{_appdir}/htdocs/init.php
566
567 # config
568 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
569 > $RPM_BUILD_ROOT%{_webappdir}/config.php
570
571 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
572 # These plugins are not in Smarty package (Smarty-2.6.2-3)
573 cp -a \
574         include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
575         include/Smarty/plugins/modifier.highlight_quoted.php \
576         $RPM_BUILD_ROOT%{_smartyplugindir}
577
578 # qmail router
579 %if %{with qmail}
580 d=$RPM_BUILD_ROOT/var/lib/%{name}
581 echo 'root' > $d/.qmail
582 echo 'root' > $d/.qmail-default
583 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
584 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
585 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
586 install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/router-qmail
587 %endif
588 # postfix router
589 install %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
590
591 install -D %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
592 # locale
593 cd misc/localization
594 for a in */LC_MESSAGES/*.mo; do
595         d=${a%/*}
596         install -d $RPM_BUILD_ROOT%{_datadir}/locale/$d
597         cp -a $a $RPM_BUILD_ROOT%{_datadir}/locale/$d
598 done
599 cd -
600
601 %find_lang %{name}
602
603 %clean
604 rm -rf $RPM_BUILD_ROOT
605
606 %pre
607 %addusertogroup http %{name}
608
609 %post
610 # check if the package is configured.
611 if grep -q "Header('Location: setup/')" %{_webappdir}/config.php; then
612 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
613 %banner %{name} -e <<EOF
614
615 You haven't yet configured Eventum!
616 Please open in browser <http://localhost/eventum/>
617 If you need access from elsewhere, you need to edit
618 %{_webappdir}/apache.conf and restart apache.
619
620 IMPORTANT: When You have configured Eventum, please uninstall the
621 setup package, so that %{name}-setup is able to secure your Eventum
622 installation.
623
624 EOF
625 #' vim syntax hack
626 else
627 %banner %{name} -e <<EOF
628
629 You haven't yet configured Eventum!
630
631 To setup eventum, please install %{name}-setup and open in browser
632 <http://localhost/eventum/>.
633 If you need access from elsewhere, you need to edit
634 %{_webappdir}/*.conf depending on webserver and restart the webserver.
635
636 IMPORTANT: When You have configured Eventum, please uninstall the
637 setup package, so that %{name}-setup is able to secure your Eventum
638 installation.
639
640 EOF
641 #' vim syntax hack
642 fi
643
644 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
645 %banner %{name} -e <<EOF
646
647 You have default private key installed!
648
649 Install %{name}-setup and open up http://yourserver/eventum/setup/
650 -- that will help you setup initial config.
651
652 when have configured Eventum, please uninstall the setup package,
653 so that %{name}-setup is able to secure your Eventum installation.
654
655 EOF
656         elif [ -d %{_appdir}/setup ]; then
657 %banner %{name} -e <<EOF
658
659 If you have have configured Eventum, please uninstall the setup package,
660 so that %{name}-setup is able to secure your Eventum installation.
661
662 EOF
663 fi
664
665 # database update
666 %{_appdir}/upgrade/update-database.php || :
667
668 # nuke Smarty templates cache after upgrade
669 rm -f /var/cache/eventum/*.php
670
671 %preun
672 if [ "$1" = "0" ]; then
673         # nuke cache
674         rm -f /var/cache/eventum/*.php 2>/dev/null || :
675 fi
676
677 %pre base
678 %groupadd -P %{name}-base -g 146 %{name}
679 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
680
681 %postun base
682 if [ "$1" = "0" ]; then
683         %userremove %{name}
684         %groupremove %{name}
685 fi
686
687 %post router-qmail
688 CF=/etc/qmail/control/virtualdomains
689 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
690         FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
691         [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
692         umask 022
693         echo "#${FQDN}:%{name}" >> $CF
694
695 %banner %{name}-qmail -e <<EOF
696
697 Added "#${FQDN}:%{name}" to $CF,
698 Please verify that it is correct and restart qmail:
699 # service qmail reload
700
701 Consult qmail-send(8) for more information on virtualdomains.
702
703 EOF
704 fi
705
706 %preun router-qmail
707 if [ "$1" = "0" ]; then
708         sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
709 fi
710
711 %post setup
712 chmod 660 %{_webappdir}/{config,private_key}.php
713 chown root:eventum %{_webappdir}/{config,private_key}.php
714
715 %postun setup
716 if [ "$1" = "0" ]; then
717         chmod 640 %{_webappdir}/{config,private_key}.php
718         chown root:eventum %{_webappdir}/{config,private_key}.php
719 fi
720
721 %post irc
722 /sbin/chkconfig --add eventum-irc
723 %service eventum-irc restart "Eventum IRC Bot"
724
725 %preun irc
726 if [ "$1" = 0 ]; then
727         %service eventum-irc stop
728         /sbin/chkconfig --del eventum-irc
729 fi
730
731 %triggerin -- apache1 < 1.3.37-3, apache1-base
732 %webapp_register apache %{_webapp}
733
734 %triggerun -- apache1 < 1.3.37-3, apache1-base
735 %webapp_unregister apache %{_webapp}
736
737 %triggerin -- apache < 2.2.0, apache-base
738 %webapp_register httpd %{_webapp}
739
740 %triggerun -- apache < 2.2.0, apache-base
741 %webapp_unregister httpd %{_webapp}
742
743 %triggerin -- lighttpd
744 %webapp_register lighttpd %{_webapp}
745
746 %triggerun -- lighttpd
747 %webapp_unregister lighttpd %{_webapp}
748
749 %triggerpostun -- eventum < 2.1.1-2.13
750 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v2.1.1_to_v2.2 <<EOF
751 db_version.php Add eventum_version table
752 EOF
753 # automated database update
754 %{_appdir}/upgrade/update-database.php || :
755
756 %files -f %{name}.lang
757 %defattr(644,root,root,755)
758 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
759 %doc docs/* setup/schema.sql mysql-permissions.sql
760 %attr(751,root,root) %dir %{_webappdir}
761 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
762 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
763 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
764 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
765 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
766 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
767 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
768
769 %dir %attr(731,root,eventum) /var/log/%{name}
770 %attr(620,root,eventum) %ghost /var/log/%{name}/*
771 %dir %attr(750,root,root) /var/log/archive/%{name}
772 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
773
774 %dir %{_appdir}/htdocs
775 %{_appdir}/htdocs/*.php
776 %{_appdir}/htdocs/*.ico
777 %{_appdir}/htdocs/css
778 %{_appdir}/htdocs/customer
779 %{_appdir}/htdocs/images
780 %{_appdir}/htdocs/js
781 %{_appdir}/htdocs/manage
782 %{_appdir}/htdocs/reports
783 %{_appdir}/htdocs/rpc
784 %{_appdir}/htdocs/misc
785 %{_appdir}/templates
786
787 %dir %{_appdir}/upgrade
788 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
789 %attr(755,root,root) %{_appdir}/upgrade/update-database.php
790 %dir %{_appdir}/upgrade/v*
791 %attr(755,root,root) %{_appdir}/upgrade/v*/*.php
792 %{_appdir}/upgrade/patches
793
794 %{_smartyplugindir}
795
796 %dir %{_appdir}/include
797 %{_appdir}/include/customer
798 %{_appdir}/include/custom_field
799 %{_appdir}/include/jpgraph
800 %{_appdir}/include/workflow
801 %{_appdir}/include/class.*.php
802 %{_appdir}/include/db_access.php
803 %exclude %{_appdir}/include/class.monitor.php
804
805 %dir %attr(730,root,eventum) /var/run/%{name}
806 %dir %attr(730,root,eventum) /var/cache/%{name}
807
808 %files base
809 %defattr(644,root,root,755)
810 %attr(751,root,root) %dir %{_sysconfdir}
811 %dir %{_libdir}
812 %dir %{_appdir}
813 # qmail will ignore user, if it's home directory is not owned
814 %attr(750,eventum,eventum) %dir /var/lib/%{name}
815 # saved mail copies
816 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
817 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
818 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
819
820 %files setup
821 %defattr(644,root,root,755)
822 %{_appdir}/htdocs/setup
823
824 %files mail-queue
825 %defattr(644,root,root,755)
826 %attr(755,root,root) %{_appdir}/process_mail_queue.php
827 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
828
829 %files mail-download
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{_appdir}/download_emails.php
832 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
833
834 %files reminder
835 %defattr(644,root,root,755)
836 %attr(755,root,root) %{_appdir}/check_reminders.php
837 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
838
839 %files monitor
840 %defattr(644,root,root,755)
841 %{_appdir}/include/class.monitor.php
842 %attr(755,root,root) %{_appdir}/monitor.php
843 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
844
845 %files route-drafts
846 %defattr(644,root,root,755)
847 %attr(755,root,root) %{_appdir}/route_drafts.php
848
849 %files route-emails
850 %defattr(644,root,root,755)
851 %attr(755,root,root) %{_appdir}/route_emails.php
852
853 %files route-notes
854 %defattr(644,root,root,755)
855 %attr(755,root,root) %{_appdir}/route_notes.php
856
857 %if %{with qmail}
858 %files router-qmail
859 %defattr(644,root,root,755)
860 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
861 %attr(755,root,root) %{_libdir}/router-qmail
862 %endif
863
864 %files router-postfix
865 %defattr(644,root,root,755)
866 %attr(755,root,root) %{_libdir}/router-postfix
867
868 %files irc
869 %defattr(644,root,root,755)
870 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
871 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
872 %attr(755,root,root) %{_sbindir}/%{name}-bot
873 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
874
875 %files cli
876 %defattr(644,root,root,755)
877 %doc eventumrc
878 %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
879 %attr(755,root,root) %{_bindir}/%{name}
880 %{_appdir}/cli
881
882 %files scm
883 %defattr(644,root,root,755)
884 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
885 %attr(755,root,root) %{_libdir}/process_cvs_commits
886 %attr(755,root,root) %{_libdir}/process_svn_commits
887 # legacy
888 %ghost %{_libdir}/scm
This page took 2.64522 seconds and 3 git commands to generate.