|
|
|
|
##
|
|
|
|
|
## kolab.spec -- OpenPKG RPM Specification
|
|
|
|
|
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
|
|
## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
|
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
|
|
|
|
|
##
|
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
|
## copies.
|
|
|
|
|
##
|
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
# package version
|
|
|
|
|
%define V_major 1.0
|
|
|
|
|
%define V_minor 14
|
|
|
|
|
|
|
|
|
|
# package information
|
|
|
|
|
Name: kolab
|
|
|
|
|
Summary: Kolab Groupware Server
|
|
|
|
|
URL: http://www.kolab.org/
|
|
|
|
|
Vendor: Erfrakon
|
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
|
Distribution: OpenPKG [EVAL]
|
|
|
|
|
Group: KDE
|
|
|
|
|
License: GPL
|
|
|
|
|
Version: %{V_major}.%{V_minor}
|
|
|
|
|
Release: 20031126
|
|
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
|
Source0: http://www.erfrakon.de/projects/kolab/download/kolab-server-1.0/src/kolab-%{V_major}-%{version}.src.rpm
|
|
|
|
|
Source1: rc.kolab
|
|
|
|
|
|
|
|
|
|
# build information
|
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20030103
|
|
|
|
|
PreReq: OpenPKG, openpkg >= 20030103, openldap, postfix, imapd, sasl, apache, proftpd, perl, perl-ldap
|
|
|
|
|
PreReq: sasl >= 2.1.15-20031122, sasl::with_ldap = yes, sasl::with_login = yes
|
|
|
|
|
PreReq: proftpd >= 1.2.9-20031031, proftpd::with_ldap = yes
|
|
|
|
|
PreReq: gdbm >= 1.8.3-20030213, gdbm::with_ndbm = yes
|
|
|
|
|
PreReq: postfix >= 2.0.16-20031028, postfix::with_ldap = yes, postfix::with_sasl = yes, postfix::with_tls = yes
|
|
|
|
|
PreReq: imapd >= 2.1.16-20031120, imapd::with_group = yes, imapd::with_vhost = yes
|
|
|
|
|
PreReq: apache >= 1.3.29-20031124, apache::with_gdbm_ndbm = yes, apache::with_mod_auth_ldap = yes, apache::with_mod_dav = yes, apache::with_mod_php = yes, apache::with_mod_php_gdbm = yes, apache::with_mod_php_gettext = yes, apache::with_mod_php_imap = yes, apache::with_mod_php_openldap = yes, apache::with_mod_php_xml = yes, apache::with_mod_php_pear = yes, apache::with_mod_ssl = yes
|
|
|
|
|
AutoReq: no
|
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Kolab is the KDE Groupware Server that provides full groupware
|
|
|
|
|
features to either KDE kolab clients or Microsoft Outlook[tm]
|
|
|
|
|
clients with the Bynari Insight Connector http://www.bynari.net. In
|
|
|
|
|
addition it is a robust and flexible general IMAP mail server with
|
|
|
|
|
LDAP addressbook and nice web GUI.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -c -T
|
|
|
|
|
echo %{SOURCE0}; pwd
|
|
|
|
|
rpm2cpio <%{SOURCE0} | cpio -iv kolab-%{V_major}.tar.gz
|
|
|
|
|
%{l_gzip} -c -d kolab-%{V_major}.tar.gz | %{l_tar} xf -
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;@@@kolab_prefix@@@;@l_prefix@;g' \
|
|
|
|
|
-e 's;@@@l_\([mnrs]\)usr@@@;@l_\1usr@;g' \
|
|
|
|
|
-e 's;@@@l_\([mnrs]\)grp@@@;@l_\1grp@;g' \
|
|
|
|
|
-e 's;@@@l_\([mnrs]\)uid@@@;@l_\1uid@;g' \
|
|
|
|
|
-e 's;@@@l_\([mnrs]\)gid@@@;@l_\1gid@;g' \
|
|
|
|
|
kolab_sslcert.sh kolab kolab_bootstrap *.template
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;hostname -f;hostname;' \
|
|
|
|
|
kolab kolab_bootstrap
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;chown root.root;chown @l_susr@:@l_sgrp@;' \
|
|
|
|
|
kolab
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;libexec/slapd;libexec/openldap/slapd;' \
|
|
|
|
|
-e 's;etc/rc.d/rc.kolab start;etc/rc all start;' \
|
|
|
|
|
-e 's:print " running:my $cfg; open(FH, "<@l_prefix@/etc/rc.conf") || die; $cfg .= $_ while (<FH>); close(FH); $cfg =~ s/\\n((openldap_url|sasl_authmech)\\S*=[^\\n]*)/#\\1\\n/sg; $cfg .= "openldap_url=\\"\\"\\nsasl_authmech=\\"ldap\\"\\n"; open(FH, ">@l_prefix@/etc/rc.conf") || die; print FH $cfg; close(FH); undef $cfg; print " running:' \
|
|
|
|
|
-e 's;killall -INT slapd >/dev/null 2>&1;$kolab_prefix/etc/rc openldap stop;' \
|
|
|
|
|
-e 's;\(system("killall -9 slapd >/dev/null 2>&1")\);#\1;' \
|
|
|
|
|
kolab_bootstrap
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%{l_shtool} mkdir -p -m 755 \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/kolab \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/kolab/log \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/cgi-bin \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/icons
|
|
|
|
|
%{l_shtool} mkdir -p -m 777 \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/admin \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/freebusy \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/locks
|
|
|
|
|
|
|
|
|
|
%{l_shtool} install -c -m 744 %{l_value -s -a} \
|
|
|
|
|
kolab_sslcert.sh kolab kolab_bootstrap workaround.sh \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/kolab/
|
|
|
|
|
|
|
|
|
|
%{l_shtool} install -c -m 644 %{l_value -s -a} \
|
|
|
|
|
kolab.conf kolab.schema *.template \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/kolab/
|
|
|
|
|
|
|
|
|
|
cp -r admin/* $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/admin/
|
|
|
|
|
|
|
|
|
|
# install run-command script
|
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
|
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
|
|
%{SOURCE rc.kolab} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
|
|
|
|
# generate file list
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
|
|
|
|
|
'%config %{l_prefix}/etc/kolab/*.pem' \
|
|
|
|
|
'%config %{l_prefix}/etc/kolab/*.schema' \
|
|
|
|
|
'%config %{l_prefix}/etc/kolab/kolab.conf'
|
|
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
echo "please run '$RPM_INSTALL_PREFIX/etc/kolab/kolab_bootstrap -b'"
|
|
|
|
|
|