Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
fd41ea8a
Commit
fd41ea8a
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
RPM works alos on ubuntu and debian
parent
8b818ce1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/rpm/dolibarr.spec
+32
-25
32 additions, 25 deletions
build/rpm/dolibarr.spec
with
32 additions
and
25 deletions
build/rpm/dolibarr.spec
+
32
−
25
View file @
fd41ea8a
...
...
@@ -32,7 +32,8 @@ Group: Networking/WWW
Group: Applications/Internet
Requires: mysql-server mysql httpd php php-cli php-gd php-ldap php-imap php-mysql
AutoReqProv: yes
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
AutoReqProv: no
%description
...
...
@@ -103,17 +104,6 @@ cp -pr doc $RPM_BUILD_ROOT/var/www/dolibarr
cp -pr htdocs $RPM_BUILD_ROOT/var/www/dolibarr
cp -pr scripts $RPM_BUILD_ROOT/var/www/dolibarr
# menu
#%{__install} -d $RPM_BUILD_ROOT%{_menudir}
#%{__cat} <<EOF >$RPM_BUILD_ROOT%{_menudir}/%{name}
#?package(%{name}):\
#command="Dolibarr" \
#section="Office" \
#title="Dolibarr" \
#icon="dolibarr_48x48.png" \
#longtitle="Dolibarr ERP & CRM"
#EOF
#---- clean
%clean
...
...
@@ -181,19 +171,26 @@ fi
# Detect OS
os='fedora';
os='fedora
-redhat
';
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
export os='fedora';
export os='fedora
-redhat
';
export conffile="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
apacheuser='apache';
apachegroup='apache';
export
apacheuser='apache';
export
apachegroup='apache';
fi
if [ -d %{_sysconfdir}/apache2/conf.d ]; then
if [ -d %{_sysconfdir}/apache2/conf.d
-a `grep wwwrun /etc/passwd`
]; then
export os='opensuse';
export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
apacheuser='wwwrun';
apachegroup='wwwrun';
export apacheuser='wwwrun';
export apachegroup='wwwrun';
fi
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep www-data /etc/passwd` ]; then
export os='ubuntu-debian';
export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
export apacheuser='www-data';
export apachegroup='www-data';
fi
echo OS detected: $os
# Create a config link dolibarr.conf for Fedora or Redhat
if [ ! -f $conffile ]; then
...
...
@@ -214,11 +211,11 @@ chmod -R o-w $docdir
if [ ! -s $targetdir/htdocs/conf/conf.php ]; then
echo Create empty Dolibarr conf.php file
touch $targetdir/htdocs/conf/conf.php
chown apache
.
apache $targetdir/htdocs/conf/conf.php
chown
$
apache
user:$
apache
group
$targetdir/htdocs/conf/conf.php
chmod ug+rw $targetdir/htdocs/conf/conf.php
fi
if [ "x$os" = "xfedora" -a -s /usr/bin/chcon ]; then
if [ "x$os" = "xfedora
-redhat
" -a -s /usr/bin/chcon ]; then
echo Set SELinux permissions
# Warning: chcon seems not cumulative
#chcon -R -h -t httpd_sys_content_t $targetdir
...
...
@@ -253,16 +250,26 @@ echo
%clean_menus
# Detect OS
os='fedora';
os='fedora
-redhat
';
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
export os='fedora';
export os='fedora
-redhat
';
export conffile="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
export apacheuser='apache';
export apachegroup='apache';
fi
if [ -d %{_sysconfdir}/apache2/conf.d ]; then
if [ -d %{_sysconfdir}/apache2/conf.d
-a `grep wwwrun /etc/passwd`
]; then
export os='opensuse';
export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
export apacheuser='wwwrun';
export apachegroup='wwwrun';
fi
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep www-data /etc/passwd` ]; then
export os='ubuntu-debian';
export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
export apacheuser='www-data';
export apachegroup='www-data';
fi
echo OS detected: $os
# Dolibarr files are stored into /var/www
export targetdir='/var/www/dolibarr'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment