]>
Commit | Line | Data |
---|---|---|
a659c698 JB |
1 | # |
2 | # Conditional build: | |
7bc9b641 | 3 | %bcond_with order # with experimental order patch |
cddf3011 | 4 | |
9d6970de | 5 | %define rel 1 |
ea627041 ER |
6 | %define subver 30 |
7 | %define githash a83a1da8 | |
ed5da172 | 8 | %define php_min_version 5.6.0 |
c96aabf5 | 9 | Summary: Eventum Issue / Bug tracking system |
9f49cf47 | 10 | Summary(pl.UTF-8): Eventum - system śledzenia spraw/błędów |
bb01d732 | 11 | Name: eventum |
adbdb0e8 | 12 | Version: 3.4.2 |
7665f424 | 13 | Release: %{?subver:1.%{subver}.%{?githash:g%{githash}.}}%{rel} |
0bd66721 | 14 | License: GPL v2+ |
6850abd9 | 15 | Group: Applications/WWW |
adbdb0e8 ER |
16 | #Source0: https://github.com/eventum/eventum/releases/download/v%{version}/%{name}-%{version}.tar.xz |
17 | Source0: https://github.com/eventum/eventum/releases/download/snapshot/%{name}-%{version}-%{subver}-g%{githash}.tar.xz | |
ea627041 | 18 | # Source0-md5: 3b06621384082cd09260641fbd3fa154 |
82121306 | 19 | Source1: %{name}-apache.conf |
cd719538 ER |
20 | Source2: %{name}-mail-queue.cron |
21 | Source3: %{name}-mail-download.cron | |
22 | Source4: %{name}-reminder.cron | |
23 | Source5: %{name}-monitor.cron | |
1cce3e61 | 24 | Source10: sphinx.crontab |
cfcdd0a9 ER |
25 | Source13: %{name}-router-postfix.sh |
26 | Source14: %{name}.logrotate | |
27 | Source15: %{name}-lighttpd.conf | |
d0dabd47 ER |
28 | Source16: http://www.isocra.com/images/updown2.gif |
29 | # Source16-md5: deb6eeb2552ba757d3a949ed10c4107d | |
cc613bc9 | 30 | Source17: %{name}.tmpfiles |
4f627938 | 31 | Patch2: %{name}-order.patch |
7a906e31 ER |
32 | #Patch3: group-users.patch |
33 | #Patch4: https://github.com/glensc/eventum/compare/cf_escape.patch | |
14ff3418 | 34 | # packaging patches that probably never go upstream |
ac27ba92 | 35 | Patch100: %{name}-paths.patch |
cfcdd0a9 | 36 | Patch107: %{name}-gettext.patch |
3ca19d87 | 37 | Patch108: autoload.patch |
a6016bab ER |
38 | # some tests |
39 | Patch200: %{name}-fixed-nav.patch | |
a3a1480e | 40 | URL: https://wiki.github.com/eventum/eventum/ |
376f0835 | 41 | BuildRequires: gettext-tools |
5500a61e | 42 | BuildRequires: rpmbuild(macros) >= 1.654 |
4068cb73 | 43 | BuildRequires: sed >= 4.0 |
db2ce4e2 | 44 | Requires(post): sudo |
5132bae6 ER |
45 | Requires(postun): /usr/sbin/groupdel |
46 | Requires(postun): /usr/sbin/userdel | |
47 | Requires(pre): /bin/id | |
48 | Requires(pre): /usr/bin/getgid | |
49 | Requires(pre): /usr/sbin/groupadd | |
50 | Requires(pre): /usr/sbin/useradd | |
0b88d857 | 51 | Requires: fonts-TTF-RedHat-liberation |
01d8dfff | 52 | Requires: php(core) >= %{php_min_version} |
2f331c68 | 53 | Requires: php(filter) |
2f331c68 ER |
54 | Requires: php(iconv) |
55 | Requires: php(imap) | |
56 | Requires: php(json) | |
57 | Requires: php(mbstring) | |
2f331c68 | 58 | Requires: php(pcre) |
75d6f458 | 59 | Requires: php(pdo_mysql) |
2f331c68 | 60 | Requires: php(session) |
5dbd4bf5 ER |
61 | Requires: php-Smarty >= 3.1 |
62 | Requires: php-Smarty-plugin-gettext | |
9d207070 | 63 | Requires: php-ZendFramework-Config >= 2.4 |
fefc61ab | 64 | Requires: php-ZendFramework-Loader >= 2.4 |
05c9edc6 | 65 | Requires: php-ZendFramework-Mail >= 2.4.13-2 |
fefc61ab | 66 | Requires: php-ZendFramework-Mime >= 2.4 |
1beb4932 | 67 | Requires: php-ZendFramework-ServiceManager >= 2.4 |
fefc61ab | 68 | Requires: php-ZendFramework-Validator >= 2.4 |
19d84727 | 69 | Requires: php-monolog >= 1.17.2 |
71b01fde | 70 | Requires: php-pear-Math_Stats |
71b01fde | 71 | Requires: php-pear-Net_SMTP |
71b01fde ER |
72 | Requires: php-pear-Net_Socket |
73 | Requires: php-pear-Net_URL | |
3223fb64 | 74 | Requires: php-pear-PEAR-core |
71b01fde | 75 | Requires: php-pear-Text_Diff |
19d84727 | 76 | Requires: php-psr-Log >= 1.0.0-2 |
0b88d857 | 77 | Requires: phplot >= 5.8.0 |
bdf85dc8 | 78 | Requires: webapps |
f399f1c0 ER |
79 | Requires: webserver(access) |
80 | Requires: webserver(alias) | |
897bdb2c | 81 | Requires: webserver(indexfile) |
61351540 | 82 | Requires: webserver(php) >= 4.2.0 |
462ee1a6 | 83 | Suggests: localedb |
383eed8e ER |
84 | Suggests: php(mcrypt) |
85 | Suggests: php(openssl) | |
191d9c61 | 86 | Suggests: php-pear-Net_POP3 |
06ddb94b | 87 | Suggests: webserver(setenv) |
5132bae6 ER |
88 | Provides: group(eventum) |
89 | Provides: user(eventum) | |
90 | Obsoletes: eventum-base < 3.0.3-1.305 | |
4e2cf70d ER |
91 | Obsoletes: eventum-route-drafts < 3.0.8-1.1 |
92 | Obsoletes: eventum-route-emails < 3.0.8-1.1 | |
93 | Obsoletes: eventum-route-notes < 3.0.8-1.1 | |
bd70ea88 | 94 | Conflicts: logrotate < 3.8.0 |
35fa3cf8 | 95 | BuildArch: noarch |
bb01d732 ER |
96 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
97 | ||
1d760108 | 98 | %define _libdir %{_prefix}/lib/%{name} |
71f56750 | 99 | %define _appdir %{_datadir}/%{name} |
d1c44829 | 100 | %define _smartydir %{php_data_dir}/Smarty |
bdf85dc8 ER |
101 | %define _webapps /etc/webapps |
102 | %define _webapp %{name} | |
8a37ad9d ER |
103 | %define _webappdir %{_webapps}/%{_webapp} |
104 | %define _sysconfdir /etc/%{name} | |
bb01d732 ER |
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 | |
a3a1480e | 110 | and bugs. |
bb01d732 | 111 | |
d8cfa9f0 JR |
112 | %description -l pl.UTF-8 |
113 | Eventum to przyjazny dla użytkownika system śledzenia spraw, który | |
114 | może być używany przez dział obsługi do śledzenia przychodzących żądań | |
115 | obsługi technicznej albo przez zespół tworzący oprogramowanie do | |
a3a1480e | 116 | szybkiej organizacji zadań i błędów. |
4068cb73 | 117 | |
ab983aaa | 118 | %package setup |
4068cb73 | 119 | Summary: Eventum setup package |
9f49cf47 | 120 | Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Eventum |
ab983aaa | 121 | Group: Applications/WWW |
5b165428 | 122 | Requires: %{name} = %{version}-%{release} |
ab983aaa ER |
123 | |
124 | %description setup | |
125 | Install this package to configure initial Eventum installation. You | |
126 | should uninstall this package when you're done, as it considered | |
127 | insecure to keep the setup files in place. | |
128 | ||
d8cfa9f0 JR |
129 | %description setup -l pl.UTF-8 |
130 | Ten pakiet należy zainstalować w celu wstępnej konfiguracji Eventum po | |
131 | pierwszej instalacji. Potem należy go odinstalować, jako że | |
132 | pozostawienie plików instalacyjnych mogłoby być niebezpieczne. | |
4068cb73 | 133 | |
d4a553ea ER |
134 | %package doc |
135 | Summary: Eventum documentation and Wiki | |
136 | Group: Documentation | |
137 | ||
138 | %description doc | |
139 | Eventum documentation and copy of Wiki. | |
140 | ||
0da8e1f2 | 141 | %package mail-queue |
30689148 | 142 | Summary: Eventum mail queue process |
9f49cf47 | 143 | Summary(pl.UTF-8): Przetwarzanie kolejki poczty Eventum |
0da8e1f2 | 144 | Group: Applications/WWW |
5b165428 | 145 | Requires: %{name} = %{version}-%{release} |
0da8e1f2 ER |
146 | Requires: crondaemon |
147 | ||
148 | %description mail-queue | |
149 | Beginning with the first release of Eventum, emails are not directly | |
150 | sent out from the various scripts, but rather added to a mail queue | |
151 | table that is processed by a cron job. If an email cannot be sent, it | |
152 | will be marked as such in the mail queue log, and the cron job script | |
153 | will re-try to send it again the next time it runs. | |
154 | ||
155 | This package contains the cron job. | |
156 | ||
d8cfa9f0 JR |
157 | %description mail-queue -l pl.UTF-8 |
158 | Od pierwszego wydania Eventum poczta nie jest wysyłana bezpośrednio z | |
159 | różnych skryptów, lecz dodawana do kolejki przetwarzanej z crona. | |
160 | Jeśli poczta nie może być wysłana, będzie odpowiednio oznaczona w logu | |
161 | kolejki poczty, a skrypt z crona będzie próbował wysłać ją ponownie | |
162 | następnym razem. | |
0181746f | 163 | |
30689148 | 164 | Ten pakiet zawiera zadanie dla crona. |
165 | ||
ea084bcb | 166 | %package mail-download |
30689148 | 167 | Summary: Eventum email download |
9f49cf47 | 168 | Summary(pl.UTF-8): Ściąganie poczty Eventum |
ea084bcb | 169 | Group: Applications/WWW |
5b165428 | 170 | Requires: %{name} = %{version}-%{release} |
ea084bcb ER |
171 | Requires: crondaemon |
172 | ||
173 | %description mail-download | |
174 | In order for Eventum's email integration feature to work, you need to | |
175 | setup a cron job to run the script every so often. | |
176 | ||
177 | This package contains the cron job. | |
178 | ||
d8cfa9f0 JR |
179 | %description mail-download -l pl.UTF-8 |
180 | Aby integracja poczty elektronicznej w Eventum działała, trzeba | |
181 | ustawić zadanie crona, aby uruchamiał odpowiedni skrypt wystarczająco | |
182 | często. | |
0181746f JB |
183 | |
184 | Ten pakiet zawiera zadanie dla crona. | |
185 | ||
cd719538 ER |
186 | %package reminder |
187 | Summary: Eventum Reminder System | |
9f49cf47 | 188 | Summary(pl.UTF-8): System przypominania dla Eventum |
cd719538 | 189 | Group: Applications/WWW |
5b165428 | 190 | Requires: %{name} = %{version}-%{release} |
cd719538 ER |
191 | Requires: crondaemon |
192 | ||
193 | %description reminder | |
194 | The reminder system was designed with the objective as serving as a | |
195 | safe net for issues that need attention. Depending on what | |
196 | configuration you create, you may have several reminders (or alerts) | |
197 | be sent out whenever an issue needs attention, for whatever parameter | |
198 | you may deem necessary. | |
199 | ||
200 | This package contains the cron job. | |
201 | ||
d8cfa9f0 JR |
202 | %description reminder -l pl.UTF-8 |
203 | System przypominania został zaprojektowany tak, aby służył jako | |
204 | bezpieczna sieć dla spraw wymagających uwagi. W zależności od | |
205 | konfiguracji można ustawić różne przypominajki (lub alarmy) wysyłane | |
206 | przy każdej sprawie wymagającej uwagi lub przy parametrze, który można | |
207 | uważać za potrzebny. | |
6341f096 JB |
208 | |
209 | Ten pakiet zawiera zadanie dla crona. | |
210 | ||
cd719538 ER |
211 | %package monitor |
212 | Summary: Eventum Heartbeat Monitor | |
9f49cf47 | 213 | Summary(pl.UTF-8): Monitor życia dla Eventum |
cd719538 | 214 | Group: Applications/WWW |
5b165428 | 215 | Requires: %{name} = %{version}-%{release} |
cd719538 | 216 | Requires: crondaemon |
2f331c68 | 217 | Requires: php(posix) |
cd719538 ER |
218 | |
219 | %description monitor | |
220 | The heartbeat monitor is a feature designed for the administrator that | |
221 | wants to be alerted whenever a common problem in Eventum is detected, | |
222 | like the database server not being available anymore, or maybe when | |
223 | the recommended permissions for certain configuration files are | |
224 | changed. | |
225 | ||
226 | Please note that before running the heartbeat monitor, you may need to | |
227 | customize some of the checks to be appropriate for your own system, | |
228 | particularly the permission and file checks on | |
229 | Monitor::checkConfiguration(). | |
230 | ||
231 | This package contains the cron job. | |
232 | ||
d8cfa9f0 JR |
233 | %description monitor -l pl.UTF-8 |
234 | Monitor życia to funkcjonalność zaprojektowana dla administratora | |
235 | chcącego być alarmowanym przy każdym wykryciu popularnego problemu z | |
236 | Eventum, jak nie działanie serwera bazy danych albo zmiana uprawnień | |
237 | do plików konfiguracyjnych. | |
6341f096 | 238 | |
d8cfa9f0 JR |
239 | Należy zauważyć, że przed uruchomieniem tego monitora może być |
240 | konieczne dostosowanie niektórych testów do systemu, w szczególności | |
241 | testów uprawnień i plików w Monitor::checkConfiguration(). | |
6341f096 JB |
242 | |
243 | Ten pakiet zawiera zadanie dla crona. | |
244 | ||
a6d2ad69 ER |
245 | %package router-postfix |
246 | Summary: Eventum Mail Routing - Postfix | |
9f49cf47 | 247 | Summary(pl.UTF-8): Przekazywanie poczty Eventum - Postfix |
a6d2ad69 | 248 | Group: Applications/Mail |
5b165428 | 249 | Requires: %{name} = %{version}-%{release} |
a6d2ad69 | 250 | Requires: postfix |
8bc4bcd1 ER |
251 | Provides: eventum(router) |
252 | Obsoletes: eventum(router) | |
a6d2ad69 ER |
253 | |
254 | %description router-postfix | |
255 | This package provides way of routing notes and emails back to Eventum | |
256 | via Postfix. | |
257 | ||
e1bb3563 | 258 | The Postfix configuration instructions you can find from |
a3a1480e | 259 | <https://github.com/eventum/eventum/wiki/System-Admin:-Setting-up-email-routing-with-postfix> |
e1bb3563 | 260 | |
d8cfa9f0 JR |
261 | %description router-postfix -l pl.UTF-8 |
262 | Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum | |
995fa554 JB |
263 | przez Postfiksa. |
264 | ||
d8cfa9f0 | 265 | Opis konfiguracji Postfiksa można znaleźć pod adresem |
a3a1480e | 266 | <https://github.com/eventum/eventum/wiki/System-Admin:-Setting-up-email-routing-with-postfix> |
a659c698 | 267 | |
abd490e4 ER |
268 | %package cli |
269 | Summary: Eventum command-line interface | |
9f49cf47 | 270 | Summary(pl.UTF-8): Interfejs linii poleceń dla Eventum |
abd490e4 | 271 | Group: Applications/WWW |
01d8dfff | 272 | Requires: php(core) >= %{php_min_version} |
4a74b463 | 273 | Requires: php(phar) |
abd490e4 ER |
274 | |
275 | %description cli | |
276 | The Eventum command-line interface allows you to access most of the | |
277 | features of the web interface straight from your command shell. | |
abd490e4 | 278 | |
d8cfa9f0 JR |
279 | %description cli -l pl.UTF-8 |
280 | Interfejs linii poleceń Eventum pozwala na dostęp do większości | |
281 | funkcji interfejsu WWW prosto z linii poleceń powłoki. | |
958cd5a0 | 282 | |
1cce3e61 ER |
283 | %package sphinx |
284 | Summary: Eventum Sphinx Search | |
285 | Group: Applications/WWW | |
286 | Requires: %{name} = %{version}-%{release} | |
287 | Requires: crondaemon | |
288 | Requires: sphinx | |
289 | ||
290 | %description sphinx | |
291 | Sphinx search integration for Eventum. | |
292 | ||
293 | This package contains the cron job. | |
294 | ||
bb01d732 | 295 | %prep |
4b01e826 | 296 | %setup -q -n %{name}-%{version}%{?githash:-%{subver}-g%{githash}} |
5b165428 | 297 | |
fa6167ba ER |
298 | mv docs/examples . |
299 | ||
9487d524 | 300 | # bug fixes / features |
4f627938 | 301 | %{?with_order:%patch2 -p1} |
7a906e31 ER |
302 | #%patch3 -p0 |
303 | #%patch4 -p1 | |
57e65e62 | 304 | |
7a906e31 | 305 | %{?with_order:cp -p %{SOURCE16} htdocs/images} |
422dcc8e | 306 | |
a6016bab | 307 | #%patch200 -p1 |
ac27ba92 | 308 | |
1cce3e61 ER |
309 | # produce default sphinx config |
310 | # must be run before paths.patch | |
7a906e31 | 311 | %if 0 |
1cce3e61 ER |
312 | cat <<'EOF' > config/config.php |
313 | <?php | |
314 | define('APP_SQL_DBTYPE', 'mysql'); | |
315 | define('APP_SQL_DBHOST', 'localhost:/var/lib/mysql/mysql.sock'); | |
316 | define('APP_SQL_DBPORT', 3306); | |
317 | define('APP_SQL_DBNAME', 'eventum'); | |
318 | define('APP_SQL_DBUSER', 'mysql'); | |
319 | define('APP_SQL_DBPASS', ''); | |
320 | define('APP_TABLE_PREFIX', 'eventum_'); | |
321 | EOF | |
322 | php config/sphinx.conf.php > config/sphinx.conf | |
54b9a2df | 323 | rm config/config.php |
7a906e31 | 324 | %endif |
1cce3e61 | 325 | |
ac27ba92 ER |
326 | # packaging |
327 | %patch100 -p1 | |
ac27ba92 | 328 | %patch107 -p1 |
3ca19d87 | 329 | %patch108 -p1 |
0b3b58dd | 330 | |
54b9a2df | 331 | rm htdocs/.htaccess.dist |
dee89c38 | 332 | |
dee89c38 | 333 | rm config/config.dist.php |
54b9a2df | 334 | |
bcb86d50 ER |
335 | # cleanup vendor. keep only needed libraries. |
336 | # (the rest are packaged with system packages) | |
337 | mv vendor vendor.dist | |
338 | vendor() { | |
339 | local path dir | |
340 | for path; do | |
341 | dir=$(dirname $path) | |
342 | test -d vendor/$dir || mkdir -p vendor/$dir | |
343 | mv vendor.dist/$path vendor/$path | |
344 | done | |
345 | } | |
346 | vendor autoload.php | |
347 | vendor composer/autoload_{classmap,files,namespaces,real,psr4}.php | |
348 | vendor composer/ClassLoader.php | |
a8005c48 | 349 | vendor ircmaxell/{random-lib,security-lib} |
60c51158 | 350 | vendor defuse/php-encryption |
626ebcc8 | 351 | vendor willdurand/email-reply-parser |
2f4f114e | 352 | vendor theorchard/monolog-cascade |
4d5632cc | 353 | vendor malkusch/lock |
9b6df4e7 | 354 | vendor phpxmlrpc/phpxmlrpc |
8be9fbff | 355 | vendor robmorgan/phinx |
d6a2a084 ER |
356 | vendor mnapoli/silly |
357 | vendor psr/container | |
358 | vendor phlib/flysystem-pdo | |
359 | vendor league/flysystem | |
360 | vendor php-di/invoker | |
361 | vendor container-interop/container-interop | |
d0a18312 ER |
362 | vendor symfony/config |
363 | vendor symfony/console | |
364 | vendor symfony/debug | |
365 | vendor symfony/event-dispatcher | |
366 | vendor symfony/filesystem | |
367 | vendor symfony/http-foundation | |
368 | vendor symfony/options-resolver | |
369 | vendor symfony/serializer | |
370 | vendor symfony/yaml | |
1d2c2049 | 371 | vendor symfony/ldap |
c1ff84e6 ER |
372 | vendor paragonie/random_compat |
373 | vendor symfony/polyfill-php70 | |
6933980a ER |
374 | vendor symfony/polyfill-intl-normalizer |
375 | vendor glen/filename-normalizer | |
3159fb10 ER |
376 | vendor doctrine/annotations |
377 | vendor doctrine/cache | |
378 | vendor doctrine/collections | |
379 | vendor doctrine/common | |
380 | vendor doctrine/dbal | |
381 | vendor doctrine/inflector | |
382 | vendor doctrine/instantiator | |
383 | vendor doctrine/lexer | |
384 | vendor doctrine/orm | |
072d52cb ER |
385 | vendor cebe/markdown |
386 | vendor enrise/urihelper | |
c3fd3767 | 387 | |
5b165428 | 388 | # remove backups from patching as we use globs to package files to buildroot |
73c437a6 | 389 | find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v |
085e39c0 | 390 | |
465c3ab7 | 391 | %build |
ae3e48e6 | 392 | %{__make} -C localization |
465c3ab7 | 393 | |
bb01d732 ER |
394 | %install |
395 | rm -rf $RPM_BUILD_ROOT | |
cfc3bce6 | 396 | install -d \ |
6e3be5a3 | 397 | $RPM_BUILD_ROOT{%{_webappdir}/{custom_field,templates,workflow},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \ |
2b135b34 | 398 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,logrotate.d,sysconfig} \ |
c1e74aa1 | 399 | $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \ |
685fc383 | 400 | $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \ |
ac6bab4c | 401 | $RPM_BUILD_ROOT/var/lib/%{name}/{routed_{emails,drafts,notes},storage} \ |
73de38a1 | 402 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
cfc3bce6 | 403 | |
9a547279 | 404 | %{__make} install-eventum install-cli install-localization \ |
ae3e48e6 | 405 | sysconfdir=%{_webappdir} \ |
7a906e31 | 406 | localedir=%{_localedir} \ |
ae3e48e6 | 407 | DESTDIR=$RPM_BUILD_ROOT |
da8d6134 | 408 | |
dd5b687f | 409 | ln -s %{_webappdir} $RPM_BUILD_ROOT%{_appdir}/config |
37f06e5c | 410 | |
bcb86d50 | 411 | cp -a vendor $RPM_BUILD_ROOT%{_appdir} |
3ca19d87 | 412 | |
29e8ea7c ER |
413 | # unsupported locale |
414 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ht | |
415 | ||
fa6167ba ER |
416 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
417 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
418 | ||
ae3e48e6 | 419 | %{?with_order:cp -a htdocs/ajax $RPM_BUILD_ROOT%{_appdir}/htdocs} |
9cdc5027 | 420 | |
f399f1c0 | 421 | touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd |
1b5aae0f | 422 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf |
87ca28ca | 423 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf |
1b5aae0f | 424 | cp -p %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf |
1cce3e61 ER |
425 | |
426 | install -d $RPM_BUILD_ROOT/etc/sphinx | |
7a906e31 | 427 | #cp -p config/sphinx.conf $RPM_BUILD_ROOT/etc/sphinx/%{name}.conf |
858c6f2a | 428 | cp -p config/sphinx.conf.php $RPM_BUILD_ROOT%{_webappdir} |
ae3e48e6 | 429 | |
1b5aae0f ER |
430 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue |
431 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download | |
432 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder | |
433 | cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor | |
1cce3e61 | 434 | cp -p %{SOURCE10} $RPM_BUILD_ROOT/etc/cron.d/%{name}-sphinx |
ae3e48e6 | 435 | |
1b5aae0f | 436 | cp -p %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} |
2b135b34 | 437 | |
410d72c7 | 438 | # postfix router |
858c6f2a | 439 | install -p %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix |
a6d2ad69 | 440 | |
92bc2f5d | 441 | cp -p %{SOURCE17} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
cc613bc9 | 442 | |
600d96a0 | 443 | %find_lang %{name} |
c1e74aa1 | 444 | |
bb01d732 ER |
445 | %clean |
446 | rm -rf $RPM_BUILD_ROOT | |
447 | ||
01b84746 | 448 | %pre |
5132bae6 ER |
449 | %groupadd -g 146 %{name} |
450 | %useradd -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name} | |
01b84746 ER |
451 | %addusertogroup http %{name} |
452 | ||
82121306 | 453 | %post |
686306de ER |
454 | # create empty ghost files |
455 | # these permissions ensure the logs are write only | |
456 | for a in \ | |
457 | errors.log login_attempts.log \ | |
2df0528f | 458 | eventum.log \ |
7b26fd71 | 459 | auth.log cli.log \ |
686306de ER |
460 | ; do |
461 | test -f /var/log/%{name}/$a && continue | |
462 | install -m 0620 -o root -g http /dev/null /var/log/%{name}/$a | |
08196fe2 ER |
463 | done |
464 | ||
00358bba ER |
465 | # run database update if configured |
466 | test -s %{_webappdir}/config.php && \ | |
db2ce4e2 | 467 | sudo -H -u http -- %{_appdir}/bin/upgrade.php || : |
847270fe | 468 | |
da8d6134 ER |
469 | # nuke Smarty templates cache after upgrade |
470 | rm -f /var/cache/eventum/*.php | |
471 | ||
4a751c1a ER |
472 | # Restart webserver on upgrade to get .mo translations reloaded. |
473 | # actually php engines "php-fcgi" and "php-fpm" needed only, apache is restarted anyway via webapp trigger. | |
114241d7 ER |
474 | %php_webserver_restart |
475 | ||
82121306 ER |
476 | %preun |
477 | if [ "$1" = "0" ]; then | |
dfe0f6d6 ER |
478 | # nuke cache |
479 | rm -f /var/cache/eventum/*.php 2>/dev/null || : | |
480 | fi | |
cfc3bce6 | 481 | |
5132bae6 | 482 | %postun |
01b84746 | 483 | if [ "$1" = "0" ]; then |
a6d2ad69 | 484 | %userremove %{name} |
1f52d1fe | 485 | %groupremove %{name} |
a6d2ad69 ER |
486 | fi |
487 | ||
94bd779f | 488 | %post setup |
dee89c38 ER |
489 | chmod 660 %{_webappdir}/{config,private_key,secret_key}.php |
490 | chown root:http %{_webappdir}/{config,private_key,secret_key}.php | |
94bd779f ER |
491 | |
492 | %postun setup | |
b4fe195b | 493 | if [ "$1" = "0" ] && [ -f %{_webappdir}/config.php ]; then |
dee89c38 ER |
494 | chmod 640 %{_webappdir}/{config,private_key,secret_key}.php |
495 | chown root:http %{_webappdir}/{config,private_key,secret_key}.php | |
94bd779f ER |
496 | fi |
497 | ||
09f58a75 | 498 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
bdf85dc8 | 499 | %webapp_register apache %{_webapp} |
1d760108 | 500 | |
09f58a75 | 501 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
bdf85dc8 | 502 | %webapp_unregister apache %{_webapp} |
1d760108 | 503 | |
87ca28ca | 504 | %triggerin -- apache < 2.2.0, apache-base |
bdf85dc8 | 505 | %webapp_register httpd %{_webapp} |
1d760108 | 506 | |
87ca28ca | 507 | %triggerun -- apache < 2.2.0, apache-base |
bdf85dc8 | 508 | %webapp_unregister httpd %{_webapp} |
1d760108 | 509 | |
f399f1c0 ER |
510 | %triggerin -- lighttpd |
511 | %webapp_register lighttpd %{_webapp} | |
512 | ||
513 | %triggerun -- lighttpd | |
514 | %webapp_unregister lighttpd %{_webapp} | |
515 | ||
24cfc386 ER |
516 | %triggerpostun -- %{name} < 3.0.0-0.2 |
517 | for f in /etc/cron.d/eventum-*; do | |
518 | # crontabs moved to bin | |
0ffd10e7 | 519 | %{__sed} -i -e ' |
24cfc386 ER |
520 | s,/usr/share/eventum/crons/process_mail_queue.php,%{_appdir}/bin/process_mail_queue.php, |
521 | s,/usr/share/eventum/crons/download_emails.php,%{_appdir}/bin/download_emails.php, | |
522 | s,/usr/share/eventum/crons/check_reminders.php,%{_appdir}/bin/check_reminders.php, | |
523 | s,/usr/share/eventum/crons/monitor.php,%{_appdir}/bin/monitor.php, | |
524 | ' $f | |
0ffd10e7 | 525 | done |
f1269a43 | 526 | |
600d96a0 | 527 | %files -f %{name}.lang |
bb01d732 | 528 | %defattr(644,root,root,755) |
371b276a | 529 | %attr(771,root,http) %dir %{_webappdir} |
f7d1e520 | 530 | %attr(751,root,http) %dir %{_webappdir}/crm |
e9a24d52 | 531 | %attr(751,root,http) %dir %{_webappdir}/custom_field |
f7d1e520 | 532 | %attr(751,root,http) %dir %{_webappdir}/partner |
e9a24d52 ER |
533 | %attr(751,root,http) %dir %{_webappdir}/templates |
534 | %attr(751,root,http) %dir %{_webappdir}/workflow | |
8a37ad9d ER |
535 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf |
536 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf | |
f399f1c0 | 537 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf |
e570944f ER |
538 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php |
539 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php | |
dee89c38 | 540 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/secret_key.php |
e570944f | 541 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php |
f399f1c0 | 542 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd |
d2e501e8 | 543 | |
7e9ea0b3 | 544 | %dir %attr(731,root,http) /var/log/%{name} |
e570944f | 545 | %attr(620,root,http) %ghost /var/log/%{name}/* |
3c6aa7a9 | 546 | %dir %attr(750,root,root) /var/log/archive/%{name} |
8fd047ac | 547 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
35f9d6a3 | 548 | |
5132bae6 | 549 | %dir %{_appdir} |
37f06e5c ER |
550 | %{_appdir}/config |
551 | ||
7a906e31 | 552 | %dir %{_appdir}/bin |
acff2f42 | 553 | %attr(755,root,root) %{_appdir}/bin/extension.php |
bd0576dd | 554 | %attr(755,root,root) %{_appdir}/bin/ldapsync.php |
7a906e31 | 555 | %attr(755,root,root) %{_appdir}/bin/process_all_emails.php |
6453eaf6 | 556 | %attr(755,root,root) %{_appdir}/bin/upgrade.php |
7a906e31 | 557 | |
4b01e826 | 558 | %{_appdir}/autoload.php |
1beb4932 | 559 | %{_appdir}/globals.php |
ae3e48e6 | 560 | %{_appdir}/init.php |
1beb4932 | 561 | %{_appdir}/phinx.php |
cfc3bce6 ER |
562 | %dir %{_appdir}/htdocs |
563 | %{_appdir}/htdocs/*.php | |
da8d6134 | 564 | %{_appdir}/htdocs/*.ico |
7bc9b641 | 565 | %{_appdir}/htdocs/ajax |
cfc3bce6 ER |
566 | %{_appdir}/htdocs/css |
567 | %{_appdir}/htdocs/customer | |
568 | %{_appdir}/htdocs/images | |
569 | %{_appdir}/htdocs/js | |
570 | %{_appdir}/htdocs/manage | |
571 | %{_appdir}/htdocs/reports | |
572 | %{_appdir}/htdocs/rpc | |
7a906e31 | 573 | %{_appdir}/htdocs/components |
9748a8c3 | 574 | %{_appdir}/templates |
847270fe | 575 | |
8be9fbff ER |
576 | %dir %{_appdir}/db |
577 | %dir %{_appdir}/db/migrations | |
578 | %{_appdir}/db/migrations/*.php | |
847270fe | 579 | |
8772b0d6 | 580 | %{_appdir}/res |
e8b7cc70 | 581 | %{_appdir}/src |
8772b0d6 | 582 | %{_appdir}/vendor |
ae3e48e6 ER |
583 | %dir %{_appdir}/lib |
584 | %{_appdir}/lib/eventum | |
36395687 ER |
585 | %exclude %{_appdir}/src/Console/Command/MailDownloadCommand.php |
586 | %exclude %{_appdir}/src/Console/Command/MailQueueProcessCommand.php | |
587 | %exclude %{_appdir}/src/Console/Command/MailQueueTruncateCommand.php | |
588 | %exclude %{_appdir}/src/Console/Command/MonitorCommand.php | |
589 | %exclude %{_appdir}/src/Console/Command/ReminderCheckCommand.php | |
00e339ff | 590 | |
5132bae6 ER |
591 | %dir %{_libdir} |
592 | ||
73de38a1 | 593 | %{systemdtmpfilesdir}/%{name}.conf |
5132bae6 ER |
594 | |
595 | %dir /var/lib/%{name} | |
e570944f ER |
596 | %dir %attr(730,root,http) /var/run/%{name} |
597 | %dir %attr(730,root,http) /var/cache/%{name} | |
ab983aaa | 598 | |
89522a33 | 599 | # saved mail copies |
e570944f ER |
600 | %attr(770,root,http) %dir /var/lib/%{name}/routed_emails |
601 | %attr(770,root,http) %dir /var/lib/%{name}/routed_drafts | |
602 | %attr(770,root,http) %dir /var/lib/%{name}/routed_notes | |
ac6bab4c ER |
603 | # attachment storage |
604 | %attr(770,root,http) %dir /var/lib/%{name}/storage | |
d2e501e8 | 605 | |
ab983aaa ER |
606 | %files setup |
607 | %defattr(644,root,root,755) | |
cfc3bce6 | 608 | %{_appdir}/htdocs/setup |
0da8e1f2 | 609 | |
d4a553ea | 610 | %files doc |
06ddb94b | 611 | %defattr(644,root,root,755) |
d4a553ea ER |
612 | %doc docs/* |
613 | %{_examplesdir}/%{name}-%{version} | |
614 | ||
0da8e1f2 ER |
615 | %files mail-queue |
616 | %defattr(644,root,root,755) | |
36395687 ER |
617 | %{_appdir}/src/Console/Command/MailQueueProcessCommand.php |
618 | %{_appdir}/src/Console/Command/MailQueueTruncateCommand.php | |
7a906e31 | 619 | %attr(755,root,root) %{_appdir}/bin/process_mail_queue.php |
f56655e1 | 620 | %attr(755,root,root) %{_appdir}/bin/truncate_mail_queue.php |
ea084bcb ER |
621 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue |
622 | ||
623 | %files mail-download | |
624 | %defattr(644,root,root,755) | |
36395687 | 625 | %{_appdir}/src/Console/Command/MailDownloadCommand.php |
7a906e31 | 626 | %attr(755,root,root) %{_appdir}/bin/download_emails.php |
ea084bcb | 627 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download |
5cb2e61d | 628 | |
cd719538 ER |
629 | %files reminder |
630 | %defattr(644,root,root,755) | |
36395687 | 631 | %{_appdir}/src/Console/Command/ReminderCheckCommand.php |
7a906e31 | 632 | %attr(755,root,root) %{_appdir}/bin/check_reminders.php |
cd719538 ER |
633 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder |
634 | ||
635 | %files monitor | |
636 | %defattr(644,root,root,755) | |
36395687 | 637 | %{_appdir}/src/Console/Command/MonitorCommand.php |
7a906e31 | 638 | %attr(755,root,root) %{_appdir}/bin/monitor.php |
cd719538 ER |
639 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor |
640 | ||
a6d2ad69 ER |
641 | %files router-postfix |
642 | %defattr(644,root,root,755) | |
410d72c7 | 643 | %attr(755,root,root) %{_libdir}/router-postfix |
a6d2ad69 | 644 | |
abd490e4 ER |
645 | %files cli |
646 | %defattr(644,root,root,755) | |
ae3e48e6 | 647 | %doc cli/eventumrc |
4a74b463 | 648 | %attr(755,root,root) %{_bindir}/%{name} |
abd490e4 | 649 | |
1cce3e61 ER |
650 | %files sphinx |
651 | %defattr(644,root,root,755) | |
652 | %{_webappdir}/sphinx.conf.php | |
7a906e31 | 653 | #%attr(750,root,http) %config(noreplace) %verify(not md5 mtime size) /etc/sphinx/%{name}.conf |
1cce3e61 | 654 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-sphinx |