rpms/squirrelmail/FC-4 squirrelmail.spec,1.22,1.23
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sun Mar 5 11:07:51 UTC 2006
- Previous message (by thread): rpms/kernel/devel patch-2.6.16-rc5-git8.bz2.sign, NONE, 1.1 .cvsignore, 1.370, 1.371 kernel-2.6.spec, 1.2015, 1.2016 sources, 1.311, 1.312 upstream, 1.286, 1.287 patch-2.6.16-rc5-git7.bz2.sign, 1.1, NONE
- Next message (by thread): rpms/selinux-policy/devel policy-20060207.patch, 1.35, 1.36 selinux-policy.spec, 1.136, 1.137
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dwmw2
Update of /cvs/dist/rpms/squirrelmail/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv11972
Modified Files:
squirrelmail.spec
Log Message:
Fix up i18n.php _before_ installing it to the buildroot, not afterwards.
Index: squirrelmail.spec
===================================================================
RCS file: /cvs/dist/rpms/squirrelmail/FC-4/squirrelmail.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- squirrelmail.spec 3 Mar 2006 17:10:41 -0000 1.22
+++ squirrelmail.spec 5 Mar 2006 11:07:48 -0000 1.23
@@ -6,7 +6,7 @@
Summary: SquirrelMail webmail client
Name: squirrelmail
Version: 1.4.6
-Release: 1.fc4
+Release: 3.fc4
License: GPL
URL: http://www.squirrelmail.org/
Group: Applications/Internet
@@ -35,6 +35,11 @@
%prep
#%setup -q
%setup -q -n squirrelmail-%{version}
+mkdir locale_tempdir
+cd locale_tempdir
+tar xfj %SOURCE4
+
+%build
rm -f plugins/make_archive.pl
# Rearrange the documentation
@@ -51,7 +56,7 @@
mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell
rm -f doc/plugins/squirrelspell/index.php
rmdir plugins/squirrelspell/doc
-perl -pi -e "s/\.\.//g" doc/index.html
+perl -pi -e "s{\.\./}{}g" doc/index.html
# Fixup various files
echo "left_refresh=300" >> data/default_pref
@@ -63,7 +68,7 @@
# Fix the version
%{__perl} -pi -e "s|^(\s*\\\$version\s*=\s*'[^']+)'|\1-%{release}'|g"\
functions/strings.php
-
+
# replace splash screen
%if %{fedora_splash}
cp %{SOURCE2} images/sm_logo.png
@@ -71,6 +76,59 @@
cp %{SOURCE3} images/sm_logo.png
%endif
+# 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
+sed -i functions/i18n.php \
+ -e "s/^\(\$languages\['\([^']*\)'\]\['CHARSET'].*= '\)\([^']*\)';/\1utf-8';/" \
+ -e "s/^\(\$languages\['\([^']*\)'\]\['LOCALE'].*=\).*/\1 '\2.UTF-8';/"
+
+cd locale_tempdir
+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)
+ # 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 $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';/" \
+ locale/$LOCALE/setup.php > setup.php.new ; mv setup.php.new locale/$LOCALE/setup.php
+ fi
+done
+
+# do the pofiles separately since they each specify their own charset
+for POFILE in `find locale -name \*.po` ; do
+ CHARSET=`grep charset= $POFILE | cut -f2 -d= | cut -f1 -d\\\\`
+ if [ "$CHARSET" != "utf-8" -a "$CHARSET" != "UTF-8" ]; then
+ sed s/charset=$CHARSET/charset=utf-8/ $POFILE | iconv -f $CHARSET -t utf-8 > $POFILE.new && mv $POFILE.new $POFILE
+ fi
+done
+for POFILE in `find . -name \*.po` ; do
+ msgfmt $POFILE -c -o `echo $POFILE | sed s/\.po\$/.mo/`
+done
+cd ..
+
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/squirrelmail
@@ -120,62 +178,7 @@
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
-# 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)
- # 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 $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';/" \
- locale/$LOCALE/setup.php > setup.php.new ; mv setup.php.new locale/$LOCALE/setup.php
- fi
-done
-
-# do the pofiles separately since they each specify their own charset
-for POFILE in `find locale -name \*.po` ; do
- CHARSET=`grep charset= $POFILE | cut -f2 -d= | cut -f1 -d\\\\`
- if [ "$CHARSET" != "utf-8" -a "$CHARSET" != "UTF-8" ]; then
- sed s/charset=$CHARSET/charset=utf-8/ $POFILE | iconv -f $CHARSET -t utf-8 > $POFILE.new && mv $POFILE.new $POFILE
- fi
-done
-for POFILE in `find . -name \*.po` ; do
- msgfmt $POFILE -c -o `echo $POFILE | sed s/\.po\$/.mo/`
-done
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/
@@ -212,6 +215,13 @@
%{_sysconfdir}/cron.daily/squirrelmail.cron
%changelog
+* Fri Mar 3 2006 Warren Togami <wtogami at redhat.com> 1.4.6-3
+- Fix regex in doc mangling (#183943 Michal Jaegermann)
+
+* Fri Mar 3 2006 David Woodhouse <dwmw2 at redhat.com> 1.4.6-2
+- Add a %%build section, move the file mangling to it.
+ (#162852 Nicolas Mailhot)
+
* Wed Mar 1 2006 David Woodhouse <dwmw2 at redhat.com> 1.4.6-1
- Upgrade to 1.4.6 proper for CVE-2006-0377 CVE-2006-0195 CVE-2006-0188
- Script the charset changes instead of using a patch
- Previous message (by thread): rpms/kernel/devel patch-2.6.16-rc5-git8.bz2.sign, NONE, 1.1 .cvsignore, 1.370, 1.371 kernel-2.6.spec, 1.2015, 1.2016 sources, 1.311, 1.312 upstream, 1.286, 1.287 patch-2.6.16-rc5-git7.bz2.sign, 1.1, NONE
- Next message (by thread): rpms/selinux-policy/devel policy-20060207.patch, 1.35, 1.36 selinux-policy.spec, 1.136, 1.137
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list