"fixes to get rpm autoinstallation working on suse"

This commit is contained in:
Ralf Becker 2009-06-03 08:48:38 +00:00
parent dd7d9c3ecb
commit 57a887be0d

View File

@ -2,12 +2,12 @@ Name: egroupware-epl
Version: 9.1.20090601 Version: 9.1.20090601
Release: Release:
Summary: EGroupware is a web-based groupware suite written in php. Summary: EGroupware is a web-based groupware suite written in php.
Distribution: %{distribution}
Group: Web/Database Group: Web/Database
License: GPLv2 with exception of stylite module, which is proprietary License: GPLv2 with exception of stylite module, which is proprietary
URL: http://www.stylite.de/EPL URL: http://www.stylite.de/EPL
Vendor: Stylite GmbH [http://www.stylite.de/] Vendor: Stylite GmbH [http://www.stylite.de/]
Packager: Ralf Becker <rb@stylite.de> Packager: Ralf Becker <rb@stylite.de>
Author: Ralf Becker <rb@stylite.de> and other developers from EGroupware project [www.egroupware.org]
Prefix: /usr/share Prefix: /usr/share
%define egwdir %{prefix}/egroupware %define egwdir %{prefix}/egroupware
%define egwdatadir /var/lib/egroupware %define egwdatadir /var/lib/egroupware
@ -15,7 +15,7 @@ Prefix: /usr/share
%if 0%{?suse_version} %if 0%{?suse_version}
%define httpdconfd /etc/apache2/conf.d %define httpdconfd /etc/apache2/conf.d
%define source5 egroupware_suse.tar.bz2 %define extratar egroupware_suse.tar.bz2
%define distribution SUSE Linux %{?suse_version} %define distribution SUSE Linux %{?suse_version}
%define php php5 %define php php5
%define extra_requires apache2 apache2-mod_php5 php_any_db php5-dom %define extra_requires apache2 apache2-mod_php5 php_any_db php5-dom
@ -24,7 +24,7 @@ Prefix: /usr/share
%else %else
%define php php %define php php
%define httpdconfd /etc/httpd/conf.d %define httpdconfd /etc/httpd/conf.d
%define source5 egroupware_fedora.tar.bz2 %define extratar egroupware_fedora.tar.bz2
%define cron crontabs %define cron crontabs
%define rpm_post_install /usr/bin/php %{egwdir}/doc/rpm-build/rpm_post_install.php --source_dir %{egwdir} --data_dir %{egwdatadir} %define rpm_post_install /usr/bin/php %{egwdir}/doc/rpm-build/rpm_post_install.php --source_dir %{egwdir} --data_dir %{egwdatadir}
%endif %endif
@ -49,11 +49,13 @@ Prefix: /usr/share
%define extra_requires httpd php-mysql php-xml %define extra_requires httpd php-mysql php-xml
%endif %endif
Distribution: %{distribution}
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.bz2
Source1: %{name}-egw-pear-%{version}.tar.bz2 Source1: %{name}-egw-pear-%{version}.tar.bz2
Source2: %{name}-stylite-%{version}.tar.bz2 Source2: %{name}-stylite-%{version}.tar.bz2
Source3: %{name}-gallery-%{version}.tar.bz2 Source3: %{name}-gallery-%{version}.tar.bz2
Source4: %{?source5} Source4: %{?extratar}
Source5: %{name}-rpmlintrc Source5: %{name}-rpmlintrc
Patch0: class.uiasyncservice.inc.php.patch Patch0: class.uiasyncservice.inc.php.patch
BuildRoot: %{_tmppath}/%{name}-buildroot BuildRoot: %{_tmppath}/%{name}-buildroot
@ -155,7 +157,8 @@ Provides: egw-core %{version}
Obsoletes: %{egw_packagename}-core Obsoletes: %{egw_packagename}-core
Obsoletes: %{egw_packagename}-addressbook Obsoletes: %{egw_packagename}-addressbook
%description core %description core
This package provides the EGroupware core applications. This package provides the EGroupware core applications
(API, admin, etemplate, preferences and setup) plus addressbook.
%package egw-pear %package egw-pear
Version: %{version} Version: %{version}
@ -175,6 +178,7 @@ egw-pear contains modified pear classes necessary for EGroupware
#Group: Web/Database #Group: Web/Database
#AutoReqProv: no #AutoReqProv: no
#Requires: egw-core = %{version} #Requires: egw-core = %{version}
#Obsoletes: %{egw_packagename}-addressbook
#%description addressbook #%description addressbook
#Contact manager with Vcard support. #Contact manager with Vcard support.
#Addressbook is the egroupware contact application. #Addressbook is the egroupware contact application.
@ -464,7 +468,6 @@ This is the wiki app for EGroupware.
%setup2 -T -D -a 2 -n %{egwdirname} %setup2 -T -D -a 2 -n %{egwdirname}
%setup3 -T -D -a 3 -n %{egwdirname} %setup3 -T -D -a 3 -n %{egwdirname}
%setup4 -T -D -a 4 -n %{egwdirname} %setup4 -T -D -a 4 -n %{egwdirname}
%setup5 -T -D -a 5 -n %{egwdirname}
%patch0 -p 0 %patch0 -p 0
%build %build
@ -477,7 +480,12 @@ cp -aRf egroupware/* $RPM_BUILD_ROOT%{egwdir}
cd %{buildroot}%{egwdir} cd %{buildroot}%{egwdir}
ln -s ../../..%{egwdatadir}/header.inc.php ln -s ../../..%{egwdatadir}/header.inc.php
# create symlink for suse to get scripts with /usr/bin/php working
%if 0%{?suse_version}
mkdir %{buildroot}/usr/bin
cd %{buildroot}/usr/bin
ln -s php5 php
%endif
%clean %clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
@ -486,6 +494,10 @@ ln -s ../../..%{egwdatadir}/header.inc.php
%defattr(-,root,root) %defattr(-,root,root)
%dir %{egwdir} %dir %{egwdir}
%dir %{egwdatadir} %dir %{egwdatadir}
# symlink for suse to get scripts with /usr/bin/php working
%if 0%{?suse_version}
/usr/bin/php
%endif
%files core %files core
%defattr(-,root,root) %defattr(-,root,root)