From c27ad2e61ce6ee4c6e672a8deacf83a1a83306ec7310505113970790febf6862 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 22 May 2007 12:35:55 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/server:php:applications/roundcubemail?expand=0&rev=9 --- roundcubemail.spec | 113 ++++++++++++++++++++++++++++++--------------- 1 file changed, 75 insertions(+), 38 deletions(-) diff --git a/roundcubemail.spec b/roundcubemail.spec index dcc4191..e39a313 100644 --- a/roundcubemail.spec +++ b/roundcubemail.spec @@ -1,57 +1,94 @@ +# +# 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 BuildRequires: apache2-devel pcre-devel -#BuildRequires: libapr-util1-devel -Version: 0.1beta2 +Version: 0.1rc1 +%define real_version 0.1-rc1 Release: 0 -Requires: mod_php_any -Requires: php-gettext -Requires: php-iconv -Requires: php-mbstring -Requires: php-openssl -Requires: php-session -Autoreqprov: on +Requires: http_daemon mod_php_any php-session php-mysql php-iconv +Requires: php-gettext php-mbstring php-openssl +# needed for apache_sysconfdir and apache_serverroot +BuildRequires: apache2-devel Group: Productivity/Networking/Email/Clients License: GNU General Public License (GPL) -URL: http://www.roundcube.net/ -Summary: a web-mailer written in php4 -Packager: Peter Nixon -Vendor: Suntel Communications -Distribution: SUSE Linux -%define sqm_path /srv/www/htdocs/%{name} -%define b_sqm_path $RPM_BUILD_ROOT/%{sqm_path} -%define sqm_doc /%{_defaultdocdir}/roundcube -%define b_sqm_doc $RPM_BUILD_ROOT/%{sqm_doc} -Source0: %{name}-%{version}.tar.gz +Url: http://www.roundcube.net/ +Summary: A modern browser-based multilingual IMAP client. +Source0: %{name}-%{real_version}.tar.gz +Source1: roundcubemail-README.SUSE +Source2: roundcubemail-httpd.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArchitectures: noarch +BuildArch: noarch +%define apache_serverroot %(/usr/sbin/apxs2 -q DATADIR) +%define apache_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR) +%define roundcubepath %{apache_serverroot}/%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. +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. + -%debug_package %prep -%setup -q +%setup -q -n %{name}-%{real_version} %build %install -install -d -m 0755 %{b_sqm_path} -cp -a * %{b_sqm_path}/ -cp -a config/db.inc.php.dist %{b_sqm_path}/config/db.inc.php -cp -a config/main.inc.php.dist %{b_sqm_path}/config/main.inc.php +install -d -m 0755 %buildroot/%roundcubepath +cp -a * %buildroot/%{roundcubepath}/ +mv config/db.inc.php.dist %buildroot/%{roundcubepath}/config/db.inc.php +mv config/main.inc.php.dist %buildroot/%{roundcubepath}/config/main.inc.php + +# 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 +# rm %buildroot/%{roundcubepath}/.htaccess +rm %buildroot/%{roundcubepath}/config/.htaccess +rm %buildroot/%{roundcubepath}/logs/.htaccess +rm %buildroot/%{roundcubepath}/temp/.htaccess %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %buildroot + +%post +if [ ${1:-0} -gt 1 ]; then + # check if we update from an older version + echo "Warning: Please read %_defaultdocdir/%name/UPGRADING bevore you proceed!" +fi + %files %defattr(-, root, root) -%doc %attr(- root root) CHANGELOG INSTALL UPGRADING LICENSE README -%dir %{sqm_path} -%dir %{sqm_path}/config -%config(noreplace) %{sqm_path}/config/.htaccess -%config(noreplace) %{sqm_path}/config/db.inc.php -%config(noreplace) %{sqm_path}/config/main.inc.php -%{sqm_path}/config/*.dist -%{sqm_path}/[^c]* - -%changelog +%doc %_defaultdocdir/%name/ +%dir %{roundcubepath} +%dir %{roundcubepath}/config +%config(noreplace) %{roundcubepath}/config/db.inc.php +%config(noreplace) %{roundcubepath}/config/main.inc.php +%config(noreplace) %{apache_sysconfdir}/conf.d/roundcubemail.conf +%{roundcubepath}/index.php +%{roundcubepath}/config/*.dist +%{roundcubepath}/bin/ +%{roundcubepath}/logs/ +%{roundcubepath}/program/ +%{roundcubepath}/skins/ +%{roundcubepath}/temp/