[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/squirrelmail/devel compilelocales, NONE, 1.1 .cvsignore, 1.13, 1.14 sources, 1.13, 1.14 squirrelmail.spec, 1.26, 1.27 squirrelmail-1.4.3-config.patch, 1.1, NONE squirrelmail-1.4.5-charset.patch, 1.1, NONE



Author: dwmw2

Update of /cvs/dist/rpms/squirrelmail/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv364

Modified Files:
	.cvsignore sources squirrelmail.spec 
Added Files:
	compilelocales 
Removed Files:
	squirrelmail-1.4.3-config.patch 
	squirrelmail-1.4.5-charset.patch 
Log Message:
upgrade to 1.4.6


--- NEW FILE compilelocales ---
#!/bin/sh
for trans in `ls locale/`; do
    for string in `ls po/*.pot | sed 's/^po\///' | sed 's/.pot$//'` ; do
	if [ -f locale/${trans}/LC_MESSAGES/${string}.po ]; then
    	    msgfmt locale/${trans}/LC_MESSAGES/${string}.po \
		-c -o locale/${trans}/LC_MESSAGES/${string}.mo
	fi
    done
done

for trans in `ls locale/`; do
    for string in `ls po/plugins/*.pot | sed 's/^po\/plugins\///' | sed 's/.pot$//'` ; do
	if [ -f locale/${trans}/LC_MESSAGES/plugins/${string}.po ]; then
    	    msgfmt locale/${trans}/LC_MESSAGES/plugins/${string}.po \
		-c -o locale/${trans}/LC_MESSAGES/plugins/${string}.mo
	fi
    done
done

for trans in `ls locale/`; do
    for string in `ls po/extra/*.pot | sed 's/^po\/extra\///' | sed 's/.pot$//'` ; do
	if [ -f locale/${trans}/LC_MESSAGES/extra/${string}.po ]; then
    	    msgfmt locale/${trans}/LC_MESSAGES/extra/${string}.po \
		-c -o locale/${trans}/LC_MESSAGES/extra/${string}.mo
	fi
    done
done


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/squirrelmail/devel/.cvsignore,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- .cvsignore	15 Aug 2005 09:52:48 -0000	1.13
+++ .cvsignore	1 Mar 2006 10:16:46 -0000	1.14
@@ -1,3 +1,2 @@
-squirrelmail-1.4.5.tar.bz2
-squirrelmail-1.4.6-cvs20050812.patch
-squirrelmail-20050812_1242-CVS.locales.tar.bz2
+all_locales-1.4.6-20060221.tar.bz2
+squirrelmail-1.4.6.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/squirrelmail/devel/sources,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- sources	15 Aug 2005 09:52:48 -0000	1.13
+++ sources	1 Mar 2006 10:16:46 -0000	1.14
@@ -1,3 +1,2 @@
-bcfe0c1d4049e9c26e0040b2fa3adb07  squirrelmail-1.4.5.tar.bz2
-601b361de5f2a5dd4c21e9f223400673  squirrelmail-1.4.6-cvs20050812.patch
-8e9a2bdcfdb520f346c67ed791730e00  squirrelmail-20050812_1242-CVS.locales.tar.bz2
+29dfec2e0f71fba368a89c36c51881c2  all_locales-1.4.6-20060221.tar.bz2
+300ddcf66b7907a61b6e9404840e35de  squirrelmail-1.4.6.tar.bz2


Index: squirrelmail.spec
===================================================================
RCS file: /cvs/dist/rpms/squirrelmail/devel/squirrelmail.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- squirrelmail.spec	17 Jan 2006 06:23:28 -0000	1.26
+++ squirrelmail.spec	1 Mar 2006 10:16:46 -0000	1.27
@@ -6,19 +6,17 @@
 Summary: SquirrelMail webmail client
 Name: squirrelmail
 Version: 1.4.6
-Release: 0.cvs20050812.3.fc5
+Release: 1.fc5
 License: GPL
 URL: http://www.squirrelmail.org/
 Group: Applications/Internet
 #Source: %{name}-%{version}.tar.bz2
-Source0: %{name}-1.4.5.tar.bz2
+Source0: %{name}-%{version}.tar.bz2
 Source1: squirrelmail.conf
 Source2: squirrelmail-splash-fedora.png
 Source3: squirrelmail-splash-rhel.png
-Source4: squirrelmail-20050812_1242-CVS.locales.tar.bz2
-Patch2: squirrelmail-1.4.3-config.patch
-Patch3: squirrelmail-1.4.6-cvs20050812.patch
-Patch4: squirrelmail-1.4.5-charset.patch
+Source4: all_locales-1.4.6-20060221.tar.bz2
+Source5: compilelocales
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildArch: noarch
 Requires: httpd, php >= 4.0.4, php-mbstring, perl, tmpwatch >= 2.8, aspell
@@ -37,10 +35,7 @@
 
 %prep
 #%setup -q
-%setup -q -n squirrelmail-1.4.5
-%patch2 -p0
-%patch3 -p1
-%patch4 -p1
+%setup -q -n squirrelmail-%{version}
 rm -f plugins/make_archive.pl
 
 # Rearrange the documentation
@@ -126,36 +121,45 @@
 install -m 644 $RPM_SOURCE_DIR/squirrelmail.conf \
    $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
 
+# Switch all locales to UTF-8.
+sed -i functions/i18n.php \
+    -e "s/^\(\$languages\['\([^']*\)'\]\['CHARSET'].*= '\)\([^']*\)';/\1utf-8';/" \
+    -e "s/^\(\$languages\['\([^']*\)'\]\['LOCALE'].*=\).*/\1 '\2.UTF-8';/" 
+
+
 # install locales
 mkdir locale_tempdir
 cd locale_tempdir
 tar xfj %SOURCE4
-cd squirrelmail.locales
 # Convert all locales to utf-8. Not only is this probably the right thing
 # to do anyway, but SquirrelMail will corrupt charsets unless the charset
 # of the user's locale is a superset of the charset of any mail they reply to
 # https://sf.net/tracker/?func=detail&atid=423691&aid=1235345&group_id=311
 for LOCALE in `ls locale/` ; do
+    SKIPINVALID=
     case $LOCALE in
 	ja_JP)
 	    # ja_JP uses iso2022-jp for email but euc-jp in its interface.
 	    CHARSET=euc-jp
 	    ;;
 	ko_KR)
-	    # Not really, but I can't work out what charset the ko_KR help
-	    # files are in, so we'll just leave it alone for now.
-	    CHARSET=utf-8
+	    # ko_KR has broken help files in indeterminate charset. 
+	    # Assume it's _mostly_ EUC-KR as it's supposed to be, and let
+	    # iconv drop invalid characters from the input.
+	    SKIPINVALID=-c
+	    CHARSET=`grep CHARSET locale/$LOCALE/setup.php | cut -f6 -d\'`
 	    ;;
 	*)
 	    CHARSET=`grep CHARSET locale/$LOCALE/setup.php | cut -f6 -d\'`
 	    ;;
     esac
+
     # Check for locales where CHARSET isn't in LOCALE.
     grep LOCALE locale/$LOCALE/setup.php | grep -vi $CHARSET  || :
 
     if [ "$CHARSET" != "utf-8" -a "$CHARSET" != "UTF-8" ]; then
 	for a in `ls help/$LOCALE/ 2>/dev/null` ; do
-	   iconv -f $CHARSET -t utf-8 help/$LOCALE/$a > $a.new && mv $a.new help/$LOCALE/$a
+	    iconv $SKIPINVALID -f $CHARSET -t utf-8 help/$LOCALE/$a > $a.new && mv $a.new help/$LOCALE/$a
 	done
 	sed -e "s/CHARSET..[ ]*= [^;]*;/CHARSET'] = 'utf-8';/" \
 	    -e "s/LOCALE..[ ]*= [^;]*;/LOCALE'] = '$LOCALE.UTF-8';/" \
@@ -170,11 +174,11 @@
 	sed s/charset=$CHARSET/charset=utf-8/ $POFILE | iconv -f $CHARSET -t utf-8 > $POFILE.new && mv $POFILE.new $POFILE
     fi
 done
-./compilelocales
+sh $SOURCE5
 cp -r locale/* $RPM_BUILD_ROOT%{_datadir}/squirrelmail/locale/
 cp -r images/* $RPM_BUILD_ROOT%{_datadir}/squirrelmail/images/
 cp -r help/* $RPM_BUILD_ROOT%{_datadir}/squirrelmail/help/
-cd ../..
+cd ..
 rm $RPM_BUILD_ROOT%{_datadir}/squirrelmail/locale/README.locales
 
 %clean
@@ -207,6 +211,10 @@
 %{_sysconfdir}/cron.daily/squirrelmail.cron
 
 %changelog
+* Wed Mar 1 2006 David Woodhouse <dwmw2 redhat com> 1.4.6-1
+- Upgrade to 1.4.6 proper
+- Script the charset changes instead of using a patch
+
 * Tue Jan 17 2006 Warren Togami <wtogami redhat com> 1.4.6-0.cvs20050812.3
 - do not remove mo files
 - require php-mbstring


--- squirrelmail-1.4.3-config.patch DELETED ---


--- squirrelmail-1.4.5-charset.patch DELETED ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]