3 %bcond_with ldap # with LDAP support
4 %bcond_with mysql # with MySQL support
5 %bcond_without sqweb # don't use sqwebmail
6 %bcond_with ucspi # use ucspi-tcp
8 Summary: Virtual domains for qmail
9 Summary(es.UTF-8): Dominios virtuales para qmail
10 Summary(pl.UTF-8): Domeny wirtualne dla qmaila
16 Group: Networking/Daemons
17 Source0: http://dl.sourceforge.net/vpopmail/%{name}-%{version}-%{bver}.tar.gz
18 # Source0-md5: 3a9edac0e60e4fb1e06d009bd11ade3b
19 Patch0: %{name}-nonroot.patch
20 Patch1: %{name}-missing-qmail.patch
21 URL: http://inter7.com/vpopmail.html
22 BuildRequires: autoconf
23 BuildRequires: automake
24 %{?with_mysql:BuildRequires: mysql-devel}
25 %{?with_ldap:BuildRequires: openldap-devel >= 2.4.6}
26 %{?with_ucspi:BuildRequires: ucspi-tcp >= 0.88}
27 BuildRequires: rpmbuild(macros) >= 1.202
28 Requires(pre): /bin/id
29 Requires(pre): /usr/bin/getgid
30 Requires(pre): /usr/sbin/groupadd
31 Requires(pre): /usr/sbin/useradd
32 Requires(postun): /usr/sbin/groupdel
33 Requires(postun): /usr/sbin/userdel
34 %{?with_ldap:Requires: openldap}
35 Requires: qmail >= 1.03
37 %{?with_sqweb:Requires: sqwebmail >= 3.0}
38 %{?with_ucspi:Requires: ucspi-tcp >= 0.88}
39 Provides: group(vchkpw)
40 Provides: user(vpopmail)
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define varqmail /var/qmail
44 %define dest /var/lib/vpopmail
47 vpopmail is a collection of programs to automate creation and
48 maintence of non /etc/passwd virtual domain email and POP accounts
49 for qmail installations.
51 %description -l es.UTF-8
52 vpopmail es una colección de programas para automatizar la creación
53 y el mantenimiento de dominios virtuales de E-mail y cuentas POP
54 independientes de /etc/passwd.
56 %description -l pl.UTF-8
57 vpopmail to kolekcja programów służących automatyzacji tworzenia
58 i zarządzania kontami pocztowymi w domenach wirtualnych, odrębnych
59 od haseł składowanych w pliku /etc/passwd.
62 Summary: Vpopmail development includes
63 Summary(es.UTF-8): Ficheros de desarrollo de vpopmail
64 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek vpopmail
65 Group: Development/Libraries
66 #Requires: %{name}-libs = %{version}
69 This package contains header files for vpopmail library.
71 %description devel -l es.UTF-8
72 El paquete vpopmail contiene todos los ficheros de inclusión.
74 %description devel -l pl.UTF-8
75 Ten pakiet zawiera pliki nagłówkowe biblioteki vpopmail.
78 %setup -q -n %{name}-%{version}-%{bver}
88 --enable-qmaildir=%{varqmail} \
89 --enable-qmail-newu=%{varqmail}/bin/qmail-newu \
90 --enable-qmail-inject=%{varqmail}/bin/qmail-inject \
91 --enable-qmail-newmrh=%{varqmail}/bin/qmail-newmrh \
92 %{?with_ucspi:--enable-roaming-users=y} \
93 %{?with_sqweb:--enable-sqwebmail-pass=y} \
94 %{?with_ldap:--enable-ldap=y} \
95 %{?with_mysql:--enable-auth-module=mysql=y} \
96 --enable-vpopuser=vpopmail \
97 --enable-vpopgroup=vchkpw \
98 --enable-clear-passwd=n \
100 --enable-log-name=vpopmail \
101 --enable-qmail-ext=y \
102 --enable-defaultquota=100000 \
103 %{?with_ucspi:--enable-tcpserver-file=/etc/vpopmail/tcp.smtp} \
104 --enable-libdir=/usr/lib
108 rm -rf $RPM_BUILD_ROOT
111 # DESTDIR=$RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT%{dest}/domains\
114 %{?with_ucspi:$RPM_BUILD_ROOT/etc/vpopmail/} \
115 $RPM_BUILD_ROOT%{_sbindir} \
116 $RPM_BUILD_ROOT%{_includedir}/vpopmail \
117 $RPM_BUILD_ROOT{%{_docdir},%{_libdir}}
119 install vpopmail.h $RPM_BUILD_ROOT%{_includedir}/vpopmail
120 install config.h $RPM_BUILD_ROOT%{_includedir}/vpopmail
121 install config.h $RPM_BUILD_ROOT%{_includedir}/vpopmail/vpopmail_config.h
122 install vauth.h $RPM_BUILD_ROOT%{_includedir}/vpopmail
123 install vchkpw vdelivermail clearopensmtp vadddomain \
124 vdeldomain vpasswd vadduser vdeluser vaddaliasdomain vsetuserquota \
125 vpopbull vdeloldusers vmoduser valias vuserinfo vmkpasswd vipmap \
126 vdominfo vconvert vqmaillocal vkill \
127 $RPM_BUILD_ROOT%{_sbindir}
129 install libvpopmail.a $RPM_BUILD_ROOT%{_libdir}
130 #install $RPM_BUILD_ROOT%{dest}/domains
133 rm -rf $RPM_BUILD_ROOT
136 %groupadd -g 121 vchkpw
137 %useradd -u 121 -g 121 -d /usr/share/empty -s /bin/false -c "VPOPMAIL user" vpopmail
140 if [ "$1" = "0" ]; then
146 %defattr(644,root,root,755)
147 %doc AUTHORS ChangeLog FAQ README* UPGRADE doc/doc_html doc/man_html ldap oracle
148 %attr(755,vpopmail,vchkpw) %{_sbindir}/*
150 %attr(700,vpopmail,vchkpw) %dir %{dest}/domains
151 %{?with_ucspi:%attr(700,vpopmail,vchkpw) %dir /etc/vpopmail}
154 %defattr(644,root,root,755)
155 %{_libdir}/libvpopmail.a
156 %{_includedir}/vpopmail