File openerp-web.spec of Package openerp-web

# norootforbuild
%define _realname openerp-client-web

Name:           openerp-web
Version:        5.0.6
Release:        1
Summary:        Open source management solution
License:        Affero
Group:          Development/Python
Source:         %{name}-%{version}.tar.gz
Source1:        rc.%{name}
BuildRequires:  python-devel python-reportlab libxml2-python python-xml python-psycopg2 libxslt-python python-pydot python-setuptools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       openerp-server
%{py_requires}

%description
OpenERP is a complete ERP and CRM. The main features are accounting (analytic
and financial), stock management, sales and purchases management, tasks
automation, marketing campaigns, help desk, POS, etc. Technical features include
a distributed server, flexible workflows, an object database, a dynamic GUI,
customizable reports, and XML-RPC interfaces.

%prep
%setup -q  -n %{_realname}-%{version}


%build
%{__python} setup.py build

%install
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES
rm -rf %{buildroot}/usr/doc/ChangeLog
rm -rf %{buildroot}/usr/doc/LICENSE.txt
rm -rf %{buildroot}/usr/doc/README.txt
rm -rf %{buildroot}/usr/config/
rm -rf %{buildroot}/usr/scripts/
%{__perl} -n -i -e 'print unless m,%{_prefix}/doc/(README.txt|LICENSE.txt|ChangeLog)$,' INSTALLED_FILES
%{__perl} -n -i -e 'print unless m,%{_prefix}/config/(openerp-web.cfg)$,' INSTALLED_FILES
%{__perl} -n -i -e 'print unless m,%{_prefix}/scripts/(openerp-web)$,' INSTALLED_FILES
%{__perl} -n -i -e 'print unless m,%{_prefix}/(doc|scripts|config)$,' INSTALLED_FILES
#%{__perl} -n -i -e 'print unless m,%{_prefix}/share/man/man1/(openerp-web.1)$,' INSTALLED_FILES
#%{__perl} -n -i -e 'print unless m,%{_prefix}/share/man/man5/(openerp_webrc.5)$,' INSTALLED_FILES
#chmod -x %{buildroot}/%{_prefix}/share/doc/openerp-web-5.0.6/License.rtf
mkdir -p %{buildroot}/etc/init.d
install -m 744 %{_sourcedir}/rc.openerp-web %{buildroot}/etc/init.d/openerp-web

%clean  
rm -rf "$RPM_BUILD_ROOT"  

%files -f INSTALLED_FILES
%defattr(-, root, root, 0755)
%doc doc/README.txt doc/ChangeLog doc/LICENSE.txt config/openerp-web.cfg 
%config %{_initrddir}/openerp-web

%changelog
* Thu Dec 31 2009 Leo Eraly <leo@unstable.be> - 5.0.6-1
- Initial package
openSUSE Build Service is sponsored by