SPECS: roundcubemail.spec - 20070318 svn snap - allow importing co...

glen glen at pld-linux.org
Thu Apr 12 15:36:03 CEST 2007


Author: glen                         Date: Thu Apr 12 13:36:03 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- 20070318 svn snap
- allow importing configs in first install

---- Files affected:
SPECS:
   roundcubemail.spec (1.21 -> 1.22) 

---- Diffs:

================================================================
Index: SPECS/roundcubemail.spec
diff -u SPECS/roundcubemail.spec:1.21 SPECS/roundcubemail.spec:1.22
--- SPECS/roundcubemail.spec:1.21	Mon Feb 12 23:09:13 2007
+++ SPECS/roundcubemail.spec	Thu Apr 12 15:35:58 2007
@@ -4,12 +4,13 @@
 # - add logrotate file
 # - it has PEAR boundled inside - use system ones
 # - use pear-deps system?
+# - use system js/tiny_mce
 # - package: http://blog.ilohamail.org/ and remove boundled classess from it
 #
 #define		_svn	svn445
-%define		_snap	20070108
+%define		_snap	20070318
 #define		_beta	beta2
-%define		_rel	1
+%define		_rel	0.4
 Summary:	RoundCube Webmail
 Summary(pl.UTF-8):	RoundCube Webmail - poczta przez WWW
 Name:		roundcubemail
@@ -20,11 +21,12 @@
 #Source0:	http://dl.sourceforge.net/roundcubemail/%{name}-%{version}%{_beta}.tar.gz
 #Source0:	%{name}-%{version}%{_svn}.tar.bz2
 Source0:	http://dl.sourceforge.net/roundcubemail/%{name}-nightly-%{_snap}.tar.gz
-# Source0-md5:	8e96ba85239c8cf3344c8f230ba30532
+# Source0-md5:	3e4dc0f840e51a76524f55914ed644e5
 Source1:	%{name}.config
 Patch0:		%{name}-config.patch
 URL:		http://www.roundcube.net/
 BuildRequires:	rpmbuild(macros) >= 1.268
+BuildRequires:	sed >= 4.0
 Requires:	php(pcre)
 # Some php-database backend. Suggests?
 # php-sockets is required to make spellcheck working
@@ -62,6 +64,9 @@
 
 find -name .svn | xargs -r rm -rf
 
+# undos the source
+find '(' -name '*.php' -o -name '*.inc' -o -name '*.js' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_appdatadir},%{_applogdir},%{_sysconfdir}} \
@@ -86,6 +91,22 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pretrans
+if [ ! -f %{_sysconfdir}/db.inc.php -o ! -f %{_sysconfdir}/main.inc.php ]; then
+	# import configs from previously manually installed site
+	d=/home/services/httpd/html/config
+	echo >&2 "Importing site configs from $d"
+	mkdir -p %{_sysconfdir}
+	if [ -f $d/db.inc.php ]; then
+		[ -f %{_sysconfdir}/db.inc.php ] && mv -f %{_sysconfdir}/db.inc.php{,.rpmorig}
+		cp -f $d/db.inc.php %{_sysconfdir}/db.inc.php
+	fi
+	if [ -f $d/main.inc.php ]; then
+		[ -f %{_sysconfdir}/main.inc.php ] && mv -f %{_sysconfdir}/main.inc.php{,.rpmorig}
+		cp -f $d/main.inc.php %{_sysconfdir}/main.inc.php
+	fi
+fi
+
 %triggerin -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache %{_webapp}
 
@@ -123,6 +144,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.22  2007/04/12 13:35:58  glen
+- 20070318 svn snap
+- allow importing configs in first install
+
 Revision 1.21  2007/02/12 22:09:13  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/roundcubemail.spec?r1=1.21&r2=1.22&f=u



More information about the pld-cvs-commit mailing list