]> git.pld-linux.org Git - SPECS.git/blob - vexim.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / vexim.spec
1 # TODO
2 # - webapps
3 Summary:        Virtual Exim
4 Summary(pl.UTF-8):      Wirtualny Exim
5 Name:           vexim
6 Version:        2.2.1
7 Release:        1
8 License:        BSD-like
9 Group:          Networking/Daemons
10 Source0:        http://silverwraith.com/vexim/%{name}%{version}.tar.gz
11 # Source0-md5:  ddb810b1ebf14b70dd48765764e07ee3
12 Source1:        %{name}.conf
13 URL:            http://silverwraith.com/vexim/
14 Requires:       exim
15 Requires:       php-pear-DB
16 Requires:       php4-gettext
17 Requires:       webserver
18 Requires:       webserver(php) >= 4.2.1
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _veximdir       %{_datadir}/%{name}
22 %define         _sysconfdir     /etc/%{name}
23
24 %description
25 Virtual Exim.
26
27 %description -l pl.UTF-8
28 Wirtualny Exim.
29
30 %package perl-utils
31 Summary:        Virtual Exim - Perl utils
32 Summary(pl.UTF-8):      Wirtualny Exim - narzędzia w Perlu
33 Group:          Networking/Daemons
34 Requires:       perl-DBI
35
36 %description  perl-utils
37 Some Perl utils to create database.
38
39 %description perl-utils -l pl.UTF-8
40 Narzędzie w Perlu do stworzenia bazy danych.
41
42 %prep
43 %setup -q -n %{name}2
44
45 %install
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
53
54 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
55
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
61
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
66
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
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post
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
79         fi
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
84         fi
85 fi
86
87 %preun
88 if [ "$1" = "0" ]; then
89         umask 027
90         if [ -d /etc/httpd/httpd.conf ]; then
91                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
92         else
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
96         fi
97         if [ -f /var/lock/subsys/httpd ]; then
98                 /usr/sbin/apachectl restart 1>&2
99         fi
100 fi
101
102 %files
103 %defattr(644,root,root,755)
104 %doc INSTALL README TODO docs/* setup/*.sql
105 %dir %{_sysconfdir}
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
110 %dir %{_veximdir}
111 %dir %{_veximdir}/config
112 %{_veximdir}/config/auth*.php
113 %{_veximdir}/config/functions.php
114 %{_veximdir}/config/h*.php
115 %{_veximdir}/config/i18n.php
116 %{_veximdir}/images
117 %{_veximdir}/locale
118 %{_veximdir}/*.*
119
120 %files perl-utils
121 %defattr(644,root,root,755)
122 %dir %{_examplesdir}/%{name}
123 %{_examplesdir}/%{name}/create_db.pl
This page took 0.461713 seconds and 3 git commands to generate.