squirrelmail/squirrelmail.spec

Sat, 09 Jul 2011 15:39:59 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 09 Jul 2011 15:39:59 +0200
changeset 351
879299505589
parent 350
32d6f7a543a9
child 352
aa138c6f5dd6
permissions
-rw-r--r--

Remove unmaintained and seemingly unused Kolab configuration.

     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:      20110706
    61 #   package options
    62 %option       with_plugins  no
    64 #   list of sources
    65 Source0:      http://switch.dl.sourceforge.net/squirrelmail/squirrelmail-%{V_squirrelmail}.tar.bz2
    66 Source1:      http://switch.dl.sourceforge.net/squirrelmail/all_locales-%{V_locale}.tar.bz2
    67 Source2:      http://www.squirrelmail.org/plugins/compatibility-%{V_plugin_compat}.tar.gz
    68 Source3:      http://www.squirrelmail.org/plugins/squirrel_logger-%{V_plugin_logger}.tar.gz   
    69 Source4:      http://www.squirrelmail.org/plugins/addgraphics-%{V_plugin_addgraphics}.tar.gz
    70 Source5:      http://www.squirrelmail.org/plugins/avelsieve-%{V_plugin_avelsieve}.tar.gz
    71 Source6:      http://www.squirrelmail.org/plugins/chg_sasl_passwd-%{V_plugin_saslpwd}.tar.gz
    72 Source7:      http://www.squirrelmail.org/plugins/change_ldappass-%{V_plugin_ldappwd}.tar.gz
    73 Source8:      http://www.squirrelmail.org/plugins/check_quota-%{V_plugin_checkquota}.tar.gz
    74 Source9:      http://www.squirrelmail.org/plugins/folder_sizes-%{V_plugin_foldersize}.tar.gz
    75 Source10:     http://www.squirrelmail.org/plugins/gpg-%{V_plugin_gnupg}.tar.gz
    76 Source11:     http://www.squirrelmail.org/plugins/ldifimport-%{V_plugin_ldif}.tar.gz
    77 Source12:     http://www.squirrelmail.org/plugins/pupdate.%{V_plugin_update}.tar.gz
    78 Source13:     http://www.squirrelmail.org/plugins/show_user_and_ip-%{V_plugin_userip}.tar.gz
    79 Source14:     http://www.squirrelmail.org/plugins/smallcal-%{V_plugin_smallcal}.tar.gz
    80 Source15:     http://www.squirrelmail.org/plugins/vkeyboard-%{V_plugin_vkeyboard}.tar.gz
    81 Source16:     http://www.squirrelmail.org/plugins/username-%{V_plugin_username}.tar.gz
    82 Source17:     http://www.squirrelmail.org/plugins/login_notes-%{V_plugin_loginnotes}.tar.gz
    83 Source18:     http://www.squirrelmail.org/plugins/password_forget-%{V_plugin_passforget}.tar.gz
    84 Source19:     http://www.squirrelmail.org/plugins/captcha-%{V_plugin_captcha}.tar.gz
    85 Source20:     http://www.squirrelmail.org/plugins/smime-%{V_plugin_smime}.tar.gz
    86 Source21:     http://www.squirrelmail.org/plugins/debugger-%{V_plugin_debug}.tar.gz
    87 Source22:     config.php
    88 Source23:     defprefs.txt
    89 Source24:     opkg_large.png
    90 Source25:     opkg_small.png
    91 Source26:     rc.squirrelmail
    92 Source27:     squirrelmail.conf
    93 Source29:     index.php
    94 Patch0:       squirrelmail.patch
    95 Patch1:       squirrelmail.patch.plugins
    97 #   build information
    98 Prefix:       %{l_prefix}
    99 BuildRoot:    %{l_buildroot}
   100 BuildPreReq:  OpenPKG, openpkg >= 20060823
   101 PreReq:       OpenPKG, openpkg >= 20060823
   102 PreReq:       MTA, apache, apache-php, apache-php::with_xml = yes
   103 AutoReq:      no
   104 AutoReqProv:  no
   106 %description
   107     SquirrelMail is a standards based webmail package written in PHP. It
   108     includes built in pure PHP support for the IMAP and SMTP protocols,
   109     and all pages render in pure HTML 4.0 (with no Javascript) for
   110     maximum compatibility across browsers. It has very few requirements
   111     and is very easy to configure and install. SquirrelMail has all the
   112     functionality you would want from an email client, including strong
   113     MIME support, address books, and folder manipulation.
   115 %track
   116     prog squirrelmail = {
   117         version   = %{V_squirrelmail}
   118         url       = http://prdownloads.sourceforge.net/squirrelmail/
   119         regex     = squirrelmail-(\d+\.[02468]\.\d+[a-z]?)\.tar\.bz2
   120     }
   121     prog squirrelmail:locales = {
   122         version   = %{V_locale}
   123         url       = http://prdownloads.sourceforge.net/squirrelmail/
   124         regex     = all_locales-(\d+\.[02468]\.\d+-\d+)\.tar\.bz2
   125     }
   126     prog squirrelmail:compat = {
   127         comment   = "cs: untrackable due to CMS generated URLs"
   128         disabled
   129         version   = %{V_plugin_compat}
   130         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   131         regex     = compatibility-(__VER__)\.tar\.gz
   132     }
   133     prog squirrelmail:logger = {
   134         version   = %{V_plugin_logger}
   135         url       = http://www.squeaksoft.com/products/SquirrelLogger/
   136         regex     = squirrel_logger.(__VER__)\.tar\.gz
   137     }
   138     prog squirrelmail:addgraphics = {
   139         comment   = "cs: untrackable due to CMS generated URLs"
   140         disabled
   141         version   = %{V_plugin_addgraphics}
   142         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   143         regex     = addgraphics-(__VER__)\.tar\.gz
   144     }
   145     prog squirrelmail:avelsieve = {
   146         comment   = "cs: untrackable due to CMS generated URLs"
   147         disabled
   148         version   = %{V_plugin_avelsieve}
   149         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   150         regex     = avelsieve-(\d+\.\d+\.\d+)\.tar\.gz
   151     }
   152     prog squirrelmail:saslpwd = {
   153         comment   = "cs: untrackable due to CMS generated URLs"
   154         disabled
   155         version   = %{V_plugin_saslpwd}
   156         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   157         regex     = chg_sasl_passwd-(\d+\.\d+\.\d+-\d+\.\d+)\.tar\.gz
   158     }
   159     prog squirrelmail:ldappwd = {
   160         comment   = "cs: untrackable due to CMS generated URLs"
   161         disabled
   162         version   = %{V_plugin_ldappwd}
   163         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   164         regex     = change_ldappass-(\d+\.\d+-\d+\.\d+\.\d+)\.tar\.gz
   165     }
   166     prog squirrelmail:checkquota = {
   167         comment   = "cs: untrackable due to CMS generated URLs"
   168         disabled
   169         version   = %{V_plugin_checkquota}
   170         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   171         regex     = check_quota-(__VER__)\.tar\.gz
   172     }
   173     prog squirrelmail:foldersize = {
   174         comment   = "cs: untrackable due to CMS generated URLs"
   175         disabled
   176         version   = %{V_plugin_foldersize}
   177         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   178         regex     = folder_sizes-(__VER__)\.tar\.gz
   179     }
   180     prog squirrelmail:gnupg = {
   181         comment   = "cs: untrackable due to CMS generated URLs"
   182         disabled
   183         version   = %{V_plugin_gnupg}
   184         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   185         regex     = gpg-(\d+\.\d+)\.tar\.gz
   186     }
   187     prog squirrelmail:ldif = {
   188         comment   = "cs: untrackable due to CMS generated URLs"
   189         disabled
   190         version   = %{V_plugin_ldif}
   191         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   192         regex     = ldifimport-(__VER__)\.tar\.gz
   193     }
   194     prog squirrelmail:update = {
   195         comment   = "cs: untrackable due to CMS generated URLs"
   196         disabled
   197         version   = %{V_plugin_update}
   198         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   199         regex     = pupdate.(__VER__)\.tar\.gz
   200     }
   201     prog squirrelmail:userip = {
   202         comment   = "cs: untrackable due to CMS generated URLs"
   203         disabled
   204         version   = %{V_plugin_userip}
   205         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   206         regex     = show_user_and_ip-(__VER__)\.tar\.gz
   207     }
   208     prog squirrelmail:smallcal = {
   209         comment   = "cs: untrackable due to CMS generated URLs"
   210         disabled
   211         version   = %{V_plugin_smallcal}
   212         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   213         regex     = smallcal-(__VER__)\.tar\.gz
   214     }
   215     prog squirrelmail:vkeyboard = {
   216         comment   = "cs: untrackable due to CMS generated URLs"
   217         disabled
   218         version   = %{V_plugin_vkeyboard}
   219         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   220         regex     = vkeyboard-(__VER__)\.tar\.gz
   221     }
   222     prog squirrelmail:username = {
   223         comment   = "cs: untrackable due to CMS generated URLs"
   224         disabled
   225         version   = %{V_plugin_username}
   226         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   227         regex     = username-(__VER__)\.tar\.gz
   228     }
   229     prog squirrelmail:loginnotes = {
   230         comment   = "cs: untrackable due to CMS generated URLs"
   231         disabled
   232         version   = %{V_plugin_loginnotes}
   233         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   234         regex     = login_notes--(__VER__)\.tar\.gz
   235     }
   236     prog squirrelmail:passforget = {
   237         comment   = "cs: untrackable due to CMS generated URLs"
   238         disabled
   239         version   = %{V_plugin_passforget}
   240         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   241         regex     = password_forget-(__VER__)\.tar\.gz
   242     }
   243     prog squirrelmail:captcha = {
   244         comment   = "cs: untrackable due to CMS generated URLs"
   245         disabled
   246         version   = %{V_plugin_captcha}
   247         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   248         regex     = captcha-(__VER__)\.tar\.gz
   249     }
   250     prog squirrelmail:smime = {
   251         comment   = "cs: untrackable due to CMS generated URLs"
   252         disabled
   253         version   = %{V_plugin_smime}
   254         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   255         regex     = smime-(__VER__)\.tar\.gz
   256     }
   257     prog squirrelmail:debugger = {
   258         comment   = "cs: untrackable due to CMS generated URLs"
   259         disabled
   260         version   = %{V_plugin_debug}
   261         url       = http://www.squirrelmail.org/plugins_category.php?category_id=all
   262         regex     = debugger-(__VER__)\.tar\.gz
   263     }
   265 %prep
   266     %setup -q -c -n squirrelmail
   267     %setup -q -D -T -a 1 -c -n squirrelmail/all_locales-%{V_locale}
   268     %setup -q -D -T -a 2 -n squirrelmail
   269     %setup -q -D -T -a 3 -n squirrelmail
   270     mv compatibility squirrelmail-%{V_squirrelmail}/plugins
   271     mv squirrel_logger squirrelmail-%{V_squirrelmail}/plugins
   272 %if "%{with_plugins}" == "yes"
   273     %setup -q -D -T -a 4 -n squirrelmail
   274     %setup -q -D -T -a 5 -n squirrelmail
   275     %setup -q -D -T -a 6 -n squirrelmail
   276     %setup -q -D -T -a 7 -n squirrelmail
   277     %setup -q -D -T -a 8 -n squirrelmail
   278     %setup -q -D -T -a 9 -n squirrelmail
   279     %setup -q -D -T -a 10 -n squirrelmail
   280     %setup -q -D -T -a 11 -n squirrelmail
   281     %setup -q -D -T -a 12 -n squirrelmail
   282     %setup -q -D -T -a 13 -n squirrelmail
   283     %setup -q -D -T -a 14 -n squirrelmail
   284     %setup -q -D -T -a 15 -n squirrelmail
   285     %setup -q -D -T -a 16 -n squirrelmail
   286     %setup -q -D -T -a 17 -n squirrelmail
   287     %setup -q -D -T -a 18 -n squirrelmail
   288     %setup -q -D -T -a 19 -n squirrelmail
   289     %setup -q -D -T -a 20 -n squirrelmail
   290     %setup -q -D -T -a 21 -n squirrelmail
   292     #   move additional plugins where other are already placed
   293     for plug in addgraphics avelsieve check_quota chg_sasl_passwd \
   294                 change_ldappass folder_sizes gpg ldifimport pupdate \
   295                 show_user_and_ip smallcal vkeyboard username \
   296                 login_notes password_forget captcha smime debugger; do
   297         mv $plug squirrelmail-%{V_squirrelmail}/plugins
   298     done
   300     #   provisionary untested recaptcha google buyout hack
   301     %{l_shtool} subst \
   302         -e 's;\(\$recaptcha_uri *=.*https://\)api-secure.recaptcha.net;\1www.google.com/recaptcha/api;' \
   303         plugins/captcha/backends/recaptcha/recaptcha.php
   304 %endif
   306     #   clean up login screen of distractions
   307     ( cd squirrelmail-%{V_squirrelmail}
   308       %patch -p0
   309     ) || exit $?
   311     #   rearrange documentation and remove archive script
   312     ( cd squirrelmail-%{V_squirrelmail}
   313       mv AUTHORS ChangeLog COPYING INSTALL README UPGRADE doc/
   314       mv ReleaseNotes doc/ReleaseNotes.txt
   315       mv themes/README.themes doc/
   316       for fil in `find plugins/ -name "README*" -o -name "Readme*" \
   317                  -o -name "INSTALL*" -o -name CHANGES -o -name HISTORY`; do
   318           %{l_shtool} mkdir -f -p -m 755 doc/`dirname $fil`
   319           mv -f $fil $_
   320       done
   321       mv doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell
   322       rm -rf doc/plugins/squirrelspell/doc doc/plugins/squirrelspell/index.php
   323       mv plugins/squirrelspell/doc/* doc/plugins/squirrelspell
   324       rm -rf plugins/squirrelspell/doc
   325       rm -f plugins/make_archive.pl
   326 %if "%{with_plugins}" == "yes"
   327       mv plugins/pupdate/docs/* doc/plugins/pupdate
   328       rm -rf plugins/pupdate/docs
   329 %endif
   331       #   postadjustment cosmetics
   332       %{l_shtool} subst \
   333           -e 's;\(\$color\[4\], .border="0" width=\)"350";\1"250";1' \
   334           src/login.php
   336       #   set default prefs
   337       cat %{SOURCE defprefs.txt} >>data/default_pref
   338     ) || exit $?
   340 %build
   342 %install
   343     rm -rf $RPM_BUILD_ROOT
   345     #   create directory structure
   346     %{l_shtool} mkdir -f -p -m 755 \
   347         $RPM_BUILD_ROOT%{l_prefix}/bin \
   348         $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail \
   349         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs \
   350         $RPM_BUILD_ROOT%{l_prefix}/var/squirrelmail/spool/attach \
   351         $RPM_BUILD_ROOT%{l_prefix}/var/squirrelmail/log
   353     #   install locales
   354     ( cd all_locales-%{V_locale}
   355       cp -rpf help images locale $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
   356     ) || exit $?
   358     #   install program
   359     ( cd squirrelmail-%{V_squirrelmail}
   361       #   install default_pref
   362       %{l_shtool} install -c -m 644 \
   363           data/default_pref \
   364           $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/prefs/
   366       #   create initial administrator list
   367       echo %{l_musr} >>$RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/admins
   369       #   copy over most functional directories, a lot of stuff
   370       for dir in class doc functions include plugins src themes; do
   371           cp -rpf $dir $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
   372       done
   373       cp -rpf images/* $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
   374       cp -pf locale/timezones.cfg $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/locale/
   376       #   install main config files
   377       l_fqdm=`%{l_shtool} echo -e %h%d`
   378       %{l_shtool} install -c -m 644 %{l_value -s -a} \
   379           -e 's;config/\(config_local.php\);\1;g' \
   380           -e "s;@l_fqdm@;${l_fqdm};g" \
   381           %{SOURCE config.php} \
   382           config/config_default.php \
   383           config/config_local.php \
   384           $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/
   385 %if "%{with_plugins}" == "yes"
   386       ( cd $RPM_BUILD_ROOT%{l_prefix}
   387         %{l_patch} -p0 <%{PATCH squirrelmail.patch.plugins}
   388         rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/squirrelmail/*.orig
   389         rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/gpg/*.orig
   390         rm -f $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/chg_sasl_passwd/*.orig
   391       ) || exit $?
   392 %endif
   394       #   install plugin config files
   395       ( cd $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins
   396 %if "%{with_plugins}" == "yes"
   397         cp -pf check_quota/config.sample.php check_quota/config.php
   398         cp -pf chg_sasl_passwd/config.php.sample chg_sasl_passwd/config.php
   399         cp -pf show_user_and_ip/config.php.sample show_user_and_ip/config.php
   400         %{l_shtool} install -c -m 644 \
   401             -e "s;sm_logo\.png;opkg_small.png;" \
   402             -e "s;SquirrelMail Logo;OpenPKG Logo;" \
   403             -e "s;www\.squirrelmail\.org;www.openpkg.org;" \
   404             -e "s;\/\/\(\$image_width.*\) = 308;\1 = 201;" \
   405             -e "s;\/\/\(\$image_height.*\) = 111;\1 = 62;" \
   406             addgraphics/config.php.typical.one.domain \
   407             addgraphics/config.php
   408         %{l_shtool} install -c -m 644 \
   409             -e 's/^\(\$sieve_preferred_sasl_mech =\).*/\1 "PLAIN LOGIN CRAM-MD5 DIGEST-MD5";/' \
   410             -e 's/^\(\$avelsieve_oldcyrus =\).*/\1 false;/' \
   411             -e 's/^\(\$startitems =\).*/\1 4;/' \
   412             avelsieve/config/config_sample.php \
   413             avelsieve/config/config.php
   414         %{l_shtool} install -c -m 644 \
   415             change_ldappass/config_sample.php \
   416             change_ldappass/config.php
   417         %{l_shtool} install -c -m 644 \
   418             login_notes/config.sample.php \
   419             login_notes/config.php
   420         %{l_shtool} install -c -m 644 \
   421             password_forget/config_example.php \
   422             password_forget/config.php
   423         %{l_shtool} install -c -m 644 \
   424             -e 's;^//\( *.CAPTCHA.,\);\1;g' \
   425             -e 's,\(\$sl_dateformat *=\).*\(.\);$,\1 \2d.m.Y H:i:s\2;,g' \
   426             -e 's,\(\$sl_logfile *=\).*\(.\);$,\1 \2%{l_prefix}/var/squirrelmail/log/squirrelmail.log\2;,g' \
   427             squirrel_logger/config_example.php \
   428             squirrel_logger/config.php
   429         %{l_shtool} install -c -m 644 \
   430             -e 's/\(\$log_CAPTCHA_events *=\).*/\1 1;/' \
   431             -e 's,\(\$captcha_backend *=\).*\(.\);$,\1 \2recaptcha\2;,' \
   432             captcha/config_example.php \
   433             captcha/config.php
   434         for captname in \
   435             b2evo captcha_php csi freecap hec hn_captcha opencaptcha \
   436             phpcaptcha quickcaptcha quickform recaptcha textcaptcha
   437             do
   438                 mv \
   439                    captcha/backends/${captname}/${captname}_config_example.php \
   440                    captcha/backends/${captname}/${captname}_config.php
   441         done
   442         %{l_shtool} install -c -m 644 \
   443             smime/config_example.php \
   444             smime/config.php
   445         %{l_shtool} subst \
   446             -e 's;\(path_to_gpg=\)/usr/bin/gpg.*;\1%{l_prefix}/bin/gpg;' \
   447             gpg/gpg_local_prefs.txt
   448         %{l_shtool} install -c -m 644 \
   449             -e 's;\(adminusername = "\)[^"]*;\1%{l_musr};' \
   450             -e 's;corehide = 1;corehide = 0;' \
   451             pupdate/config.php.sample \
   452             pupdate/config.php
   453         %{l_shtool} install -c -m 644 \
   454             -e "s;\(\$vkeyboard_msgsize.*\)'medium';\1'x-small';" \
   455             -e "s;\(\$vkeyboard_layout.*\)'us_english';\1'portuguese_abnt2';" \
   456             -e "s;\(\$vkeyboard_height.*\)'250';\1'270';" \
   457             vkeyboard/config.php.sample \
   458             vkeyboard/config.php
   459         cp -pf username/config.php.sample username/config.php
   460         %{l_shtool} install -c -m 644 \
   461             %{SOURCE opkg_small.png} \
   462             $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
   463 %endif
   464       ) || exit $?
   466       #   install squirrelmail configuration perl script
   467       %{l_shtool} install -c -m 755 \
   468           -e 's;chdir($dir);chdir("%{l_prefix}/etc/squirrelmail");g' \
   469           -e 's;\.\./plugins;%{l_prefix}/share/squirrelmail/plugins;g' \
   470           -e 's;\.\./themes;%{l_prefix}/share/squirrelmail/themes;g' \
   471           -e 's;config/config_local.php;config_local.php;g' \
   472           config/conf.pl \
   473           $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf
   475       #   use our own logo, a squirrel next to a OpenPKG package
   476       %{l_shtool} install -c -m 644 \
   477           %{SOURCE opkg_large.png} \
   478           $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/images/
   479     ) || exit $?
   481     #   install runcommand script
   482     %{l_shtool} mkdir -f -p -m 755 \
   483         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
   484     %{l_shtool} install -c -m 755 %{l_value -s -a} \
   485         %{SOURCE rc.squirrelmail} \
   486         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   488     #   correct path to optional perl interpreter
   489     %{l_shtool} subst \
   490         -e 's;#!/usr/bin/env perl;#! %{l_prefix}/bin/perl;' \
   491         $RPM_BUILD_ROOT%{l_prefix}/bin/squirrelconf
   493     #   replace false /etc config paths throughout
   494     %{l_shtool} subst \
   495         -e 's;SM_PATH \. \(.\)config/;\1%{l_prefix}/etc/squirrelmail/;g' \
   496         -e 's;require_once(SM_PATH \. \(.*\)%{l_prefix};require_once(\1%{l_prefix};g' \
   497         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/functions/*.php \
   498         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/include/*.php \
   499         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/administrator/*.php \
   500         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/plugins/calendar/*.php \
   501         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/src/*.php
   503     #   integration into Apache under /webmail
   504     %{l_shtool} mkdir -f -p -m 755 \
   505         $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
   506     %{l_shtool} install -c -m 644 %{l_value -s -a} \
   507         %{SOURCE squirrelmail.conf} \
   508         $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/
   509     %{l_shtool} install -c -m 644 %{l_value -s -a} \
   510         %{SOURCE index.php} \
   511         $RPM_BUILD_ROOT%{l_prefix}/share/squirrelmail/
   513     #   determine package ingredients and tag config files
   514     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   515         %{l_files_std} \
   516         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/etc/squirrelmail/*' \
   517         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/prefs/*' \
   518         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/squirrelspell/sqspell_config.php' \
   519 %if "%{with_plugins}" == "yes"
   520         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/addgraphics/config.php' \
   521         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/avelsieve/config/config.php' \
   522         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/check_quota/config.php' \
   523         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/chg_sasl_passwd/config.php' \
   524         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/change_ldappass/config.php' \
   525         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/folder_sizes/folder_sizes.php' \
   526         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/gpg/gpg_local_prefs.txt' \
   527         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/ldifimport/config.php' \
   528         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/pupdate/config.php' \
   529         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/show_user_and_ip/config.php' \
   530         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/squirrel_logger/config.php' \
   531         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/vkeyboard/config.php' \
   532         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/username/config.php' \
   533         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/login_notes/config.php' \
   534         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/password_forget/config.php' \
   535         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/config.php' \
   536         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/b2evo/b2evo_config.php' \
   537         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/captcha_php/captcha_php_config.php' \
   538         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/csi/csi_config.php' \
   539         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/freecap/freecap_config.php' \
   540         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/hec/hec_config.php' \
   541         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/hn_captcha/hn_captcha_config.php' \
   542         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/opencaptcha/opencaptcha_config.php' \
   543         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/phpcaptcha/phpcaptcha_config.php' \
   544         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/quickcaptcha/quickcaptcha_config.php' \
   545         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/quickform/quickform_config.php' \
   546         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/recaptcha/recaptcha_config.php' \
   547         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/captcha/backends/textcaptcha/textcaptcha_config.php' \
   548         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/smime/config.php' \
   549         '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/share/squirrelmail/plugins/debugger/setup.php' \
   550 %endif
   551         '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/share/squirrelmail/prefs' \
   552         '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/squirrelmail/spool/attach' \
   553         '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/squirrelmail/log'
   555 %files -f files
   557 %clean
   558     rm -rf $RPM_BUILD_ROOT
   560 %preun
   561     #   before erase, remove log files
   562     [ $1 -eq 0 ] || exit 0
   563     rm -f $RPM_INSTALL_PREFIX/var/squirrelmail/log/*.log >/dev/null 2>&1 || true

mercurial