# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171410 -7200 # Node ID 37b427bb60b233e3acdfbfa6ec4c1402451b30c3 # Parent 94aa9476a1c17cc2ad08eee2c3ca97fbe7e7a491 Update versions, modernize packaging, and accommodate new braindead source name. diff -r 94aa9476a1c1 -r 37b427bb60b2 squirrelmail/squirrelmail.spec --- a/squirrelmail/squirrelmail.spec Tue Aug 28 18:29:45 2012 +0200 +++ b/squirrelmail/squirrelmail.spec Tue Aug 28 18:30:10 2012 +0200 @@ -22,14 +22,14 @@ ## # package version -%define V_squirrelmail 1.4.21 +%define V_squirrelmail 1.4.22 %define V_locale 1.4.18-20090526 -%define V_plugin_compat 2.0.14-1.0 +%define V_plugin_compat 2.0.16-1.0 %define V_plugin_logger 2.3.1-1.2.7 %define V_plugin_addgraphics 2.3-1.0.3 -%define V_plugin_avelsieve 1.9.7 +%define V_plugin_avelsieve 1.9.9 +%define V_plugin_ldappwd 2.2-1.4.0 %define V_plugin_saslpwd 1.4.1-1.4 -%define V_plugin_ldappwd 2.2-1.4.0 %define V_plugin_checkquota 2.2-1.4.0 %define V_plugin_foldersize 1.5-1.4.0 %define V_plugin_gnupg 2.1 @@ -37,12 +37,12 @@ %define V_plugin_update 0.7-1.4.2 %define V_plugin_userip 3.3-re-1.2.2 %define V_plugin_smallcal 0.8-1.2.3 -%define V_plugin_vkeyboard 0.9 +%define V_plugin_vkeyboard 0.9.1 %define V_plugin_username 2.3-1.0.0 %define V_plugin_loginnotes 1.2-1.4.0 -%define V_plugin_passforget 2.2-1.0.1 +%define V_plugin_passforget 2.3-1.0.1 %define V_plugin_captcha 1.2.3-1.2.9 -%define V_plugin_smime 0.7-1.1.1 +%define V_plugin_smime 1.0-1.1.1 %define V_plugin_debug 1.2-1.4 # package information @@ -56,20 +56,20 @@ Group: Mail License: GPL Version: %{V_squirrelmail} -Release: 20110708 +Release: 20120800 # package options %option with_plugins no # list of sources -Source0: http://switch.dl.sourceforge.net/squirrelmail/squirrelmail-%{V_squirrelmail}.tar.bz2 +Source0: http://switch.dl.sourceforge.net/squirrelmail/stable/%{V_squirrelmail}/squirrelmail-webmail-%{V_squirrelmail}.tar.bz2 Source1: http://switch.dl.sourceforge.net/squirrelmail/all_locales-%{V_locale}.tar.bz2 Source2: http://www.squirrelmail.org/plugins/compatibility-%{V_plugin_compat}.tar.gz Source3: http://www.squirrelmail.org/plugins/squirrel_logger-%{V_plugin_logger}.tar.gz Source4: http://www.squirrelmail.org/plugins/addgraphics-%{V_plugin_addgraphics}.tar.gz Source5: http://www.squirrelmail.org/plugins/avelsieve-%{V_plugin_avelsieve}.tar.gz -Source6: http://www.squirrelmail.org/plugins/chg_sasl_passwd-%{V_plugin_saslpwd}.tar.gz -Source7: http://www.squirrelmail.org/plugins/change_ldappass-%{V_plugin_ldappwd}.tar.gz +Source6: http://www.squirrelmail.org/plugins/change_ldappass-%{V_plugin_ldappwd}.tar.gz +Source7: http://www.squirrelmail.org/plugins/chg_sasl_passwd-%{V_plugin_saslpwd}.tar.gz Source8: http://www.squirrelmail.org/plugins/check_quota-%{V_plugin_checkquota}.tar.gz Source9: http://www.squirrelmail.org/plugins/folder_sizes-%{V_plugin_foldersize}.tar.gz Source10: http://www.squirrelmail.org/plugins/gpg-%{V_plugin_gnupg}.tar.gz @@ -95,13 +95,9 @@ Patch1: squirrelmail.patch.plugins # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823 -PreReq: OpenPKG, openpkg >= 20060823 +BuildPreReq: OpenPKG, openpkg >= 20100101 +PreReq: OpenPKG, openpkg >= 20100101 PreReq: MTA, apache, apache-php, apache-php::with_xml = yes -AutoReq: no -AutoReqProv: no %description SquirrelMail is a standards based webmail package written in PHP. It @@ -263,78 +259,69 @@ } %prep - %setup -q -c -n squirrelmail - %setup -q -D -T -a 1 -c -n squirrelmail/all_locales-%{V_locale} - %setup -q -D -T -a 2 -n squirrelmail - %setup -q -D -T -a 3 -n squirrelmail - mv compatibility squirrelmail-%{V_squirrelmail}/plugins - mv squirrel_logger squirrelmail-%{V_squirrelmail}/plugins + %setup -q -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 1 -c -n squirrelmail-webmail-%{V_squirrelmail}/all_locales-%{V_locale} + %setup -q -D -T -a 2 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 3 -n squirrelmail-webmail-%{V_squirrelmail} + mv compatibility squirrel_logger plugins/ %if "%{with_plugins}" == "yes" - %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 - %setup -q -D -T -a 13 -n squirrelmail - %setup -q -D -T -a 14 -n squirrelmail - %setup -q -D -T -a 15 -n squirrelmail - %setup -q -D -T -a 16 -n squirrelmail - %setup -q -D -T -a 17 -n squirrelmail - %setup -q -D -T -a 18 -n squirrelmail - %setup -q -D -T -a 19 -n squirrelmail - %setup -q -D -T -a 20 -n squirrelmail - %setup -q -D -T -a 21 -n squirrelmail + %setup -q -D -T -a 4 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 5 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 6 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 7 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 8 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 9 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 10 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 11 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 12 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 13 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 14 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 15 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 16 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 17 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 18 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 19 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 20 -n squirrelmail-webmail-%{V_squirrelmail} + %setup -q -D -T -a 21 -n squirrelmail-webmail-%{V_squirrelmail} # move additional plugins where other are already placed for plug in addgraphics avelsieve check_quota chg_sasl_passwd \ change_ldappass folder_sizes gpg ldifimport pupdate \ show_user_and_ip smallcal vkeyboard username \ login_notes password_forget captcha smime debugger; do - mv $plug squirrelmail-%{V_squirrelmail}/plugins + mv $plug plugins/ done %endif # clean up login screen of distractions - ( cd squirrelmail-%{V_squirrelmail} - %patch -p0 - ) || exit $? + %patch -p0 # rearrange documentation and remove archive script - ( cd squirrelmail-%{V_squirrelmail} - 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 - rm -rf doc/plugins/squirrelspell/doc doc/plugins/squirrelspell/index.php - mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell - rm -rf plugins/squirrelspell/doc + mv themes/README.themes locale/README.locales 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 + rm -rf doc/plugins/squirrelspell/doc doc/plugins/squirrelspell/index.php + mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell + rm -rf plugins/squirrelspell/doc %if "%{with_plugins}" == "yes" - mv plugins/pupdate/docs/* doc/plugins/pupdate - rm -rf plugins/pupdate/docs + mv plugins/pupdate/docs/* doc/plugins/pupdate + rm -rf plugins/pupdate/docs %endif - # postadjustment cosmetics - %{l_shtool} subst \ - -e 's;\(\$color\[4\], .border="0" width=\)"350";\1"250";1' \ - src/login.php + # postadjustment cosmetics + %{l_shtool} subst \ + -e 's;\(\$color\[4\], .border="0" width=\)"350";\1"250";1' \ + src/login.php - # set default prefs - cat %{SOURCE defprefs.txt} >>data/default_pref - ) || exit $? + # set default prefs + cat %{SOURCE defprefs.txt} >>data/default_pref %build %install - rm -rf $RPM_BUILD_ROOT - # create directory structure %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/bin \ @@ -349,126 +336,123 @@ ) || exit $? # install program - ( cd squirrelmail-%{V_squirrelmail} + # install default_pref + %{l_shtool} install -c -m 644 \ + data/default_pref \ + $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs/ - # 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 - # create initial administrator list - echo %{l_musr} >>$RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/admins + # copy over most functional directories, a lot of stuff + for dir in class doc 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/ - # copy over most functional directories, a lot of stuff - for dir in class doc 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 \ - config/config_local.php \ - $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/ + # 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 \ + config/config_local.php \ + $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/ %if "%{with_plugins}" == "yes" - ( cd $RPM_BUILD_ROOT%{l_prefix} - %{l_patch} -p0 <%{PATCH squirrelmail.patch.plugins} - rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/functions/*.orig - rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/src/*.orig - ) || exit $? + ( cd $RPM_BUILD_ROOT%{l_prefix} + %{l_patch} -p0 <%{PATCH squirrelmail.patch.plugins} + rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/functions/*.orig + rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/src/*.orig + ) || exit $? %endif - # install plugin config files - ( cd $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins + # install plugin config files + ( cd $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins %if "%{with_plugins}" == "yes" - cp -pf check_quota/config.sample.php 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;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 = 201;" \ - -e "s;\/\/\(\$image_height.*\) = 111;\1 = 62;" \ - addgraphics/config.php.typical.one.domain \ - addgraphics/config.php - %{l_shtool} install -c -m 644 \ - -e 's/^\(\$sieve_preferred_sasl_mech =\).*/\1 "PLAIN LOGIN CRAM-MD5 DIGEST-MD5";/' \ - -e 's/^\(\$avelsieve_oldcyrus =\).*/\1 false;/' \ - -e 's/^\(\$startitems =\).*/\1 4;/' \ - avelsieve/config/config_sample.php \ - avelsieve/config/config.php - %{l_shtool} install -c -m 644 \ - change_ldappass/config_sample.php \ - change_ldappass/config.php - %{l_shtool} install -c -m 644 \ - login_notes/config.sample.php \ - login_notes/config.php - %{l_shtool} install -c -m 644 \ - password_forget/config_example.php \ - password_forget/config.php - %{l_shtool} install -c -m 644 \ - -e 's;^//\( *.CAPTCHA.,\);\1;g' \ - -e 's,\(\$sl_dateformat *=\).*\(.\);$,\1 \2d.m.Y H:i:s\2;,g' \ - -e 's,\(\$sl_logfile *=\).*\(.\);$,\1 \2%{l_prefix}/var/squirrelmail/log/squirrelmail.log\2;,g' \ - squirrel_logger/config_example.php \ - squirrel_logger/config.php - %{l_shtool} install -c -m 644 \ - -e 's/\(\$log_CAPTCHA_events *=\).*/\1 1;/' \ - -e 's,\(\$captcha_backend *=\).*\(.\);$,\1 \2recaptcha\2;,' \ - captcha/config_example.php \ - captcha/config.php - for captname in \ - b2evo captcha_php csi freecap hec hn_captcha opencaptcha \ - phpcaptcha quickcaptcha quickform recaptcha textcaptcha - do - mv \ - captcha/backends/${captname}/${captname}_config_example.php \ - captcha/backends/${captname}/${captname}_config.php - done - %{l_shtool} install -c -m 644 \ - smime/config_example.php \ - smime/config.php - %{l_shtool} subst \ - -e 's;\(path_to_gpg=\)/usr/bin/gpg.*;\1%{l_prefix}/bin/gpg;' \ - gpg/gpg_local_prefs.txt - %{l_shtool} install -c -m 644 \ - -e 's;\(adminusername = "\)[^"]*;\1%{l_musr};' \ - -e 's;corehide = 1;corehide = 0;' \ - pupdate/config.php.sample \ - pupdate/config.php - %{l_shtool} install -c -m 644 \ - -e "s;\(\$vkeyboard_msgsize.*\)'medium';\1'x-small';" \ - -e "s;\(\$vkeyboard_layout.*\)'us_english';\1'portuguese_abnt2';" \ - -e "s;\(\$vkeyboard_height.*\)'250';\1'270';" \ - vkeyboard/config.php.sample \ - vkeyboard/config.php - cp -pf username/config.php.sample username/config.php - %{l_shtool} install -c -m 644 \ - %{SOURCE opkg_small.png} \ - $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/ + cp -pf check_quota/config.sample.php 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;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 = 201;" \ + -e "s;\/\/\(\$image_height.*\) = 111;\1 = 62;" \ + addgraphics/config.php.typical.one.domain \ + addgraphics/config.php + %{l_shtool} install -c -m 644 \ + -e 's/^\(\$sieve_preferred_sasl_mech =\).*/\1 "PLAIN LOGIN CRAM-MD5 DIGEST-MD5";/' \ + -e 's/^\(\$avelsieve_oldcyrus =\).*/\1 false;/' \ + -e 's/^\(\$startitems =\).*/\1 4;/' \ + avelsieve/config/config_sample.php \ + avelsieve/config/config.php + %{l_shtool} install -c -m 644 \ + change_ldappass/config_sample.php \ + change_ldappass/config.php + %{l_shtool} install -c -m 644 \ + login_notes/config.sample.php \ + login_notes/config.php + %{l_shtool} install -c -m 644 \ + password_forget/config_example.php \ + password_forget/config.php + %{l_shtool} install -c -m 644 \ + -e 's;^//\( *.CAPTCHA.,\);\1;g' \ + -e 's,\(\$sl_dateformat *=\).*\(.\);$,\1 \2d.m.Y H:i:s\2;,g' \ + -e 's,\(\$sl_logfile *=\).*\(.\);$,\1 \2%{l_prefix}/var/squirrelmail/log/squirrelmail.log\2;,g' \ + squirrel_logger/config_example.php \ + squirrel_logger/config.php + %{l_shtool} install -c -m 644 \ + -e 's/\(\$log_CAPTCHA_events *=\).*/\1 1;/' \ + -e 's,\(\$captcha_backend *=\).*\(.\);$,\1 \2recaptcha\2;,' \ + captcha/config_example.php \ + captcha/config.php + for captname in \ + b2evo captcha_php csi freecap hec hn_captcha opencaptcha \ + phpcaptcha quickcaptcha quickform recaptcha textcaptcha + do + mv \ + captcha/backends/${captname}/${captname}_config_example.php \ + captcha/backends/${captname}/${captname}_config.php + done + %{l_shtool} install -c -m 644 \ + smime/config_example.php \ + smime/config.php + %{l_shtool} subst \ + -e 's;\(path_to_gpg=\)/usr/bin/gpg.*;\1%{l_prefix}/bin/gpg;' \ + gpg/gpg_local_prefs.txt + %{l_shtool} install -c -m 644 \ + -e 's;\(adminusername = "\)[^"]*;\1%{l_musr};' \ + -e 's;corehide = 1;corehide = 0;' \ + pupdate/config.php.sample \ + pupdate/config.php + %{l_shtool} install -c -m 644 \ + -e "s;\(\$vkeyboard_msgsize.*\)'medium';\1'x-small';" \ + -e "s;\(\$vkeyboard_layout.*\)'us_english';\1'portuguese_abnt2';" \ + -e "s;\(\$vkeyboard_height.*\)'250';\1'270';" \ + vkeyboard/config.php.sample \ + vkeyboard/config.php + cp -pf username/config.php.sample username/config.php + %{l_shtool} install -c -m 644 \ + %{SOURCE opkg_small.png} \ + $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/ %endif - ) || exit $? + ) || exit $? - # 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 + # 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 $? + # 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/ # install runcommand script %{l_shtool} mkdir -f -p -m 755 \ @@ -547,7 +531,6 @@ %files -f files %clean - rm -rf $RPM_BUILD_ROOT %preun # before erase, remove log files