4 Summary(pl.UTF-8): Wirtualny Exim
9 Group: Networking/Daemons
10 Source0: http://silverwraith.com/vexim/%{name}%{version}.tar.gz
11 # Source0-md5: ddb810b1ebf14b70dd48765764e07ee3
13 URL: http://silverwraith.com/vexim/
16 Requires: php4-gettext
18 Requires: webserver(php) >= 4.2.1
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _veximdir %{_datadir}/%{name}
22 %define _sysconfdir /etc/%{name}
27 %description -l pl.UTF-8
31 Summary: Virtual Exim - Perl utils
32 Summary(pl.UTF-8): Wirtualny Exim - narzędzia w Perlu
33 Group: Networking/Daemons
36 %description perl-utils
37 Some Perl utils to create database.
39 %description perl-utils -l pl.UTF-8
40 Narzędzie w Perlu do stworzenia bazy danych.
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd} \
48 $RPM_BUILD_ROOT%{_veximdir}/{config,images,locale} \
49 $RPM_BUILD_ROOT%{_veximdir}/locale/{en_EN,ro_RO,hu_HU,de_DE} \
50 $RPM_BUILD_ROOT%{_veximdir}/locale/{en_EN,ro_RO,hu_HU,de_DE}/LC_MESSAGES \
51 $RPM_BUILD_ROOT%{_prefix}/src/examples/%{name} \
52 $RPM_BUILD_ROOT/etc/mail
54 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
56 install vexim/*.{php,css} $RPM_BUILD_ROOT%{_veximdir}
57 install vexim/config/{a*,f*,h*,i*}.php $RPM_BUILD_ROOT%{_veximdir}/config
58 install vexim/config/variables.php $RPM_BUILD_ROOT%{_sysconfdir}
59 ln -sf %{_sysconfdir}/variables.php $RPM_BUILD_ROOT%{_veximdir}/config/variables.php
60 install vexim/images/*.gif $RPM_BUILD_ROOT%{_veximdir}/images
62 install vexim/locale/en_EN/LC_MESSAGES/*.mo $RPM_BUILD_ROOT%{_veximdir}/locale/en_EN/LC_MESSAGES
63 install vexim/locale/ro_RO/LC_MESSAGES/*.mo $RPM_BUILD_ROOT%{_veximdir}/locale/ro_RO/LC_MESSAGES
64 install vexim/locale/hu_HU/LC_MESSAGES/*.mo $RPM_BUILD_ROOT%{_veximdir}/locale/hu_HU/LC_MESSAGES
65 install vexim/locale/de_DE/LC_MESSAGES/*.mo $RPM_BUILD_ROOT%{_veximdir}/locale/de_DE/LC_MESSAGES
67 install setup/create_db.pl $RPM_BUILD_ROOT%{_prefix}/src/examples/%{name}/create_db.pl
68 install docs/vexim-* $RPM_BUILD_ROOT/etc/mail
69 install docs/configure $RPM_BUILD_ROOT/etc/mail/vexim_exim.conf
72 rm -rf $RPM_BUILD_ROOT
75 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
76 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
77 if [ -f /var/lock/subsys/httpd ]; then
78 /usr/sbin/apachectl restart 1>&2
80 elif [ -d /etc/httpd/httpd.conf ]; then
81 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
82 if [ -f /var/lock/subsys/httpd ]; then
83 /usr/sbin/apachectl restart 1>&2
88 if [ "$1" = "0" ]; then
90 if [ -d /etc/httpd/httpd.conf ]; then
91 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
93 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
94 /etc/httpd/httpd.conf.tmp
95 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
97 if [ -f /var/lock/subsys/httpd ]; then
98 /usr/sbin/apachectl restart 1>&2
103 %defattr(644,root,root,755)
104 %doc INSTALL README TODO docs/* setup/*.sql
106 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
107 %config(noreplace) %verify(not md5 mtime size) /etc/mail/*
108 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
109 %attr(640,root,http) %config(noreplace) %{_veximdir}/config/variables.php
111 %dir %{_veximdir}/config
112 %{_veximdir}/config/auth*.php
113 %{_veximdir}/config/functions.php
114 %{_veximdir}/config/h*.php
115 %{_veximdir}/config/i18n.php
121 %defattr(644,root,root,755)
122 %dir %{_examplesdir}/%{name}
123 %{_examplesdir}/%{name}/create_db.pl