forked from pool/roundcubemail
28fce69823
OBS-URL: https://build.opensuse.org/package/show/server:php:applications/roundcubemail?expand=0&rev=17
98 lines
3.5 KiB
RPMSpec
98 lines
3.5 KiB
RPMSpec
#
|
|
# spec file for package roundcubemail
|
|
#
|
|
# This file and all modifications and additions to the pristine
|
|
# package are under the same license as the package itself.
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
Name: roundcubemail
|
|
Summary: A modern browser-based multilingual IMAP client
|
|
Group: Productivity/Networking/Email/Clients
|
|
License: GNU General Public License (GPL)
|
|
Url: http://www.roundcube.net/
|
|
Version: 0.2b1
|
|
%define real_version 0.2-beta
|
|
Release: 0
|
|
BuildRequires: apache2-devel pcre-devel
|
|
Requires: http_daemon mod_php_any php-session php-mysql php-iconv
|
|
Requires: php-gettext php-mbstring php-openssl
|
|
Source0: %{name}-%{real_version}.tar.bz2
|
|
Source1: roundcubemail-README.SUSE
|
|
Source2: roundcubemail-httpd.conf
|
|
Patch1: roundcubemail-config-dir.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
%define apache_serverroot %(/usr/sbin/apxs2 -q DATADIR)
|
|
%define apache_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR)
|
|
%define roundcubepath %{apache_serverroot}/%name
|
|
%define roundcubeconfigpath %_sysconfdir/%name
|
|
|
|
%description
|
|
RoundCube Webmail is a browser-based multilingual IMAP client with an
|
|
application-like user interface. It provides full functionality you
|
|
expect from an e-mail client, including MIME support, address book,
|
|
folder manipulation, message searching and spell checking.
|
|
|
|
RoundCube Webmail is written in PHP and requires the MySQL database.
|
|
The user interface is fully skinnable using XHTML and CSS 2.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{real_version}
|
|
%patch1 -p0
|
|
|
|
%build
|
|
|
|
%install
|
|
install -d -m 0755 %buildroot/%roundcubepath
|
|
cp -a * %buildroot/%{roundcubepath}/
|
|
mkdir -p %buildroot/%_sysconfdir/%name
|
|
cp config/db.inc.php.dist %buildroot/%{roundcubeconfigpath}/db.inc.php
|
|
cp config/main.inc.php.dist %buildroot/%{roundcubeconfigpath}/main.inc.php
|
|
cp config/* %buildroot/%{roundcubeconfigpath}/
|
|
rm -rf %buildroot/%{roundcubepath}/config
|
|
|
|
# install httpd.conf file and adapt the configuration
|
|
install -d -m 0755 %buildroot/%{apache_sysconfdir}/conf.d
|
|
sed -e "s#__ROUNDCUBEPATH__#%{roundcubepath}#g" %{SOURCE2} > %buildroot/%{apache_sysconfdir}/conf.d/roundcubemail.conf
|
|
|
|
# install docs (SQL directory should not be needed during runtime - move it as well
|
|
install -d -m 0755 %buildroot/%_defaultdocdir/%name
|
|
for i in CHANGELOG INSTALL UPGRADING LICENSE README SQL; do
|
|
mv -v %buildroot/%roundcubepath/$i %buildroot/%_defaultdocdir/%name/
|
|
done
|
|
sed -e "s#__ROUNDCUBEPATH__#%{roundcubepath}#g" -e "s#__HTTPCONFDIR__#%{apache_sysconfdir}/conf.d#g" %{SOURCE1} > %buildroot/%_defaultdocdir/%name/README.SUSE
|
|
|
|
# no need to check .htaccess each time, the apache config takes care of the restrictions
|
|
find %buildroot/%{roundcubepath} -name .htaccess -delete
|
|
# fix wrong end of line encoding
|
|
for file in $(find %buildroot/%{roundcubepath} -type f); do
|
|
sed -i 's/\x0D$//' $file
|
|
done
|
|
|
|
%clean
|
|
rm -rf %buildroot
|
|
|
|
%files
|
|
%defattr(0644, root, root,0755)
|
|
%doc %_defaultdocdir/%name/
|
|
%dir %{roundcubepath}
|
|
%dir %{roundcubeconfigpath}
|
|
%config %{roundcubeconfigpath}/*.dist
|
|
%config(noreplace) %{roundcubeconfigpath}/db.inc.php
|
|
%config(noreplace) %{roundcubeconfigpath}/main.inc.php
|
|
%config(noreplace) %{apache_sysconfdir}/conf.d/roundcubemail.conf
|
|
%{roundcubepath}/index.php
|
|
%{roundcubepath}/robots.txt
|
|
%attr(0755,root,root) %{roundcubepath}/bin/*.sh
|
|
%{roundcubepath}/bin/*.php
|
|
%{roundcubepath}/installer/
|
|
%{roundcubepath}/logs/
|
|
%{roundcubepath}/program/
|
|
%{roundcubepath}/skins/
|
|
%{roundcubepath}/temp/
|
|
|
|
%changelog
|