squirrelmail/squirrelmail.spec

Sun, 20 Mar 2011 19:04:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 20 Mar 2011 19:04:35 +0100
changeset 308
50be4b455aec
parent 165
cff8cdb0b6c4
child 350
32d6f7a543a9
permissions
-rw-r--r--

Update download URL to current location.

     1 ##
     2 ##  squirrelmail.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package version
    25 %define       V_squirrelmail        1.4.17
    26 %define       V_locale              1.4.13-20071220
    27 %define       V_plugin_compat       2.0.14-1.0
    28 %define       V_plugin_logger       2.3-1.2.7
    29 %define       V_plugin_addgraphics  2.3-1.0.3
    30 %define       V_plugin_avelsieve    1.9.4
    31 %define       V_plugin_saslpwd      1.4.1-1.4
    32 %define       V_plugin_ldappwd      2.2-1.4.0
    33 %define       V_plugin_checkquota   2.2-1.4.0
    34 %define       V_plugin_foldersize   1.5-1.4.0
    35 %define       V_plugin_gnupg        2.1
    36 %define       V_plugin_ldif         1.4-1.2.x
    37 %define       V_plugin_update       0.7-1.4.2
    38 %define       V_plugin_userip       3.3-re-1.2.2
    39 %define       V_plugin_smallcal     0.8-1.2.3
    40 %define       V_plugin_vkeyboard    0.9.1
    41 %define       V_plugin_username     2.3-1.0.0
    42 %define       V_plugin_loginnotes   1.2-1.4.0
    43 %define       V_plugin_passforget   2.2-1.0.1
    44 %define       V_plugin_captcha      1.2-1.2.9
    45 %define       V_plugin_smime        0.7-1.1.1
    46 %define       V_plugin_debug        1.2-1.4
    48 #   package information
    49 Name:         squirrelmail
    50 Summary:      SquirrelMail Webmail Client
    51 URL:          http://www.squirrelmail.org/
    52 Vendor:       Squirrelmail Developers
    53 Packager:     OpenPKG Foundation e.V.
    54 Distribution: OpenPKG Community
    55 Class:        EVAL
    56 Group:        Mail
    57 License:      GPL
    58 Version:      %{V_squirrelmail}
    59 Release:      20090418
    61 #   package options
    62 %option       with_plugins  no
    63 %option       with_kolab    no
    65 #   list of sources
    66 Source0:      http://switch.dl.sourceforge.net/squirrelmail/squirrelmail-%{V_squirrelmail}.tar.bz2
    67 Source1:      http://switch.dl.sourceforge.net/squirrelmail/all_locales-%{V_locale}.tar.bz2
    68 Source2:      http://www.squirrelmail.org/plugins/compatibility-%{V_plugin_compat}.tar.gz
    69 Source3:      http://www.squirrelmail.org/plugins/squirrel_logger-%{V_plugin_logger}.tar.gz   
    70 Source4:      http://www.squirrelmail.org/plugins/addgraphics-%{V_plugin_addgraphics}.tar.gz
    71 Source5:      http://www.squirrelmail.org/plugins/avelsieve-%{V_plugin_avelsieve}.tar.gz
    72 Source6:      http://www.squirrelmail.org/plugins/chg_sasl_passwd-%{V_plugin_saslpwd}.tar.gz
    73 Source7:      http://www.squirrelmail.org/plugins/change_ldappass-%{V_plugin_ldappwd}.tar.gz
    74 Source8:      http://www.squirrelmail.org/plugins/check_quota-%{V_plugin_checkquota}.tar.gz
    75 Source9:      http://www.squirrelmail.org/plugins/folder_sizes-%{V_plugin_foldersize}.tar.gz
    76 Source10:     http://www.squirrelmail.org/plugins/gpg-%{V_plugin_gnupg}.tar.gz
    77 Source11:     http://www.squirrelmail.org/plugins/ldifimport-%{V_plugin_ldif}.tar.gz
    78 Source12:     http://www.squirrelmail.org/plugins/pupdate.%{V_plugin_update}.tar.gz
    79 Source13:     http://www.squirrelmail.org/plugins/show_user_and_ip-%{V_plugin_userip}.tar.gz
    80 Source14:     http://www.squirrelmail.org/plugins/smallcal-%{V_plugin_smallcal}.tar.gz
    81 Source15:     http://www.squirrelmail.org/plugins/vkeyboard-%{V_plugin_vkeyboard}.tar.gz
    82 Source16:     http://www.squirrelmail.org/plugins/username-%{V_plugin_username}.tar.gz
    83 Source17:     http://www.squirrelmail.org/plugins/login_notes-%{V_plugin_loginnotes}.tar.gz
    84 Source18:     http://www.squirrelmail.org/plugins/password_forget-%{V_plugin_passforget}.tar.gz
    85 Source19:     http://www.squirrelmail.org/plugins/captcha-%{V_plugin_captcha}.tar.gz
    86 Source20:     http://www.squirrelmail.org/plugins/smime-%{V_plugin_smime}.tar.gz
    87 Source21:     http://www.squirrelmail.org/plugins/debugger-%{V_plugin_debug}.tar.gz
    88 Source22:     config.php
    89 Source23:     defprefs.txt
    90 Source24:     opkg_large.png
    91 Source25:     opkg_small.png
    92 Source26:     rc.squirrelmail
    93 Source27:     squirrelmail.conf
    94 Source28:     config_local_kolab.php
    95 Source29:     index.php
    96 Patch0:       squirrelmail.patch
    97 Patch1:       squirrelmail.patch.plugins
    99 #   build information
   100 Prefix:       %{l_prefix}
   101 BuildRoot:    %{l_buildroot}
   102 BuildPreReq:  OpenPKG, openpkg >= 20060823
   103 PreReq:       OpenPKG, openpkg >= 20060823
   104 PreReq:       MTA, apache, apache-php, apache-php::with_xml = yes
   105 AutoReq:      no
   106 AutoReqProv:  no
   108 %description
   109     SquirrelMail is a standards based webmail package written in PHP. It
   110     includes built in pure PHP support for the IMAP and SMTP protocols,
   111     and all pages render in pure HTML 4.0 (with no Javascript) for
   112     maximum compatibility across browsers. It has very few requirements
   113     and is very easy to configure and install. SquirrelMail has all the
   114     functionality you would want from an email client, including strong
   115     MIME support, address books, and folder manipulation.
   117 %track
   118     prog squirrelmail = {
   119         version   = %{V_squirrelmail}
   120         url       = http://prdownloads.sourceforge.net/squirrelmail/
   121         regex     = squirrelmail-(\d+\.[02468]\.\d+[a-z]?)\.tar\.bz2
   122     }
   123     prog squirrelmail:locales = {
   124         version   = %{V_locale}
   125         url       = http://prdownloads.sourceforge.net/squirrelmail/
   126         regex     = all_locales-(\d+\.[02468]\.\d+-\d+)\.tar\.bz2
   127     }
   128     prog squirrelmail:compat = {
   129         comment   = "cs: untrackable due to CMS generated URLs"
   130         disabled
   131         version   = %{V_plugin_compat}
   132         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   133         regex     = compatibility-(__VER__)\.tar\.gz
   134     }
   135     prog squirrelmail:logger = {
   136         version   = %{V_plugin_logger}
   137         url       = http://www.squeaksoft.com/products/SquirrelLogger/
   138         regex     = squirrel_logger.(__VER__)\.tar\.gz
   139     }
   140     prog squirrelmail:addgraphics = {
   141         comment   = "cs: untrackable due to CMS generated URLs"
   142         disabled
   143         version   = %{V_plugin_addgraphics}
   144         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   145         regex     = addgraphics-(__VER__)\.tar\.gz
   146     }
   147     prog squirrelmail:avelsieve = {
   148         comment   = "cs: untrackable due to CMS generated URLs"
   149         disabled
   150         version   = %{V_plugin_avelsieve}
   151         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   152         regex     = avelsieve-(\d+\.\d+\.\d+)\.tar\.gz
   153     }
   154     prog squirrelmail:saslpwd = {
   155         comment   = "cs: untrackable due to CMS generated URLs"
   156         disabled
   157         version   = %{V_plugin_saslpwd}
   158         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   159         regex     = chg_sasl_passwd-(\d+\.\d+\.\d+-\d+\.\d+)\.tar\.gz
   160     }
   161     prog squirrelmail:ldappwd = {
   162         comment   = "cs: untrackable due to CMS generated URLs"
   163         disabled
   164         version   = %{V_plugin_ldappwd}
   165         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   166         regex     = change_ldappass-(\d+\.\d+-\d+\.\d+\.\d+)\.tar\.gz
   167     }
   168     prog squirrelmail:checkquota = {
   169         comment   = "cs: untrackable due to CMS generated URLs"
   170         disabled
   171         version   = %{V_plugin_checkquota}
   172         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   173         regex     = check_quota-(__VER__)\.tar\.gz
   174     }
   175     prog squirrelmail:foldersize = {
   176         comment   = "cs: untrackable due to CMS generated URLs"
   177         disabled
   178         version   = %{V_plugin_foldersize}
   179         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   180         regex     = folder_sizes-(__VER__)\.tar\.gz
   181     }
   182     prog squirrelmail:gnupg = {
   183         comment   = "cs: untrackable due to CMS generated URLs"
   184         disabled
   185         version   = %{V_plugin_gnupg}
   186         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   187         regex     = gpg-(\d+\.\d+)\.tar\.gz
   188     }
   189     prog squirrelmail:ldif = {
   190         comment   = "cs: untrackable due to CMS generated URLs"
   191         disabled
   192         version   = %{V_plugin_ldif}
   193         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   194         regex     = ldifimport-(__VER__)\.tar\.gz
   195     }
   196     prog squirrelmail:update = {
   197         comment   = "cs: untrackable due to CMS generated URLs"
   198         disabled
   199         version   = %{V_plugin_update}
   200         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   201         regex     = pupdate.(__VER__)\.tar\.gz
   202     }
   203     prog squirrelmail:userip = {
   204         comment   = "cs: untrackable due to CMS generated URLs"
   205         disabled
   206         version   = %{V_plugin_userip}
   207         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   208         regex     = show_user_and_ip-(__VER__)\.tar\.gz
   209     }
   210     prog squirrelmail:smallcal = {
   211         comment   = "cs: untrackable due to CMS generated URLs"
   212         disabled
   213         version   = %{V_plugin_smallcal}
   214         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   215         regex     = smallcal-(__VER__)\.tar\.gz
   216     }
   217     prog squirrelmail:vkeyboard = {
   218         comment   = "cs: untrackable due to CMS generated URLs"
   219         disabled
   220         version   = %{V_plugin_vkeyboard}
   221         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   222         regex     = vkeyboard-(__VER__)\.tar\.gz
   223     }
   224     prog squirrelmail:username = {
   225         comment   = "cs: untrackable due to CMS generated URLs"
   226         disabled
   227         version   = %{V_plugin_username}
   228         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   229         regex     = username-(__VER__)\.tar\.gz
   230     }
   231     prog squirrelmail:loginnotes = {
   232         comment   = "cs: untrackable due to CMS generated URLs"
   233         disabled
   234         version   = %{V_plugin_loginnotes}
   235         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   236         regex     = login_notes--(__VER__)\.tar\.gz
   237     }
   238     prog squirrelmail:passforget = {
   239         comment   = "cs: untrackable due to CMS generated URLs"
   240         disabled
   241         version   = %{V_plugin_passforget}
   242         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   243         regex     = password_forget-(__VER__)\.tar\.gz
   244     }
   245     prog squirrelmail:captcha = {
   246         comment   = "cs: untrackable due to CMS generated URLs"
   247         disabled
   248         version   = %{V_plugin_captcha}
   249         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   250         regex     = captcha-(__VER__)\.tar\.gz
   251     }
   252     prog squirrelmail:smime = {
   253         comment   = "cs: untrackable due to CMS generated URLs"
   254         disabled
   255         version   = %{V_plugin_smime}
   256         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   257         regex     = smime-(__VER__)\.tar\.gz
   258     }
   259     prog squirrelmail:debugger = {
   260         comment   = "cs: untrackable due to CMS generated URLs"
   261         disabled
   262         version   = %{V_plugin_debug}
   263         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   264         regex     = debugger-(__VER__)\.tar\.gz
   265     }
   267 %prep
   268     %setup -q -c -n squirrelmail
   269     %setup -q -D -T -a 1 -c -n squirrelmail/all_locales-%{V_locale}
   270     %setup -q -D -T -a 2 -n squirrelmail
   271     %setup -q -D -T -a 3 -n squirrelmail
   272     mv compatibility squirrelmail-%{V_squirrelmail}/plugins
   273     mv squirrel_logger squirrelmail-%{V_squirrelmail}/plugins
   274 %if "%{with_plugins}" == "yes"
   275     %setup -q -D -T -a 4 -n squirrelmail
   276     %setup -q -D -T -a 5 -n squirrelmail
   277     %setup -q -D -T -a 6 -n squirrelmail
   278     %setup -q -D -T -a 7 -n squirrelmail
   279     %setup -q -D -T -a 8 -n squirrelmail
   280     %setup -q -D -T -a 9 -n squirrelmail
   281     %setup -q -D -T -a 10 -n squirrelmail
   282     %setup -q -D -T -a 11 -n squirrelmail
   283     %setup -q -D -T -a 12 -n squirrelmail
   284     %setup -q -D -T -a 13 -n squirrelmail
   285     %setup -q -D -T -a 14 -n squirrelmail
   286     %setup -q -D -T -a 15 -n squirrelmail
   287     %setup -q -D -T -a 16 -n squirrelmail
   288     %setup -q -D -T -a 17 -n squirrelmail
   289     %setup -q -D -T -a 18 -n squirrelmail
   290     %setup -q -D -T -a 19 -n squirrelmail
   291     %setup -q -D -T -a 20 -n squirrelmail
   292     %setup -q -D -T -a 21 -n squirrelmail
   294     #   move additional plugins where other are already placed
   295     for plug in addgraphics avelsieve check_quota chg_sasl_passwd \
   296                 change_ldappass folder_sizes gpg ldifimport pupdate \
   297                 show_user_and_ip smallcal vkeyboard username \
   298                 login_notes password_forget captcha smime debugger; do
   299         mv $plug squirrelmail-%{V_squirrelmail}/plugins
   300     done
   301 %endif
   303     #   clean up login screen of distractions
   304     ( cd squirrelmail-%{V_squirrelmail}
   305       %patch -p0
   306     ) || exit $?
   308     #   rearrange documentation and remove archive script
   309     ( cd squirrelmail-%{V_squirrelmail}
   310       mv AUTHORS ChangeLog COPYING INSTALL README UPGRADE doc/
   311       mv ReleaseNotes doc/ReleaseNotes.txt
   312       mv themes/README.themes doc/
   313       for fil in `find plugins/ -name "README*" -o -name "Readme*" \
   314                  -o -name "INSTALL*" -o -name CHANGES -o -name HISTORY`; do
   315           %{l_shtool} mkdir -f -p -m 755 doc/`dirname $fil`
   316           mv -f $fil $_
   317       done
   318       mv doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell
   319       rm -rf doc/plugins/squirrelspell/doc doc/plugins/squirrelspell/index.php
   320       mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell
   321       rm -rf plugins/squirrelspell/doc
   322       rm -f plugins/make_archive.pl
   323 %if "%{with_plugins}" == "yes"
   324       mv plugins/pupdate/docs/* doc/plugins/pupdate
   325       rm -rf plugins/pupdate/docs
   326 %endif
   328       #   postadjustment cosmetics
   329       %{l_shtool} subst \
   330           -e 's;\(\$color\[4\], .border="0" width=\)"350";\1"250";1' \
   331           src/login.php
   333       #   set default prefs
   334       cat %{SOURCE defprefs.txt} >>data/default_pref
   335     ) || exit $?
   337 %build
   339 %install
   340     rm -rf $RPM_BUILD_ROOT
   342     #   create directory structure
   343     %{l_shtool} mkdir -f -p -m 755 \
   344         $RPM_BUILD_ROOT%{l_prefix}/bin \
   345         $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail \
   346         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs \
   347         $RPM_BUILD_ROOT%{l_prefix}/var/squirrelmail/spool/attach \
   348         $RPM_BUILD_ROOT%{l_prefix}/var/squirrelmail/log
   350     #   install locales
   351     ( cd all_locales-%{V_locale}
   352       cp -rpf help images locale $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
   353     ) || exit $?
   355     #   install program
   356     ( cd squirrelmail-%{V_squirrelmail}
   358       #   install default_pref
   359       %{l_shtool} install -c -m 644 \
   360           data/default_pref \
   361           $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs/
   363       #   create initial administrator list
   364       echo %{l_musr} >>$RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/admins
   366       #   copy over most functional directories, a lot of stuff
   367       for dir in class doc functions include plugins src themes; do
   368           cp -rpf $dir $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
   369       done
   370       cp -rpf images/* $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
   371       cp -pf locale/timezones.cfg $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/locale/
   373       #   install main config files
   374       l_fqdm=`%{l_shtool} echo -e %h%d`
   375       %{l_shtool} install -c -m 644 %{l_value -s -a} \
   376           -e 's;config/\(config_local.php\);\1;g' \
   377           -e "s;@l_fqdm@;${l_fqdm};g" \
   378           %{SOURCE config.php} \
   379           config/config_default.php \
   380           config/config_local.php \
   381           $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/
   382 %if "%{with_plugins}" == "yes"
   383       ( cd $RPM_BUILD_ROOT%{l_prefix}
   384         %{l_patch} -p0 <%{PATCH squirrelmail.patch.plugins}
   385         rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/*.orig
   386         rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/gpg/*.orig
   387         rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/chg_sasl_passwd/*.orig
   388       ) || exit $?
   389 %endif
   391       #   install plugin config files
   392       ( cd $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins
   393 %if "%{with_plugins}" == "yes"
   394         cp -pf check_quota/config.sample.php check_quota/config.php
   395         cp -pf chg_sasl_passwd/config.php.sample chg_sasl_passwd/config.php
   396         cp -pf show_user_and_ip/config.php.sample show_user_and_ip/config.php
   397         %{l_shtool} install -c -m 644 \
   398             -e "s;sm_logo\.png;opkg_small.png;" \
   399             -e "s;SquirrelMail Logo;OpenPKG Logo;" \
   400             -e "s;www\.squirrelmail\.org;www.openpkg.org;" \
   401             -e "s;\/\/\(\$image_width.*\) = 308;\1 = 201;" \
   402             -e "s;\/\/\(\$image_height.*\) = 111;\1 = 62;" \
   403             addgraphics/config.php.typical.one.domain \
   404             addgraphics/config.php
   405         %{l_shtool} install -c -m 644 \
   406             -e 's/^\(\$sieve_preferred_sasl_mech =\).*/\1 "PLAIN LOGIN CRAM-MD5 DIGEST-MD5";/' \
   407             -e 's/^\(\$avelsieve_oldcyrus =\).*/\1 false;/' \
   408             -e 's/^\(\$startitems =\).*/\1 4;/' \
   409             avelsieve/config/config_sample.php \
   410             avelsieve/config/config.php
   411         %{l_shtool} install -c -m 644 \
   412             change_ldappass/config_sample.php \
   413             change_ldappass/config.php
   414         %{l_shtool} install -c -m 644 \
   415             login_notes/config.sample.php \
   416             login_notes/config.php
   417         %{l_shtool} install -c -m 644 \
   418             password_forget/config_example.php \
   419             password_forget/config.php
   420         %{l_shtool} install -c -m 644 \
   421             -e 's;^//\( *.CAPTCHA.,\);\1;g' \
   422             -e 's,\(\$sl_dateformat *=\).*\(.\);$,\1 \2d.m.Y H:i:s\2;,g' \
   423             -e 's,\(\$sl_logfile *=\).*\(.\);$,\1 \2%{l_prefix}/var/squirrelmail/log/squirrelmail.log\2;,g' \
   424             squirrel_logger/config_example.php \
   425             squirrel_logger/config.php
   426         %{l_shtool} install -c -m 644 \
   427             -e 's/\(\$log_CAPTCHA_events *=\).*/\1 1;/' \
   428             -e 's,\(\$captcha_backend *=\).*\(.\);$,\1 \2recaptcha\2;,' \
   429             captcha/config_example.php \
   430             captcha/config.php
   431         for captname in \
   432             b2evo captcha_php csi freecap hec hn_captcha opencaptcha \
   433             phpcaptcha quickcaptcha quickform recaptcha textcaptcha
   434             do
   435                 mv \
   436                    captcha/backends/${captname}/${captname}_config_example.php \
   437                    captcha/backends/${captname}/${captname}_config.php
   438         done
   439         %{l_shtool} install -c -m 644 \
   440             smime/config_example.php \
   441             smime/config.php
   442         %{l_shtool} subst \
   443             -e 's;\(path_to_gpg=\)/usr/bin/gpg.*;\1%{l_prefix}/bin/gpg;' \
   444             gpg/gpg_local_prefs.txt
   445         %{l_shtool} install -c -m 644 \
   446             -e 's;\(adminusername = "\)[^"]*;\1%{l_musr};' \
   447             -e 's;corehide = 1;corehide = 0;' \
   448             pupdate/config.php.sample \
   449             pupdate/config.php
   450         %{l_shtool} install -c -m 644 \
   451             -e "s;\(\$vkeyboard_msgsize.*\)'medium';\1'x-small';" \
   452             -e "s;\(\$vkeyboard_layout.*\)'us_english';\1'portuguese_abnt2';" \
   453             -e "s;\(\$vkeyboard_height.*\)'250';\1'270';" \
   454             vkeyboard/config.php.sample \
   455             vkeyboard/config.php
   456         cp -pf username/config.php.sample username/config.php
   457         %{l_shtool} install -c -m 644 \
   458             %{SOURCE opkg_small.png} \
   459             $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
   460 %endif
   461       ) || exit $?
   463       #   install squirrelmail configuration perl script
   464       %{l_shtool} install -c -m 755 \
   465           -e 's;chdir($dir);chdir("%{l_prefix}/etc/squirrelmail");g' \
   466           -e 's;\.\./plugins;%{l_prefix}/share/squirrelmail/plugins;g' \
   467           -e 's;\.\./themes;%{l_prefix}/share/squirrelmail/themes;g' \
   468           -e 's;config/config_local.php;config_local.php;g' \
   469           config/conf.pl \
   470           $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf
   472       #   use our own logo, a squirrel next to a OpenPKG package
   473       %{l_shtool} install -c -m 644 \
   474           %{SOURCE opkg_large.png} \
   475           $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
   476     ) || exit $?
   478     #   install runcommand script
   479     %{l_shtool} mkdir -f -p -m 755 \
   480         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
   481     %{l_shtool} install -c -m 755 %{l_value -s -a} \
   482         %{SOURCE rc.squirrelmail} \
   483         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   485     #   correct path to optional perl interpreter
   486     %{l_shtool} subst \
   487         -e 's;#!/usr/bin/env perl;#! %{l_prefix}/bin/perl;' \
   488         $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf
   490     #   replace false /etc config paths throughout
   491     %{l_shtool} subst \
   492         -e 's;SM_PATH \. \(.\)config/;\1%{l_prefix}/etc/squirrelmail/;g' \
   493         -e 's;require_once(SM_PATH \. \(.*\)%{l_prefix};require_once(\1%{l_prefix};g' \
   494         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/functions/*.php \
   495         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/include/*.php \
   496         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/administrator/*.php \
   497         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/calendar/*.php \
   498         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/src/*.php
   500     #   integration into Apache under /webmail
   501     %{l_shtool} mkdir -f -p -m 755 \
   502         $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
   503     %{l_shtool} install -c -m 644 %{l_value -s -a} \
   504         %{SOURCE squirrelmail.conf} \
   505         $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/
   506     %{l_shtool} install -c -m 644 %{l_value -s -a} \
   507         %{SOURCE index.php} \
   508         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
   510     #   optional KOLAB configuration
   511 %if "%{with_kolab}" == "yes"
   512     %{l_shtool} install -c -m 644 %{l_value -s -a} \
   513         %{SOURCE config_local_kolab.php} \
   514         $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/config_local.php
   515 %endif
   517     #   determine package ingredients and tag config files
   518     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   519         %{l_files_std} \
   520         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/etc/squirrelmail/*' \
   521         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/prefs/*' \
   522         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/squirrelspell/sqspell_config.php' \
   523 %if "%{with_plugins}" == "yes"
   524         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/addgraphics/config.php' \
   525         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/avelsieve/config/config.php' \
   526         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/check_quota/config.php' \
   527         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/chg_sasl_passwd/config.php' \
   528         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/change_ldappass/config.php' \
   529         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/folder_sizes/folder_sizes.php' \
   530         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/gpg/gpg_local_prefs.txt' \
   531         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/ldifimport/config.php' \
   532         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/pupdate/config.php' \
   533         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/show_user_and_ip/config.php' \
   534         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/squirrel_logger/config.php' \
   535         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/vkeyboard/config.php' \
   536         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/username/config.php' \
   537         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/login_notes/config.php' \
   538         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/password_forget/config.php' \
   539         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/config.php' \
   540         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/b2evo/b2evo_config.php' \
   541         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/captcha_php/captcha_php_config.php' \
   542         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/csi/csi_config.php' \
   543         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/freecap/freecap_config.php' \
   544         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/hec/hec_config.php' \
   545         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/hn_captcha/hn_captcha_config.php' \
   546         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/opencaptcha/opencaptcha_config.php' \
   547         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/phpcaptcha/phpcaptcha_config.php' \
   548         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/quickcaptcha/quickcaptcha_config.php' \
   549         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/quickform/quickform_config.php' \
   550         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/recaptcha/recaptcha_config.php' \
   551         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/textcaptcha/textcaptcha_config.php' \
   552         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/smime/config.php' \
   553         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/debugger/setup.php' \
   554 %endif
   555         '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/share/squirrelmail/prefs' \
   556         '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/squirrelmail/spool/attach' \
   557         '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/squirrelmail/log'
   559 %files -f files
   561 %clean
   562     rm -rf $RPM_BUILD_ROOT
   564 %preun
   565     #   before erase, remove log files
   566     [ $1 -eq 0 ] || exit 0
   567     rm -f $RPM_INSTALL_PREFIX/var/squirrelmail/log/*.log >/dev/null 2>&1 || true

mercurial