File squirrelmail-beta.spec of Package squirrelmail-beta
#
# spec file for package squirrelmail-beta
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: squirrelmail-beta
Version: 1.5.2
Release: 0
Requires: mod_php_any
Requires: php-ctype
Requires: php-gettext
Requires: php-iconv
Requires: php-mbstring
Requires: php-mcrypt
Requires: php-hash
Requires: php-openssl
Requires: php-posix
Requires: php-session
Requires: php-sockets
Url: http://www.squirrelmail.org
Summary: A web-mailer written in php
License: GPL-2.0+
Group: Productivity/Networking/Email/Clients
%define sqm_path /srv/www/htdocs/squirrelmail
%define b_sqm_path %buildroot%sqm_path
%define sqm_doc %_defaultdocdir/squirrelmail
%define b_sqm_doc %buidroot%sqm_doc
#DL-URL: http://squirrelmail.org/download.php
#Source: http://snapshots.squirrelmail.org/squirrelmail-20110719_0200-SVN.devel.tar.bz2
Source: squirrelmail-20120215_0200-SVN.devel.tar.xz
Source2: squirrelmail-20120215_0200-SVN.locales.tar.xz
Source3: config.php
Source5: squirrelmail.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: fdupes
BuildRequires: xz
%define with_lang 1
%description
Squirrelmail is a web-mail reader and writer written in php4. It
supports adressbook, ldap searches and many other plugins.
%package lang
Summary: The Translations for squirrelmail
Group: Productivity/Networking/Email/Clients
%description lang
Squirrelmail is a web-mail reader and writer written in PHP. It
supports adressbook, ldap searches and many other plugins.
This package contains the internationalization files for this tool.
%prep
%setup -qn squirrelmail.devel -a2
%build
rm -f functions/mime.php.orig
cp %{S:3} config/
find . -type f -iname "*.php" -print0 | \
xargs -0 grep -Zl '#!/usr/bin/php\b' | \
xargs -0 perl -i -pe 's{#!/usr/bin/php\b}{#!%_bindir/php5}g';
%install
install -d -m 0755 %b_sqm_path
%if 0%{?with_lang}
pushd squirrelmail.locales/
cp -a locale help images %b_sqm_path/
popd
%endif
rm -Rf squirrelmail.locales;
# webinterface itself
cp -a * %b_sqm_path/
rm -rf %b_sqm_path/plugins/calendar
# demo is disabled
rm -rf %b_sqm_path/plugins/demo
# bulkquery is disabled too
rm -rf %b_sqm_path/plugins/filters/bulkquery
# deletes all .htaccess (they are included in squirrelmail.conf)
rm %b_sqm_path/*/.htaccess
install -d -m 0770 %buildroot/var/lib/squirrelmail/attach
install -d -m 0770 %buildroot/var/lib/squirrelmail/data
mkdir -p %buildroot%_sysconfdir/apache2/conf.d
cp %{S:5} %buildroot%_sysconfdir/apache2/conf.d
# cleanup
rm -rf %buildroot%sqm_path/contrib
%fdupes %buildroot
%files
%defattr(-,root,root)
%doc doc README
%dir %_sysconfdir/apache2
%dir %_sysconfdir/apache2/conf.d
%config %_sysconfdir/apache2/conf.d/*.conf
%dir %sqm_path
%dir %sqm_path/config
%config %sqm_path/config/default_pref
%config %sqm_path/config/config.php
%config %sqm_path/config/config_local.example.php
%sqm_path/config/conf.pl
%sqm_path/config/config_default.php
%sqm_path/config/index.php
%sqm_path/css
%sqm_path/class
%sqm_path/configure
%sqm_path/doc
%sqm_path/functions
%dir %sqm_path/help
%sqm_path/help/index.php
%sqm_path/help/en_US
%sqm_path/images
%sqm_path/include
%sqm_path/index.php
%dir %sqm_path/locale
%sqm_path/locale/index.php
%sqm_path/plugins
%sqm_path/po
%sqm_path/src
%sqm_path/templates
%sqm_path/themes
%sqm_path/README*
%dir %attr(-,root,www) /var/lib/squirrelmail
%dir %attr(-,root,www) /var/lib/squirrelmail/attach
%dir %attr(-,root,www) /var/lib/squirrelmail/data
%if 0%{?with_lang}
%files lang
%defattr(-,root,root)
%dir %sqm_path/help
%dir %sqm_path/locale
%sqm_path/locale/README.locales
%lang(ar) %sqm_path/locale/ar
%lang(bg_BG) %sqm_path/help/bg_BG
%lang(bg_BG) %sqm_path/locale/bg_BG
%lang(bn_BD) %sqm_path/locale/bn_BD
%lang(bn_IN) %sqm_path/locale/bn_IN
%lang(ca_ES) %sqm_path/help/ca_ES
%lang(ca_ES) %sqm_path/locale/ca_ES
%lang(cs_CZ) %sqm_path/help/cs_CZ
%lang(cs_CZ) %sqm_path/locale/cs_CZ
%lang(cy_GB) %sqm_path/help/cy_GB
%lang(cy_GB) %sqm_path/locale/cy_GB
%lang(da_DK) %sqm_path/help/da_DK
%lang(da_DK) %sqm_path/locale/da_DK
%lang(de_DE) %sqm_path/help/de_DE
%lang(de_DE) %sqm_path/locale/de_DE
%lang(el_GR) %sqm_path/locale/el_GR
%lang(en_GB) %sqm_path/help/en_GB
%lang(en_GB) %sqm_path/locale/en_GB
%lang(es_ES) %sqm_path/help/es_ES
%lang(es_ES) %sqm_path/locale/es_ES
%lang(et_EE) %sqm_path/locale/et_EE
%lang(eu_ES) %sqm_path/locale/eu_ES
%lang(fa_IR) %sqm_path/help/fa_IR
%lang(fa_IR) %sqm_path/locale/fa_IR
%lang(fi_FI) %sqm_path/help/fi_FI
%lang(fi_FI) %sqm_path/locale/fi_FI
%lang(fo_FO) %sqm_path/locale/fo_FO
%lang(fr_FR) %sqm_path/help/fr_FR
%lang(fr_FR) %sqm_path/locale/fr_FR
%lang(fy) %sqm_path/locale/fy
%lang(he_IL) %sqm_path/locale/he_IL
%lang(hr_HR) %sqm_path/locale/hr_HR
%lang(hu_HU) %sqm_path/locale/hu_HU
%lang(id_ID) %sqm_path/help/id_ID
%lang(id_ID) %sqm_path/locale/id_ID
%lang(is_IS) %sqm_path/locale/is_IS
%lang(it_IT) %sqm_path/help/it_IT
%lang(it_IT) %sqm_path/locale/it_IT
%lang(ja_JP) %sqm_path/help/ja_JP
%lang(ja_JP) %sqm_path/locale/ja_JP
%lang(ka) %sqm_path/locale/ka
%lang(km) %sqm_path/locale/km
%lang(ko_KR) %sqm_path/help/ko_KR
%lang(ko_KR) %sqm_path/locale/ko_KR
%lang(lt_LT) %sqm_path/help/lt_LT
%lang(lt_LT) %sqm_path/locale/lt_LT
%lang(lv_LV) %sqm_path/locale/lv_LV
%lang(mk) %sqm_path/locale/mk
%lang(ms_MY) %sqm_path/locale/ms_MY
%lang(nb_NO) %sqm_path/locale/nb_NO
%lang(nl_NL) %sqm_path/help/nl_NL
%lang(nl_NL) %sqm_path/locale/nl_NL
%lang(nn_NO) %sqm_path/locale/nn_NO
%lang(pl_PL) %sqm_path/help/pl_PL
%lang(pl_PL) %sqm_path/locale/pl_PL
%lang(pt_BR) %sqm_path/help/pt_BR
%lang(pt_BR) %sqm_path/locale/pt_BR
%lang(pt_PT) %sqm_path/help/pt_PT
%lang(pt_PT) %sqm_path/locale/pt_PT
%lang(ro_RO) %sqm_path/locale/ro_RO
%lang(ru_RU) %sqm_path/help/ru_RU
%lang(ru_RU) %sqm_path/locale/ru_RU
%lang(ru_UA) %sqm_path/locale/ru_UA
%lang(si_LK) %sqm_path/locale/si_LK
%lang(sk_SK) %sqm_path/help/sk_SK
%lang(sk_SK) %sqm_path/locale/sk_SK
%lang(sl_SI) %sqm_path/help/sl_SI
%lang(sl_SI) %sqm_path/locale/sl_SI
%lang(sr_YU) %sqm_path/help/sr_YU
%lang(sr_YU) %sqm_path/locale/sr_YU
%lang(sv_SE) %sqm_path/help/sv_SE
%lang(sv_SE) %sqm_path/locale/sv_SE
%lang(ta_LK) %sqm_path/locale/ta_LK
%lang(th_TH) %sqm_path/help/th_TH
%lang(th_TH) %sqm_path/locale/th_TH
%lang(tl_PH) %sqm_path/locale/tl_PH
%lang(tr_TR) %sqm_path/locale/tr_TR
%lang(ug) %sqm_path/locale/ug
%lang(uk_UA) %sqm_path/help/uk_UA
%lang(uk_UA) %sqm_path/locale/uk_UA
%lang(vi_VN) %sqm_path/locale/vi_VN
%lang(zh_CN) %sqm_path/help/zh_CN
%lang(zh_CN) %sqm_path/locale/zh_CN
%lang(zh_TW) %sqm_path/locale/zh_TW
%endif
%changelog