2
0
forked from Wavyzz/dolibarr

Fix: Avoid errors into rpm packages

This commit is contained in:
Laurent Destailleur
2011-08-03 16:46:46 +00:00
parent 3e1adf3d20
commit b85550a2a1
2 changed files with 28 additions and 16 deletions

View File

@@ -10,8 +10,8 @@ with format RPM (for Redhat, OpenSuse, Mandriva, ...).
# This is standard command to work on RPM packaging:
#
# To install all packagers tools:
# yum -y install rpmlint mock hunspell-en hunspell-es hunspell-fr hunspell-it
# yum -y install rpmlint
# yum -y install hunspell-en hunspell-es hunspell-fr hunspell-it
#
# rpmlint file.rpm Test a package
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm

View File

@@ -6,6 +6,10 @@
# edit it if you need to match your rules.
# --------------------------------------------------------
#%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
#%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
#%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define name dolibarr
%define version __VERSION__
%define release __RELEASE__
@@ -19,14 +23,14 @@ Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs ou asso
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
License: GPLv2+
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
Vendor: Dolibarr dev team
URL: http://www.%{name}.org
Source0: http://www.dolibarr.org/files/fedora/%{name}-%{version}.tgz
Source: /usr/src/RPM/SOURCES/%{name}-%{version}.tgz
BuildArch: noarch
#BuildArchitectures: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRoot: /tmp/%{name}-buildroot
#Icon: dolibarr_logo1.gif
# For Mandriva-Mageia
@@ -34,6 +38,9 @@ Group: Networking/WWW
# For all other distrib
Group: Applications/Internet
# Requires can use lua to be defined dynamically (but still at build time)
# %{lua: if posix.access("/aaa") then print("Requires: bidon1 mysql-server mysql httpd php php-cli php-gd php-ldap php-imap php-mysql") end }
# Requires for Fedora-Redhat
Requires: mysql-server mysql httpd php php-cli php-gd php-ldap php-imap php-mysql
# Requires for OpenSuse
@@ -67,7 +74,7 @@ que necesita y haciendo hincapié en su facilidad de uso.
%description -l fr
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
fournisseurs, devis, factures, comptes bancaires, agenda, campagne emailings
et bien d'autres choses dans une interface pensée pour la simplicité.
%description -l it
@@ -100,6 +107,7 @@ echo Building %{name}-%{version}-%{release}
%{__install} -m 644 etc/dolibarr/apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/apache.conf
%{__install} -m 644 etc/dolibarr/file_contexts.dolibarr $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/file_contexts.dolibarr
# %{_datadir} = /usr/share
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
%{__install} -m 644 var/www/dolibarr/doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/dolibarr.png
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications
@@ -142,6 +150,8 @@ echo Building %{name}-%{version}-%{release}
#---- post (after unzip during install)
%post
#%update_menus # Does not exists on fedora nor mandriva
# Define vars
# Dolibarr files are stored into /var/www
@@ -284,6 +294,8 @@ echo
#---- postun (after uninstall)
%postun
#%clean_menus # Does not exists on fedora nor mandriva
# Define vars
# Dolibarr files are stored into targetdir