roundcube/roundcube.spec

Mon, 15 Oct 2012 21:25:50 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 15 Oct 2012 21:25:50 +0200
changeset 743
51daf2b49ad7
parent 721
63c8527d60f4
child 746
75275e2bcfd7
permissions
-rw-r--r--

Back out change 742 as unversioned Google projects prove too unreliable
for production use, and rather correct problems with the OpenPKG v8
installation and leverage that instead.

     1 ##
     2 ##  roundcube.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2012-2012 Michael Schloh von Bennewitz <michael@schloh.com>
     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_plug_rcguard  0.2.0-39-g6d98249
    27 #   package information
    28 Name:         roundcube
    29 Summary:      Roundcube Webmail Client
    30 URL:          http://www.roundcube.net/
    31 Vendor:       Thomas Bruederli
    32 Packager:     Michael Schloh von Bennewitz
    33 Distribution: Europalab Networks Production
    34 Class:        EVAL
    35 Group:        Mail
    36 License:      GPL
    37 Version:      0.8.2
    38 Release:      20120800
    40 #   list of sources
    41 Source0:      http://switch.dl.sourceforge.net/roundcubemail/%{version}/roundcubemail-%{version}.tar.gz
    42 Source1:      https://www.github.com/dennylin93/rcguard/tarball/master/dennylin93-rcguard-%{V_plug_rcguard}.tar.gz
    43 Source2:      linen_login.png
    44 Patch0:       roundcube.patch
    46 #   build information
    47 BuildPreReq:  OpenPKG, openpkg >= 20100101
    48 PreReq:       OpenPKG, openpkg >= 20100101
    49 PreReq:       MTA, apache, apache-php
    50 PreReq:       apache-php::with_xml = yes
    51 PreReq:       apache-php::with_json = yes
    52 PreReq:       apache-php::with_exif = yes
    53 PreReq:       apache-php::with_mcrypt = yes
    54 PreReq:       apache-php::with_iconv = yes
    55 PreReq:       apache-php::with_session = yes
    56 PreReq:       apache-php::with_ssl = yes
    58 %description
    59     Roundcube webmail is a browser based multilingual IMAP client with
    60     an application-like user interface. It provides full functionality
    61     expected from a email client, including MIME support, address book,
    62     folder manipulation, message searching and spell checking.
    64 %track
    65     prog roundcube = {
    66         version   = %{version}
    67         url       = http://prdownloads.sourceforge.net/roundcubemail/
    68         regex     = roundcubemail-(\d+\.\d+\.\d+)\.tar\.gz
    69     }
    71 %prep
    72     %setup -q -n roundcubemail-%{version}
    73     %setup -q -n roundcubemail-%{version} -D -T -a 1
    74     %{l_shtool} subst \
    75         -e 's;\(E_ALL&~E_NOTICE\));\1&~E_STRICT);' \
    76         installer/index.php
    77     mv dennylin93-rcguard-* plugins/rcguard
    78     %patch -p0
    79     %{l_shtool} subst %{l_value -s -a} \
    80         plugins/managesieve/config.inc.php.dist
    82 %build
    84 %install
    85     #   create directory structure
    86     %{l_shtool} mkdir -f -p -m 755 \
    87         $RPM_BUILD_ROOT%{l_prefix}/share/roundcube
    89     #   install program
    90     cp -rpf \
    91         bin config installer logs plugins program skins SQL temp \
    92         $RPM_BUILD_ROOT%{l_prefix}/share/roundcube/
    93     %{l_shtool} install -c -m 644 \
    94         index.php robots.txt \
    95         $RPM_BUILD_ROOT%{l_prefix}/share/roundcube/
    97     #   install other components
    98     ( cd $RPM_BUILD_ROOT%{l_prefix}/share/roundcube/plugins/rcguard/skins \
    99       && ln -s default larry )
   100     %{l_shtool} install -c -m 644 \
   101         %{SOURCE linen_login.png} \
   102         $RPM_BUILD_ROOT%{l_prefix}/share/roundcube/skins/larry/images/
   104     #   determine package ingredients and tag config files
   105     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   106         %{l_files_std} \
   107         '%attr(775,-,%{l_ngrp}) %{l_prefix}/share/roundcube/temp' \
   108         '%attr(775,-,%{l_ngrp}) %{l_prefix}/share/roundcube/logs' \
   109         '%config %attr(640,%{l_mgrp},%{l_ngrp}) %{l_prefix}/share/roundcube/config/*' \
   110         '%config %attr(640,%{l_mgrp},%{l_ngrp}) %{l_prefix}/share/roundcube/plugins/*/*config*'
   112 %files -f files
   114 %clean
   116 %post
   117         #   display information about next steps
   118         ( echo "Roundcube stores data in SQL and requires an existing"
   119           echo "local or remote installation of PostgreSQL, MySQL, or"
   120           echo "SQLite. Please refer to online documentation to carry"
   121           echo "out the SQL configuration, something like:"
   122           echo ""
   123           echo "CREATE DATABASE roundcubemail;"
   124           echo "CREATE USER 'username'@'localhost' IDENTIFIED BY 'newpwd';"
   125           echo "GRANT ALL PRIVILEGES ON roundcubemail.* TO username@localhost IDENTIFIED BY 'newpwd';"
   126           echo "FLUSH PRIVILEGES;"
   127         ) | %{l_rpmtool} msg -b -t notice
   129 %preun
   130     #   before erase, remove log files
   131     [ $1 -eq 0 ] || exit 0
   132     rm -f $RPM_INSTALL_PREFIX/var/roundcube/log/*.log >/dev/null 2>&1 || true

mercurial