[Kolab-devel] server/horde horde.spec,1.3,1.4 by stephan at doto.intevation.de

root at intevation.de root at intevation.de
Thu Jul 31 13:21:57 CEST 2003


Update of /kolabrepository/server/horde
In directory doto:/tmp/cvs-serv32192

Modified Files:
	horde.spec 
Log Message:
The base_dn needed by Turba is now set through %post


Index: horde.spec
===================================================================
RCS file: /kolabrepository/server/horde/horde.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- horde.spec	31 Jul 2003 06:31:11 -0000	1.3
+++ horde.spec	31 Jul 2003 11:21:55 -0000	1.4
@@ -81,7 +81,7 @@
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
 BuildPreReq:  OpenPKG, openpkg >= 20030103, apache
-PreReq:       OpenPKG, openpkg >= 20030103, openldap
+PreReq:       OpenPKG, openpkg >= 20030103, openldap, kolab
 AutoReq:      no
 AutoReqProv:  no
 
@@ -138,11 +138,15 @@
     %{l_shtool} install -c -m 755 %{SOURCE imp_prefs.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/imp/config/prefs.php
     %{l_shtool} install -c -m 755 %{SOURCE imp_mime_drivers.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/imp/config/mime_drivers.php
     %{l_shtool} install -c -m 755 %{SOURCE imp_servers.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/imp/config/servers.php
-     # Handle Turba configuration files
+    # Handle Turba configuration files
+    #Get the BASE_DN of the server
+    #BASEDN=`cat %{l_prefix}/etc/kolab/kolab.conf | grep base_dn | awk '{ FS=" +: +"; } { print $3 }'`
+    #echo $BASEDN 
     %{l_shtool} install -c -m 755 %{SOURCE turba_conf.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/turba/config/conf.php
     %{l_shtool} install -c -m 755 %{SOURCE turba_html.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/turba/config/html.php
     %{l_shtool} install -c -m 755 %{SOURCE turba_prefs.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/turba/config/prefs.php
     %{l_shtool} install -c -m 755 %{SOURCE turba_sources.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/turba/config/sources.php
+    #cat %{SOURCE turba_sources.php} | sed "s:LOCALBASEDN:$BASEDN:" > $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/turba/config/sources.php
     %{l_shtool} install -c -m 755 %{SOURCE turba_attributes.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/turba/config/attributes.php
       # Handle Kronolith configuration files
     %{l_shtool} install -c -m 755 %{SOURCE kronolith_conf.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/kronolith/config/conf.php
@@ -157,6 +161,14 @@
     %{l_shtool} install -c -m 755 %{SOURCE nag_html.php} $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/nag/config/html.php
    
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%post
+    #Get the BASE_DN of the server
+    BASEDN=`cat %{l_prefix}/etc/kolab/kolab.conf | grep base_dn | awk '{ FS=" +: +"; } { print $3 }'`
+    echo "Using base dn : $BASEDN"
+    cp %{l_prefix}/var/kolab/www/horde/turba/config/sources.php %{l_prefix}/var/kolab/www/horde/turba/config/sources.php.tmp
+    cat %{l_prefix}/var/kolab/www/horde/turba/config/sources.php.tmp | sed "s:LOCALBASEDN:$BASEDN:" > %{l_prefix}/var/kolab/www/horde/turba/config/sources.php
+    rm %{l_prefix}/var/kolab/www/horde/turba/config/sources.php.tmp
 
 %files -f files
 





More information about the devel mailing list