1 changed files with 141 additions and 0 deletions
@ -0,0 +1,141 @@
|
||||
## |
||||
## 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. |
||||
## |
||||
|
||||
# FIXME, issues, suggestions, hints, porting |
||||
# based on work from Erfrakon, |
||||
# Martin Konold <martin.konold@erfrakon.de> |
||||
# Tassilo Erlewein <tassilo.erlewein@erfrakon.de> |
||||
# is with_mod_php_pear really needed in the apache module |
||||
# kolab should provide a tarball |
||||
# PreReqs need to be checked |
||||
# rename @@@kolab_prefix@@@ to ... |
||||
# kolab_bootstrap should either ensure dib is empty or should check if dib is already set up |
||||
# remove "unlink" fsl stuff from kolab_bootstrap |
||||
# replace "killall ... slapd" by "@l_prefix@/etc/rc openldap stop", make failing test connection to be sure it is down |
||||
# rework service stop/start in kolab_bootstrap to use rc |
||||
# revamp template config stuff to modify openpkg config by patching, search'n'replace, add/mod/del openpkg config etc. |
||||
# remove -f from hostname call in kolab and kolab_bootstrap |
||||
# correct libexec/slapd path |
||||
# verify semantic behind "chown root.root" in kolab |
||||
# add handling of rc.conf for openldap_url and sasl_authmech |
||||
|
||||
# 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: 20031112 |
||||
|
||||
# list of sources |
||||
Source0: http://www.erfrakon.de/projects/kolab/download/kolab-server-1.0/src/kolab-%{V_major}-%{version}.src.rpm |
||||
|
||||
# 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 |
||||
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;libexec/slapd;libexec/openldap/slapd;' \ |
||||
-e 's;etc/rc.d/rc.kolab start;etc/rc all start;' \ |
||||
kolab_bootstrap |
||||
%{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: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:' \ |
||||
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/ |
||||
|
||||
%{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'" |
||||
|
||||
Loading…
Reference in new issue