|
|
@@ -23,6 +23,21 @@
|
|
|
## SUCH DAMAGE.
|
|
|
##
|
|
|
|
|
|
+# package version
|
|
|
+%define V_sqmail 1.4.4
|
|
|
+%define V_locale 20050308
|
|
|
+%define V_plugin_compat 1.3
|
|
|
+%define V_plugin_addgraphics 2.3-1.0.3
|
|
|
+%define V_plugin_saslpwd 1.4.1-1.4
|
|
|
+%define V_plugin_checkquota 1.4-1.2.7
|
|
|
+%define V_plugin_foldersize 1.4-1.4
|
|
|
+%define V_plugin_gnupg 2.0.1-1.4.2
|
|
|
+%define V_plugin_ldif 1.4-1.2.x
|
|
|
+%define V_plugin_update 0.7-1.4.2
|
|
|
+%define V_plugin_userip 3.2-1.2.2
|
|
|
+%define V_plugin_smallcal 0.8-1.2.3
|
|
|
+%define V_plugin_vkeyboard 0.8
|
|
|
+
|
|
|
# package information
|
|
|
Name: squirrelmail
|
|
|
Summary: SquirrelMail Webmail Client
|
|
|
@@ -33,18 +48,38 @@ Distribution: OpenPKG
|
|
|
Class: EVAL
|
|
|
Group: Mail
|
|
|
License: GPL
|
|
|
-Version: 1.5.0
|
|
|
-Release: 20040513
|
|
|
+Version: %{V_sqmail}
|
|
|
+Release: 20050316
|
|
|
+
|
|
|
+# package options
|
|
|
+%option with_plugins no
|
|
|
|
|
|
# list of sources
|
|
|
Source0: http://osdn.dl.sourceforge.net/squirrelmail/squirrelmail-%{version}.tar.bz2
|
|
|
-Source1: config.php
|
|
|
+Source1: http://osdn.dl.sourceforge.net/squirrelmail/all_locales-%{V_sqmail}-%{V_locale}.tar.bz2
|
|
|
+Source2: http://www.squirrelmail.org/plugins/compatibility-%{V_plugin_compat}.tar.gz
|
|
|
+Source3: http://www.squirrelmail.org/plugins/addgraphics-%{V_plugin_addgraphics}.tar.gz
|
|
|
+Source4: http://www.squirrelmail.org/plugins/chg_sasl_passwd-%{V_plugin_saslpwd}.tar.gz
|
|
|
+Source5: http://www.squirrelmail.org/plugins/check_quota-%{V_plugin_checkquota}.tar.gz
|
|
|
+Source6: http://www.squirrelmail.org/plugins/folder_sizes.%{V_plugin_foldersize}.tar.gz
|
|
|
+Source7: http://www.squirrelmail.org/plugins/gpg.%{V_plugin_gnupg}.tar.gz
|
|
|
+Source8: http://www.squirrelmail.org/plugins/ldifimport-%{V_plugin_ldif}.tar.gz
|
|
|
+Source9: http://www.squirrelmail.org/plugins/pupdate.%{V_plugin_update}.tar.gz
|
|
|
+Source10: http://www.squirrelmail.org/plugins/show_user_and_ip-%{V_plugin_userip}.tar.gz
|
|
|
+Source11: http://www.squirrelmail.org/plugins/smallcal-%{V_plugin_smallcal}.tar.gz
|
|
|
+Source12: http://www.squirrelmail.org/plugins/vkeyboard-%{V_plugin_vkeyboard}.tar.gz
|
|
|
+Source13: opkg_large.png
|
|
|
+Source14: opkg_small.png
|
|
|
+Source15: config.php
|
|
|
+Patch0: squirrelmail.patch
|
|
|
+Patch1: squirrelmail.patch.plugins
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20040130
|
|
|
-PreReq: OpenPKG, openpkg >= 20040130, imapd, MTA, apache, apache::with_mod_php = yes
|
|
|
+PreReq: OpenPKG, openpkg >= 20040130, imapd, MTA, apache
|
|
|
+PreReq: apache::with_mod_php = yes, apache::with_mod_php_xml = yes
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -60,34 +95,127 @@ AutoReqProv: no
|
|
|
|
|
|
%track
|
|
|
prog squirrelmail = {
|
|
|
+ comment = "ms: 1.5.x is the development trunk, so do not update past 1.4.x"
|
|
|
version = %{version}
|
|
|
url = http://prdownloads.sourceforge.net/squirrelmail/
|
|
|
regex = squirrelmail-(__VER__)\.tar\.bz2
|
|
|
}
|
|
|
+ prog squirrelmail:locales = {
|
|
|
+ comment = "ms: 1.5.x is the development trunk, so do not update past 1.4.x"
|
|
|
+ version = %{V_sqmail}-%{V_locale}
|
|
|
+ url = http://prdownloads.sourceforge.net/squirrelmail/
|
|
|
+ regex = all_locales-(__VER__)\.tar\.bz2
|
|
|
+ }
|
|
|
+ prog squirrelmail:compat = {
|
|
|
+ version = %{V_plugin_compat}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = compatibility-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:addgraphics = {
|
|
|
+ version = %{V_plugin_addgraphics}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = addgraphics-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:saslpwd = {
|
|
|
+ version = %{V_plugin_saslpwd}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = chg_sasl_passwd-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:checkquota = {
|
|
|
+ version = %{V_plugin_checkquota}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = check_quota-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:foldersize = {
|
|
|
+ version = %{V_plugin_foldersize}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = folder_sizes.(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:gnupg = {
|
|
|
+ version = %{V_plugin_gnupg}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = gpg.(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:ldif = {
|
|
|
+ version = %{V_plugin_ldif}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = ldifimport-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:update = {
|
|
|
+ version = %{V_plugin_update}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = pupdate.(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:userip = {
|
|
|
+ version = %{V_plugin_userip}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = show_user_and_ip-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:smallcal = {
|
|
|
+ version = %{V_plugin_smallcal}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = smallcal-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog squirrelmail:vkeyboard = {
|
|
|
+ version = %{V_plugin_vkeyboard}
|
|
|
+ url = http://www.squirrelmail.org/plugins/
|
|
|
+ regex = vkeyboard-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
|
|
|
%prep
|
|
|
- %setup -q
|
|
|
- rm -f plugins/make_archive.pl
|
|
|
-
|
|
|
- # rearrange the documentation
|
|
|
- mv AUTHORS ChangeLog COPYING INSTALL README UPGRADE doc/
|
|
|
- mv ReleaseNotes doc/ReleaseNotes.txt
|
|
|
- mv themes/README.themes doc/
|
|
|
- for fil in `find plugins -name "README*" -o -name INSTALL \
|
|
|
- -o -name CHANGES -o -name HISTORY`; do
|
|
|
- %{l_shtool} mkdir -f -p -m 755 doc/`dirname $fil`
|
|
|
- mv -f $fil $_
|
|
|
+ %setup -q -c -n squirrelmail
|
|
|
+ %setup -q -D -T -a 1 -c -n squirrelmail/all_locales-%{V_sqmail}-%{V_locale}
|
|
|
+%if "%{with_plugins}" == "yes"
|
|
|
+ %setup -q -D -T -a 2 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 3 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 4 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 5 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 6 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 7 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 8 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 9 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 10 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 11 -n squirrelmail
|
|
|
+ %setup -q -D -T -a 12 -n squirrelmail
|
|
|
+
|
|
|
+ # move additional plugins where other are already placed
|
|
|
+ for plug in addgraphics check_quota chg_sasl_passwd compatibility \
|
|
|
+ folder_sizes gpg ldifimport pupdate show_user_and_ip \
|
|
|
+ smallcal vkeyboard; do
|
|
|
+ mv $plug squirrelmail-%{V_sqmail}/plugins
|
|
|
done
|
|
|
- mv doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell
|
|
|
- rm -rf doc/plugins/squirrelspell/doc
|
|
|
- mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell
|
|
|
- rm -f doc/plugins/squirrelspell/index.php
|
|
|
- rm -rf plugins/squirrelspell/doc
|
|
|
+%endif
|
|
|
+
|
|
|
+ # clean up login screen of distractions
|
|
|
+ ( cd %{l_tmpdir}/squirrelmail/squirrelmail-%{V_sqmail}
|
|
|
+ %patch -p0
|
|
|
+ ) || exit $?
|
|
|
+
|
|
|
+ # rearrange documentation and remove archive script
|
|
|
+ ( cd %{l_tmpdir}/squirrelmail/squirrelmail-%{V_sqmail}
|
|
|
+ mv AUTHORS ChangeLog COPYING INSTALL README UPGRADE doc/
|
|
|
+ mv ReleaseNotes doc/ReleaseNotes.txt
|
|
|
+ mv themes/README.themes doc/
|
|
|
+ for fil in `find plugins/ -name "README*" -o -name "Readme*" \
|
|
|
+ -o -name INSTALL -o -name CHANGES -o -name HISTORY`; do
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 doc/`dirname $fil`
|
|
|
+ mv -f $fil $_
|
|
|
+ done
|
|
|
+ mv doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell
|
|
|
+ rm -rf doc/plugins/squirrelspell/doc doc/plugins/squirrelspell/index.php
|
|
|
+ mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell
|
|
|
+ rm -rf plugins/squirrelspell/doc
|
|
|
+ rm -f plugins/make_archive.pl
|
|
|
+%if "%{with_plugins}" == "yes"
|
|
|
+ mv plugins/pupdate/docs/* doc/plugins/pupdate
|
|
|
+ rm -rf plugins/pupdate/docs
|
|
|
+%endif
|
|
|
|
|
|
- # fixup various files
|
|
|
- echo "left_refresh=300" >>data/default_pref
|
|
|
- echo "hour_format=1" >>data/default_pref
|
|
|
- echo "reply_citation_style=author_said" >>data/default_pref
|
|
|
+ # set default prefs
|
|
|
+ echo "left_refresh=300" >>data/default_pref
|
|
|
+ echo "hour_format=1" >>data/default_pref
|
|
|
+ echo "reply_citation_style=author_said" >>data/default_pref
|
|
|
+ ) || exit $?
|
|
|
|
|
|
%build
|
|
|
|
|
|
@@ -101,42 +229,94 @@ AutoReqProv: no
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/squirrelmail/spool/attach
|
|
|
|
|
|
- # install default_pref
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
- data/default_pref \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs/
|
|
|
-
|
|
|
- # install the config files
|
|
|
- l_fqdm=`%{l_shtool} echo -e %h%d`
|
|
|
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
|
|
|
- -e "s;@l_fqdm@;${l_fqdm};g" \
|
|
|
- %{SOURCE config.php} \
|
|
|
- config/config_default.php \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
- config/config_local.php \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
|
|
|
-
|
|
|
- # install the squirrelmail configuration perl script
|
|
|
- %{l_shtool} install -c -m 755 \
|
|
|
- -e 's;chdir($dir);chdir("%{l_prefix}/etc/squirrelmail");g' \
|
|
|
- -e 's;\.\./plugins;%{l_prefix}/share/squirrelmail/plugins;g' \
|
|
|
- -e 's;\.\./themes;%{l_prefix}/share/squirrelmail/themes;g' \
|
|
|
- -e 's;config/config_local.php;config_local.php;g' \
|
|
|
- config/conf.pl \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf
|
|
|
-
|
|
|
- # install main index file to view in client browser
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
- index.php \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
|
|
|
-
|
|
|
- # copy over the rest, a lot of stuff
|
|
|
- for dir in class functions help images include locale plugins src themes; do
|
|
|
- cp -rp $dir $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
|
|
|
- done
|
|
|
+ # install locales
|
|
|
+ ( cd %{l_tmpdir}/squirrelmail/all_locales-%{V_sqmail}-%{V_locale}
|
|
|
+ cp -rpf help images locale $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
|
|
|
+ ) || exit $?
|
|
|
+
|
|
|
+ # install program
|
|
|
+ ( cd %{l_tmpdir}/squirrelmail/squirrelmail-%{V_sqmail}
|
|
|
+
|
|
|
+ # install default_pref
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ data/default_pref \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs/
|
|
|
+
|
|
|
+ # create initial administrator list
|
|
|
+ echo %{l_musr} >>$RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/admins
|
|
|
+
|
|
|
+ # install main index file to view in client browser
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ index.php \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
|
|
|
+
|
|
|
+ # copy over most functional directories, a lot of stuff
|
|
|
+ for dir in class functions include plugins src themes; do
|
|
|
+ cp -rpf $dir $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
|
|
|
+ done
|
|
|
+ cp -rpf images/* $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
|
|
|
+ cp -pf locale/timezones.cfg $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/locale/
|
|
|
+
|
|
|
+ # install main config files
|
|
|
+ l_fqdm=`%{l_shtool} echo -e %h%d`
|
|
|
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
|
|
|
+ -e 's;config/\(config_local.php\);\1;g' \
|
|
|
+ -e "s;@l_fqdm@;${l_fqdm};g" \
|
|
|
+ %{SOURCE config.php} \
|
|
|
+ config/config_default.php \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/
|
|
|
+%if "%{with_plugins}" == "yes"
|
|
|
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail
|
|
|
+ %{l_patch} -p0 <%{PATCH squirrelmail.patch.plugins}
|
|
|
+ rm -f *.orig
|
|
|
+ ) || exit $?
|
|
|
+%endif
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ config/config_local.php \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
|
|
|
+
|
|
|
+ # install plugin config files
|
|
|
+%if "%{with_plugins}" == "yes"
|
|
|
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins
|
|
|
+ cp -pf check_quota/config.php.sample check_quota/config.php
|
|
|
+ cp -pf chg_sasl_passwd/config.php.sample chg_sasl_passwd/config.php
|
|
|
+ cp -pf show_user_and_ip/config.php.sample show_user_and_ip/config.php
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ -e "s;\(\$vkeyboard_msgsize.*\)'medium';\1'xx-small';" \
|
|
|
+ -e "s;\(\$vkeyboard_layout.*\)'us_english';\1'portuguese_abnt2';" \
|
|
|
+ -e "s;\(\$vkeyboard_height.*\)'250';\1'270';" \
|
|
|
+ vkeyboard/config.php.sample \
|
|
|
+ vkeyboard/config.php
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ -e "s;sm_logo\.png;opkg_small.png;" \
|
|
|
+ -e "s;SquirrelMail Logo;OpenPKG Logo;" \
|
|
|
+ -e "s;www\.squirrelmail\.org;www.openpkg.org;" \
|
|
|
+ -e "s;\($image_width.*\) = 308;\1 = 208;" \
|
|
|
+ -e "s;\($image_height.*\) = 111;\1 = 66;" \
|
|
|
+ addgraphics/config.php.typical.one.domain \
|
|
|
+ addgraphics/config.php
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ %{SOURCE opkg_small.png} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
|
|
|
+ ) || exit $?
|
|
|
+%endif
|
|
|
+
|
|
|
+ # install squirrelmail configuration perl script
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;chdir($dir);chdir("%{l_prefix}/etc/squirrelmail");g' \
|
|
|
+ -e 's;\.\./plugins;%{l_prefix}/share/squirrelmail/plugins;g' \
|
|
|
+ -e 's;\.\./themes;%{l_prefix}/share/squirrelmail/themes;g' \
|
|
|
+ -e 's;config/config_local.php;config_local.php;g' \
|
|
|
+ config/conf.pl \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf
|
|
|
+
|
|
|
+ # use our own logo, a squirrel next to a OpenPKG package
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ %{SOURCE opkg_large.png} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
|
|
|
+ ) || exit $?
|
|
|
|
|
|
- # replace false config paths throught
|
|
|
+ # replace false /etc config paths throughout
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;SM_PATH \. \(.\)config/;\1%{l_prefix}/etc/squirrelmail/;g' \
|
|
|
-e 's;require_once(SM_PATH \. \(.*\)%{l_prefix};require_once(\1%{l_prefix};g' \
|
|
|
@@ -145,8 +325,6 @@ AutoReqProv: no
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/abook_take/*.php \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/administrator/*.php \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/calendar/*.php \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/message_details/*.php \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/squirrelspell/*.php \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/src/*.php
|
|
|
|
|
|
# determine package ingredients and tag config files
|
|
|
@@ -154,6 +332,12 @@ AutoReqProv: no
|
|
|
%{l_files_std} \
|
|
|
'%config %{l_prefix}/etc/squirrelmail/*' \
|
|
|
'%config %{l_prefix}/share/squirrelmail/prefs/*' \
|
|
|
+%if "%{with_plugins}" == "yes"
|
|
|
+ '%config %{l_prefix}/share/squirrelmail/plugins/check_quota/config.php' \
|
|
|
+ '%config %{l_prefix}/share/squirrelmail/plugins/ldifimport/config.php' \
|
|
|
+ '%config %{l_prefix}/share/squirrelmail/plugins/show_user_and_ip/config.php' \
|
|
|
+ '%config %{l_prefix}/share/squirrelmail/plugins/vkeyboard/config.php' \
|
|
|
+%endif
|
|
|
'%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/share/squirrelmail/prefs' \
|
|
|
'%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/squirrelmail/spool/attach'
|
|
|
|