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