michael@157: ## michael@157: ## squirrelmail.spec -- OpenPKG RPM Package Specification michael@157: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@157: ## michael@157: ## Permission to use, copy, modify, and distribute this software for michael@157: ## any purpose with or without fee is hereby granted, provided that michael@157: ## the above copyright notice and this permission notice appear in all michael@157: ## copies. michael@157: ## michael@157: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@157: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@157: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@157: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@157: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@157: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@157: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@157: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@157: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@157: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@157: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@157: ## SUCH DAMAGE. michael@157: ## michael@157: michael@157: # package version michael@537: %define V_squirrelmail 1.4.22 michael@352: %define V_locale 1.4.18-20090526 michael@537: %define V_plugin_compat 2.0.16-1.0 michael@352: %define V_plugin_logger 2.3.1-1.2.7 michael@157: %define V_plugin_addgraphics 2.3-1.0.3 michael@537: %define V_plugin_avelsieve 1.9.9 michael@537: %define V_plugin_ldappwd 2.2-1.4.0 michael@157: %define V_plugin_saslpwd 1.4.1-1.4 michael@157: %define V_plugin_checkquota 2.2-1.4.0 michael@157: %define V_plugin_foldersize 1.5-1.4.0 michael@159: %define V_plugin_gnupg 2.1 michael@157: %define V_plugin_ldif 1.4-1.2.x michael@157: %define V_plugin_update 0.7-1.4.2 michael@157: %define V_plugin_userip 3.3-re-1.2.2 michael@157: %define V_plugin_smallcal 0.8-1.2.3 michael@537: %define V_plugin_vkeyboard 0.9.1 michael@157: %define V_plugin_username 2.3-1.0.0 michael@159: %define V_plugin_loginnotes 1.2-1.4.0 michael@537: %define V_plugin_passforget 2.3-1.0.1 michael@352: %define V_plugin_captcha 1.2.3-1.2.9 michael@537: %define V_plugin_smime 1.0-1.1.1 michael@159: %define V_plugin_debug 1.2-1.4 michael@157: michael@157: # package information michael@157: Name: squirrelmail michael@157: Summary: SquirrelMail Webmail Client michael@157: URL: http://www.squirrelmail.org/ michael@157: Vendor: Squirrelmail Developers michael@157: Packager: OpenPKG Foundation e.V. michael@157: Distribution: OpenPKG Community michael@157: Class: EVAL michael@157: Group: Mail michael@157: License: GPL michael@157: Version: %{V_squirrelmail} michael@537: Release: 20120800 michael@157: michael@157: # package options michael@157: %option with_plugins no michael@157: michael@157: # list of sources michael@537: Source0: http://switch.dl.sourceforge.net/squirrelmail/stable/%{V_squirrelmail}/squirrelmail-webmail-%{V_squirrelmail}.tar.bz2 michael@157: Source1: http://switch.dl.sourceforge.net/squirrelmail/all_locales-%{V_locale}.tar.bz2 michael@157: Source2: http://www.squirrelmail.org/plugins/compatibility-%{V_plugin_compat}.tar.gz michael@159: Source3: http://www.squirrelmail.org/plugins/squirrel_logger-%{V_plugin_logger}.tar.gz michael@157: Source4: http://www.squirrelmail.org/plugins/addgraphics-%{V_plugin_addgraphics}.tar.gz michael@157: Source5: http://www.squirrelmail.org/plugins/avelsieve-%{V_plugin_avelsieve}.tar.gz michael@537: Source6: http://www.squirrelmail.org/plugins/change_ldappass-%{V_plugin_ldappwd}.tar.gz michael@537: Source7: http://www.squirrelmail.org/plugins/chg_sasl_passwd-%{V_plugin_saslpwd}.tar.gz michael@159: Source8: http://www.squirrelmail.org/plugins/check_quota-%{V_plugin_checkquota}.tar.gz michael@159: Source9: http://www.squirrelmail.org/plugins/folder_sizes-%{V_plugin_foldersize}.tar.gz michael@159: Source10: http://www.squirrelmail.org/plugins/gpg-%{V_plugin_gnupg}.tar.gz michael@159: Source11: http://www.squirrelmail.org/plugins/ldifimport-%{V_plugin_ldif}.tar.gz michael@159: Source12: http://www.squirrelmail.org/plugins/pupdate.%{V_plugin_update}.tar.gz michael@159: Source13: http://www.squirrelmail.org/plugins/show_user_and_ip-%{V_plugin_userip}.tar.gz michael@159: Source14: http://www.squirrelmail.org/plugins/smallcal-%{V_plugin_smallcal}.tar.gz michael@159: Source15: http://www.squirrelmail.org/plugins/vkeyboard-%{V_plugin_vkeyboard}.tar.gz michael@159: Source16: http://www.squirrelmail.org/plugins/username-%{V_plugin_username}.tar.gz michael@159: Source17: http://www.squirrelmail.org/plugins/login_notes-%{V_plugin_loginnotes}.tar.gz michael@159: Source18: http://www.squirrelmail.org/plugins/password_forget-%{V_plugin_passforget}.tar.gz michael@159: Source19: http://www.squirrelmail.org/plugins/captcha-%{V_plugin_captcha}.tar.gz michael@159: Source20: http://www.squirrelmail.org/plugins/smime-%{V_plugin_smime}.tar.gz michael@159: Source21: http://www.squirrelmail.org/plugins/debugger-%{V_plugin_debug}.tar.gz michael@159: Source22: config.php michael@159: Source23: defprefs.txt michael@159: Source24: opkg_large.png michael@159: Source25: opkg_small.png michael@159: Source26: rc.squirrelmail michael@159: Source27: squirrelmail.conf michael@159: Source29: index.php michael@157: Patch0: squirrelmail.patch michael@157: Patch1: squirrelmail.patch.plugins michael@157: michael@157: # build information michael@537: BuildPreReq: OpenPKG, openpkg >= 20100101 michael@537: PreReq: OpenPKG, openpkg >= 20100101 michael@722: PreReq: MTA, apache, apache-php michael@722: PreReq: apache-php::with_xml = yes michael@722: PreReq: apache-php::with_ldap = yes michael@157: michael@157: %description michael@159: SquirrelMail is a standards based webmail package written in PHP. It michael@159: includes built in pure PHP support for the IMAP and SMTP protocols, michael@157: and all pages render in pure HTML 4.0 (with no Javascript) for michael@157: maximum compatibility across browsers. It has very few requirements michael@157: and is very easy to configure and install. SquirrelMail has all the michael@157: functionality you would want from an email client, including strong michael@157: MIME support, address books, and folder manipulation. michael@157: michael@157: %track michael@157: prog squirrelmail = { michael@157: version = %{V_squirrelmail} michael@157: url = http://prdownloads.sourceforge.net/squirrelmail/ michael@157: regex = squirrelmail-(\d+\.[02468]\.\d+[a-z]?)\.tar\.bz2 michael@157: } michael@157: prog squirrelmail:locales = { michael@157: version = %{V_locale} michael@157: url = http://prdownloads.sourceforge.net/squirrelmail/ michael@157: regex = all_locales-(\d+\.[02468]\.\d+-\d+)\.tar\.bz2 michael@157: } michael@157: prog squirrelmail:compat = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_compat} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = compatibility-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:logger = { michael@157: version = %{V_plugin_logger} michael@157: url = http://www.squeaksoft.com/products/SquirrelLogger/ michael@157: regex = squirrel_logger.(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:addgraphics = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_addgraphics} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = addgraphics-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:avelsieve = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_avelsieve} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = avelsieve-(\d+\.\d+\.\d+)\.tar\.gz michael@157: } michael@157: prog squirrelmail:saslpwd = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_saslpwd} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = chg_sasl_passwd-(\d+\.\d+\.\d+-\d+\.\d+)\.tar\.gz michael@157: } michael@159: prog squirrelmail:ldappwd = { michael@159: comment = "cs: untrackable due to CMS generated URLs" michael@159: disabled michael@159: version = %{V_plugin_ldappwd} michael@159: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@159: regex = change_ldappass-(\d+\.\d+-\d+\.\d+\.\d+)\.tar\.gz michael@159: } michael@157: prog squirrelmail:checkquota = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_checkquota} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = check_quota-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:foldersize = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_foldersize} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = folder_sizes-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:gnupg = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_gnupg} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@159: regex = gpg-(\d+\.\d+)\.tar\.gz michael@157: } michael@157: prog squirrelmail:ldif = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_ldif} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = ldifimport-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:update = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_update} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = pupdate.(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:userip = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_userip} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = show_user_and_ip-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:smallcal = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_smallcal} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = smallcal-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:vkeyboard = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_vkeyboard} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = vkeyboard-(__VER__)\.tar\.gz michael@157: } michael@157: prog squirrelmail:username = { michael@157: comment = "cs: untrackable due to CMS generated URLs" michael@157: disabled michael@157: version = %{V_plugin_username} michael@157: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@157: regex = username-(__VER__)\.tar\.gz michael@157: } michael@159: prog squirrelmail:loginnotes = { michael@159: comment = "cs: untrackable due to CMS generated URLs" michael@159: disabled michael@159: version = %{V_plugin_loginnotes} michael@159: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@159: regex = login_notes--(__VER__)\.tar\.gz michael@159: } michael@159: prog squirrelmail:passforget = { michael@159: comment = "cs: untrackable due to CMS generated URLs" michael@159: disabled michael@159: version = %{V_plugin_passforget} michael@159: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@159: regex = password_forget-(__VER__)\.tar\.gz michael@159: } michael@159: prog squirrelmail:captcha = { michael@159: comment = "cs: untrackable due to CMS generated URLs" michael@159: disabled michael@159: version = %{V_plugin_captcha} michael@159: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@159: regex = captcha-(__VER__)\.tar\.gz michael@159: } michael@159: prog squirrelmail:smime = { michael@159: comment = "cs: untrackable due to CMS generated URLs" michael@159: disabled michael@159: version = %{V_plugin_smime} michael@159: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@159: regex = smime-(__VER__)\.tar\.gz michael@159: } michael@159: prog squirrelmail:debugger = { michael@159: comment = "cs: untrackable due to CMS generated URLs" michael@159: disabled michael@159: version = %{V_plugin_debug} michael@159: url = http://www.squirrelmail.org/plugins_category.php?category_id=all michael@159: regex = debugger-(__VER__)\.tar\.gz michael@159: } michael@157: michael@157: %prep michael@537: %setup -q -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 1 -c -n squirrelmail-webmail-%{V_squirrelmail}/all_locales-%{V_locale} michael@537: %setup -q -D -T -a 2 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 3 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: mv compatibility squirrel_logger plugins/ michael@157: %if "%{with_plugins}" == "yes" michael@537: %setup -q -D -T -a 4 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 5 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 6 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 7 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 8 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 9 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 10 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 11 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 12 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 13 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 14 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 15 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 16 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 17 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 18 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 19 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 20 -n squirrelmail-webmail-%{V_squirrelmail} michael@537: %setup -q -D -T -a 21 -n squirrelmail-webmail-%{V_squirrelmail} michael@157: michael@157: # move additional plugins where other are already placed michael@157: for plug in addgraphics avelsieve check_quota chg_sasl_passwd \ michael@159: change_ldappass folder_sizes gpg ldifimport pupdate \ michael@159: show_user_and_ip smallcal vkeyboard username \ michael@159: login_notes password_forget captcha smime debugger; do michael@537: mv $plug plugins/ michael@157: done michael@157: %endif michael@157: michael@157: # clean up login screen of distractions michael@537: %patch -p0 michael@157: michael@157: # rearrange documentation and remove archive script michael@537: mv themes/README.themes locale/README.locales doc/ michael@537: for fil in `find plugins/ -name "README*" -o -name "Readme*" \ michael@537: -o -name "INSTALL*" -o -name CHANGES -o -name HISTORY`; do michael@537: %{l_shtool} mkdir -f -p -m 755 doc/`dirname $fil` michael@537: mv -f $fil $_ michael@537: done michael@537: rm -rf doc/plugins/squirrelspell/doc doc/plugins/squirrelspell/index.php michael@537: mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell michael@537: rm -rf plugins/squirrelspell/doc michael@157: %if "%{with_plugins}" == "yes" michael@537: mv plugins/pupdate/docs/* doc/plugins/pupdate michael@537: rm -rf plugins/pupdate/docs michael@157: %endif michael@157: michael@537: # postadjustment cosmetics michael@537: %{l_shtool} subst \ michael@537: -e 's;\(\$color\[4\], .border="0" width=\)"350";\1"250";1' \ michael@537: src/login.php michael@157: michael@537: # set default prefs michael@537: cat %{SOURCE defprefs.txt} >>data/default_pref michael@157: michael@157: %build michael@157: michael@157: %install michael@157: # create directory structure michael@157: %{l_shtool} mkdir -f -p -m 755 \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/bin \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/var/squirrelmail/spool/attach \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/var/squirrelmail/log michael@157: michael@157: # install locales michael@157: ( cd all_locales-%{V_locale} michael@157: cp -rpf help images locale $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/ michael@157: ) || exit $? michael@157: michael@157: # install program michael@537: # install default_pref michael@537: %{l_shtool} install -c -m 644 \ michael@537: data/default_pref \ michael@537: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs/ michael@157: michael@537: # create initial administrator list michael@537: echo %{l_musr} >>$RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/admins michael@157: michael@537: # copy over most functional directories, a lot of stuff michael@537: for dir in class doc functions include plugins src themes; do michael@537: cp -rpf $dir $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/ michael@537: done michael@537: cp -rpf images/* $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/ michael@537: cp -pf locale/timezones.cfg $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/locale/ michael@157: michael@537: # install main config files michael@537: l_fqdm=`%{l_shtool} echo -e %h%d` michael@537: %{l_shtool} install -c -m 644 %{l_value -s -a} \ michael@537: -e 's;config/\(config_local.php\);\1;g' \ michael@537: -e "s;@l_fqdm@;${l_fqdm};g" \ michael@537: %{SOURCE config.php} \ michael@537: config/config_default.php \ michael@537: config/config_local.php \ michael@537: $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/ michael@157: %if "%{with_plugins}" == "yes" michael@537: ( cd $RPM_BUILD_ROOT%{l_prefix} michael@537: %{l_patch} -p0 <%{PATCH squirrelmail.patch.plugins} michael@537: rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/functions/*.orig michael@537: rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/src/*.orig michael@537: ) || exit $? michael@157: %endif michael@157: michael@537: # install plugin config files michael@537: ( cd $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins michael@157: %if "%{with_plugins}" == "yes" michael@537: cp -pf check_quota/config.sample.php check_quota/config.php michael@537: cp -pf chg_sasl_passwd/config.php.sample chg_sasl_passwd/config.php michael@537: cp -pf show_user_and_ip/config.php.sample show_user_and_ip/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: -e "s;sm_logo\.png;opkg_small.png;" \ michael@537: -e "s;SquirrelMail Logo;OpenPKG Logo;" \ michael@537: -e "s;www\.squirrelmail\.org;www.openpkg.org;" \ michael@537: -e "s;\/\/\(\$image_width.*\) = 308;\1 = 201;" \ michael@537: -e "s;\/\/\(\$image_height.*\) = 111;\1 = 62;" \ michael@537: addgraphics/config.php.typical.one.domain \ michael@537: addgraphics/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: -e 's/^\(\$sieve_preferred_sasl_mech =\).*/\1 "PLAIN LOGIN CRAM-MD5 DIGEST-MD5";/' \ michael@537: -e 's/^\(\$avelsieve_oldcyrus =\).*/\1 false;/' \ michael@537: -e 's/^\(\$startitems =\).*/\1 4;/' \ michael@537: avelsieve/config/config_sample.php \ michael@537: avelsieve/config/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: change_ldappass/config_sample.php \ michael@537: change_ldappass/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: login_notes/config.sample.php \ michael@537: login_notes/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: password_forget/config_example.php \ michael@537: password_forget/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: -e 's;^//\( *.CAPTCHA.,\);\1;g' \ michael@537: -e 's,\(\$sl_dateformat *=\).*\(.\);$,\1 \2d.m.Y H:i:s\2;,g' \ michael@537: -e 's,\(\$sl_logfile *=\).*\(.\);$,\1 \2%{l_prefix}/var/squirrelmail/log/squirrelmail.log\2;,g' \ michael@537: squirrel_logger/config_example.php \ michael@537: squirrel_logger/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: -e 's/\(\$log_CAPTCHA_events *=\).*/\1 1;/' \ michael@537: -e 's,\(\$captcha_backend *=\).*\(.\);$,\1 \2recaptcha\2;,' \ michael@537: captcha/config_example.php \ michael@537: captcha/config.php michael@537: for captname in \ michael@537: b2evo captcha_php csi freecap hec hn_captcha opencaptcha \ michael@537: phpcaptcha quickcaptcha quickform recaptcha textcaptcha michael@537: do michael@537: mv \ michael@537: captcha/backends/${captname}/${captname}_config_example.php \ michael@537: captcha/backends/${captname}/${captname}_config.php michael@537: done michael@537: %{l_shtool} install -c -m 644 \ michael@537: smime/config_example.php \ michael@537: smime/config.php michael@537: %{l_shtool} subst \ michael@537: -e 's;\(path_to_gpg=\)/usr/bin/gpg.*;\1%{l_prefix}/bin/gpg;' \ michael@537: gpg/gpg_local_prefs.txt michael@537: %{l_shtool} install -c -m 644 \ michael@537: -e 's;\(adminusername = "\)[^"]*;\1%{l_musr};' \ michael@537: -e 's;corehide = 1;corehide = 0;' \ michael@537: pupdate/config.php.sample \ michael@537: pupdate/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: -e "s;\(\$vkeyboard_msgsize.*\)'medium';\1'x-small';" \ michael@537: -e "s;\(\$vkeyboard_layout.*\)'us_english';\1'portuguese_abnt2';" \ michael@537: -e "s;\(\$vkeyboard_height.*\)'250';\1'270';" \ michael@537: vkeyboard/config.php.sample \ michael@537: vkeyboard/config.php michael@537: cp -pf username/config.php.sample username/config.php michael@537: %{l_shtool} install -c -m 644 \ michael@537: %{SOURCE opkg_small.png} \ michael@537: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/ michael@157: %endif michael@537: ) || exit $? michael@157: michael@537: # install squirrelmail configuration perl script michael@537: %{l_shtool} install -c -m 755 \ michael@537: -e 's;chdir($dir);chdir("%{l_prefix}/etc/squirrelmail");g' \ michael@537: -e 's;\.\./plugins;%{l_prefix}/share/squirrelmail/plugins;g' \ michael@537: -e 's;\.\./themes;%{l_prefix}/share/squirrelmail/themes;g' \ michael@537: -e 's;config/config_local.php;config_local.php;g' \ michael@537: config/conf.pl \ michael@537: $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf michael@157: michael@537: # use our own logo, a squirrel next to a OpenPKG package michael@537: %{l_shtool} install -c -m 644 \ michael@537: %{SOURCE opkg_large.png} \ michael@537: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/ michael@157: michael@157: # install runcommand script michael@157: %{l_shtool} mkdir -f -p -m 755 \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d michael@157: %{l_shtool} install -c -m 755 %{l_value -s -a} \ michael@157: %{SOURCE rc.squirrelmail} \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ michael@157: michael@159: # correct path to optional perl interpreter michael@159: %{l_shtool} subst \ michael@159: -e 's;#!/usr/bin/env perl;#! %{l_prefix}/bin/perl;' \ michael@159: $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf michael@159: michael@157: # replace false /etc config paths throughout michael@157: %{l_shtool} subst \ michael@157: -e 's;SM_PATH \. \(.\)config/;\1%{l_prefix}/etc/squirrelmail/;g' \ michael@157: -e 's;require_once(SM_PATH \. \(.*\)%{l_prefix};require_once(\1%{l_prefix};g' \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/functions/*.php \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/include/*.php \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/administrator/*.php \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/calendar/*.php \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/src/*.php michael@157: michael@157: # integration into Apache under /webmail michael@157: %{l_shtool} mkdir -f -p -m 755 \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d michael@157: %{l_shtool} install -c -m 644 %{l_value -s -a} \ michael@157: %{SOURCE squirrelmail.conf} \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/ michael@157: %{l_shtool} install -c -m 644 %{l_value -s -a} \ michael@157: %{SOURCE index.php} \ michael@157: $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/ michael@157: michael@157: # determine package ingredients and tag config files michael@157: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@157: %{l_files_std} \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/etc/squirrelmail/*' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/prefs/*' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/squirrelspell/sqspell_config.php' \ michael@157: %if "%{with_plugins}" == "yes" michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/addgraphics/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/avelsieve/config/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/check_quota/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/chg_sasl_passwd/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/change_ldappass/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/folder_sizes/folder_sizes.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/gpg/gpg_local_prefs.txt' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/ldifimport/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/pupdate/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/show_user_and_ip/config.php' \ michael@165: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/squirrel_logger/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/vkeyboard/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/username/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/login_notes/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/password_forget/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/b2evo/b2evo_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/captcha_php/captcha_php_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/csi/csi_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/freecap/freecap_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/hec/hec_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/hn_captcha/hn_captcha_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/opencaptcha/opencaptcha_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/phpcaptcha/phpcaptcha_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/quickcaptcha/quickcaptcha_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/quickform/quickform_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/recaptcha/recaptcha_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/textcaptcha/textcaptcha_config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/smime/config.php' \ michael@159: '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/debugger/setup.php' \ michael@157: %endif michael@157: '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/share/squirrelmail/prefs' \ michael@157: '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/squirrelmail/spool/attach' \ michael@157: '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/squirrelmail/log' michael@157: michael@157: %files -f files michael@157: michael@157: %clean michael@157: michael@157: %preun michael@157: # before erase, remove log files michael@157: [ $1 -eq 0 ] || exit 0 michael@157: rm -f $RPM_INSTALL_PREFIX/var/squirrelmail/log/*.log >/dev/null 2>&1 || true michael@157: