cvsimport
This commit is contained in:
commit
f8d31fc58a
@ -2,7 +2,7 @@
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# \file build/makepack-dolibarr.pl
|
# \file build/makepack-dolibarr.pl
|
||||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||||
# \version $Id: makepack-dolibarr.pl,v 1.133 2011/08/03 21:46:02 eldy Exp $
|
# \version $Id: makepack-dolibarr.pl,v 1.135 2011/08/07 00:13:04 eldy Exp $
|
||||||
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -14,12 +14,15 @@ $MINOR="1";
|
|||||||
$BUILD="0-beta"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
$BUILD="0-beta"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
||||||
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
||||||
|
|
||||||
@LISTETARGET=("TGZ","ZIP","RPM","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
@LISTETARGET=("TGZ","ZIP","RPM_GENE","RPM_FEDO","RPM_MAND","RPM_OPEN","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||||
%REQUIREMENTTARGET=( # Tool requirement for each package
|
%REQUIREMENTTARGET=( # Tool requirement for each package
|
||||||
"SNAPSHOT"=>"tar",
|
"SNAPSHOT"=>"tar",
|
||||||
"TGZ"=>"tar",
|
"TGZ"=>"tar",
|
||||||
"ZIP"=>"7z",
|
"ZIP"=>"7z",
|
||||||
"RPM"=>"rpmbuild",
|
"RPM_GENE"=>"rpmbuild",
|
||||||
|
"RPM_FEDO"=>"rpmbuild",
|
||||||
|
"RPM_MAND"=>"rpmbuild",
|
||||||
|
"RPM_OPEN"=>"rpmbuild",
|
||||||
"DEB"=>"dpkg",
|
"DEB"=>"dpkg",
|
||||||
"APS"=>"zip",
|
"APS"=>"zip",
|
||||||
"EXEDOLIWAMP"=>"iscc.exe"
|
"EXEDOLIWAMP"=>"iscc.exe"
|
||||||
@ -48,7 +51,7 @@ if (-d "/usr/src/RPM") {
|
|||||||
|
|
||||||
|
|
||||||
use vars qw/ $REVISION $VERSION /;
|
use vars qw/ $REVISION $VERSION /;
|
||||||
$REVISION='$Revision: 1.133 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
$REVISION='$Revision: 1.135 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
||||||
$VERSION="1.0 (build $REVISION)";
|
$VERSION="1.0 (build $REVISION)";
|
||||||
|
|
||||||
|
|
||||||
@ -135,14 +138,14 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# On demande de choisir le fichier à passer
|
# On demande de choisir le fichier à passer
|
||||||
print "Choose one package number or several separated with space: ";
|
print "Choose one package number or several separated with space (0 - ".$cpt."): ";
|
||||||
$NUM_SCRIPT=<STDIN>;
|
$NUM_SCRIPT=<STDIN>;
|
||||||
chomp($NUM_SCRIPT);
|
chomp($NUM_SCRIPT);
|
||||||
if ($NUM_SCRIPT =~ s/-//g) {
|
if ($NUM_SCRIPT =~ s/-//g) {
|
||||||
# Do not do copy
|
# Do not do copy
|
||||||
$copyalreadydone=1;
|
$copyalreadydone=1;
|
||||||
}
|
}
|
||||||
if ($NUM_SCRIPT !~ /^[0-$cpt\s]+$/)
|
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
|
||||||
{
|
{
|
||||||
print "This is not a valid package number list.\n";
|
print "This is not a valid package number list.\n";
|
||||||
$found = 0;
|
$found = 0;
|
||||||
@ -421,7 +424,7 @@ if ($nboftargetok) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($target eq 'RPM') { # Linux only
|
if ($target =~ /RPM/) { # Linux only
|
||||||
#$ARCH='i386';
|
#$ARCH='i386';
|
||||||
$ARCH='noarch';
|
$ARCH='noarch';
|
||||||
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
|
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
|
||||||
@ -471,6 +474,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/exe`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/exe`;
|
||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/live`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/live`;
|
||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/patch`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/patch`;
|
||||||
|
$ret=`rm -f $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/rpm/conf.php`;
|
||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/zip`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/zip`;
|
||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/perl`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/perl`;
|
||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/dev/dbmodel`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/dev/dbmodel`;
|
||||||
@ -506,6 +510,8 @@ if ($nboftargetok) {
|
|||||||
$ret=`mkdir -p "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT"`;
|
$ret=`mkdir -p "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT"`;
|
||||||
$ret=`cp "$SOURCE/build/rpm/httpd-dolibarr.conf" "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT/apache.conf"`;
|
$ret=`cp "$SOURCE/build/rpm/httpd-dolibarr.conf" "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT/apache.conf"`;
|
||||||
$ret=`cp "$SOURCE/build/rpm/file_contexts.dolibarr" "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT/file_contexts.dolibarr"`;
|
$ret=`cp "$SOURCE/build/rpm/file_contexts.dolibarr" "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT/file_contexts.dolibarr"`;
|
||||||
|
$ret=`cp "$SOURCE/build/rpm/conf.php" "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT/conf.php"`;
|
||||||
|
$ret=`cp "$SOURCE/build/rpm/install.forced.php.install" "$BUILDROOT/$FILENAMETGZ2/etc/$PROJECT/install.forced.php"`;
|
||||||
|
|
||||||
# Dolibarr conf files
|
# Dolibarr conf files
|
||||||
# TODO
|
# TODO
|
||||||
@ -555,9 +561,14 @@ if ($nboftargetok) {
|
|||||||
rename("$BUILDROOT/$FILENAMETGZ2.tgz","$RPMDIR/SOURCES/$FILENAMETGZ2.tgz");
|
rename("$BUILDROOT/$FILENAMETGZ2.tgz","$RPMDIR/SOURCES/$FILENAMETGZ2.tgz");
|
||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
|
|
||||||
$BUILDFIC="$FILENAME.spec";
|
$BUILDFIC="${FILENAME}.spec";
|
||||||
|
$BUILDFICSRC="${FILENAME}_generic.spec";
|
||||||
|
if ($target =~ /FEDO/i) { $BUILDFICSRC="${FILENAME}_fedora.spec"; }
|
||||||
|
if ($target =~ /MAND/i) { $BUILDFICSRC="${FILENAME}_mandriva.spec"; }
|
||||||
|
if ($target =~ /OPEN/i) { $BUILDFICSRC="${FILENAME}_opensuse.spec"; }
|
||||||
|
|
||||||
print "Generate file $BUILDROOT/$BUILDFIC\n";
|
print "Generate file $BUILDROOT/$BUILDFIC\n";
|
||||||
open (SPECFROM,"<$SOURCE/build/rpm/${BUILDFIC}") || die "Error";
|
open (SPECFROM,"<$SOURCE/build/rpm/${BUILDFICSRC}") || die "Error";
|
||||||
open (SPECTO,">$BUILDROOT/$BUILDFIC") || die "Error";
|
open (SPECTO,">$BUILDROOT/$BUILDFIC") || die "Error";
|
||||||
while (<SPECFROM>) {
|
while (<SPECFROM>) {
|
||||||
$_ =~ s/__FILENAMETGZ__/$FILENAMETGZ/;
|
$_ =~ s/__FILENAMETGZ__/$FILENAMETGZ/;
|
||||||
|
|||||||
8
build/rpm/conf.php
Executable file
8
build/rpm/conf.php
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
#
|
||||||
|
# Take a look at conf.php.example file for an example of conf.php file
|
||||||
|
# and explanations for all possibles parameters.
|
||||||
|
#
|
||||||
|
# This file will be filled by installer
|
||||||
|
#
|
||||||
|
?>
|
||||||
233
build/rpm/dolibarr_fedora.spec
Executable file
233
build/rpm/dolibarr_fedora.spec
Executable file
@ -0,0 +1,233 @@
|
|||||||
|
#---------------------------------------------------------
|
||||||
|
# Spec file to build a rpm file
|
||||||
|
#
|
||||||
|
# This is an example to build a rpm file. You can use this
|
||||||
|
# file to build a package for your own distributions and
|
||||||
|
# edit it if you need to match your rules.
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
%define version __VERSION__
|
||||||
|
|
||||||
|
Name: dolibarr
|
||||||
|
Version: %{version}
|
||||||
|
Release: __RELEASE__%{?dist}
|
||||||
|
Summary: ERP and CRM software for small and medium companies or foundations
|
||||||
|
Summary(es): Software ERP y CRM para pequeñas y medianas empresas o, asociaciones o autónomos
|
||||||
|
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs ou associations
|
||||||
|
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||||
|
|
||||||
|
License: GPLv2+
|
||||||
|
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||||
|
Vendor: Dolibarr dev team
|
||||||
|
|
||||||
|
URL: http://www.dolibarr.org
|
||||||
|
Source0: http://www.dolibarr.org/files/fedora/dolibarr-%{version}.tgz
|
||||||
|
BuildArch: noarch
|
||||||
|
#BuildArchitectures: noarch
|
||||||
|
BuildRoot: %{_tmppath}/dolibarr-%{version}-build
|
||||||
|
|
||||||
|
Group: Applications/Internet
|
||||||
|
|
||||||
|
Requires: mysql-server mysql httpd php php-cli php-gd php-ldap php-imap php-mysql
|
||||||
|
|
||||||
|
|
||||||
|
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
||||||
|
AutoReqProv: no
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
An easy to use CRM & ERP open source/free software for small
|
||||||
|
and medium companies, foundations or freelances. It includes different
|
||||||
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
|
Management (CRM) but also for different other activities.
|
||||||
|
Dolibarr was designed to provide only features you need and be easy to
|
||||||
|
use.
|
||||||
|
|
||||||
|
%description -l es
|
||||||
|
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||||
|
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||||
|
de Recursos Empresariales (ERP) y Gestión de la Relación con los
|
||||||
|
Clientes (CRM) así como para para otras diferentes actividades.
|
||||||
|
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
|
||||||
|
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
|
||||||
|
et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||||
|
|
||||||
|
%description -l it
|
||||||
|
Un programmo gestionale per piccole e medie
|
||||||
|
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
|
||||||
|
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
|
||||||
|
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||||
|
ed essere facile da usare.
|
||||||
|
Programmo web, progettato per poter fornire solo ciò di
|
||||||
|
cui hai bisogno ed essere facile da usare.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- prep
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- build
|
||||||
|
%build
|
||||||
|
# Nothing to build
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- install
|
||||||
|
%install
|
||||||
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr
|
||||||
|
%{__install} -m 644 etc/dolibarr/conf.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
%{__install} -m 644 etc/dolibarr/install.forced.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/install.forced.php
|
||||||
|
%{__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
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/dolibarr.png
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications
|
||||||
|
%{__desktop-file-install} -m 644 usr/share/dolibarr/build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/dolibarr.desktop
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/build
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/htdocs
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/scripts
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/build $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/htdocs $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/scripts $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/doc/* $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/COPYRIGHT $RPM_BUILD_ROOT/usr/share/doc/dolibarr/COPYRIGHT
|
||||||
|
|
||||||
|
|
||||||
|
#---- clean
|
||||||
|
%clean
|
||||||
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- files
|
||||||
|
%files
|
||||||
|
|
||||||
|
%defattr(-, root, root, 0755)
|
||||||
|
%doc /usr/share/doc/dolibarr
|
||||||
|
%dir /usr/share/dolibarr/build
|
||||||
|
%dir /usr/share/dolibarr/htdocs
|
||||||
|
%dir /usr/share/dolibarr/scripts
|
||||||
|
%_datadir/pixmaps/dolibarr.png
|
||||||
|
%_datadir/applications/dolibarr.desktop
|
||||||
|
/usr/share/dolibarr/build/*
|
||||||
|
/usr/share/dolibarr/htdocs/*
|
||||||
|
/usr/share/dolibarr/scripts/*
|
||||||
|
|
||||||
|
%defattr(0664, -, -)
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/conf.php
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/apache.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/install.forced.php
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/file_contexts.dolibarr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- post (after unzip during install)
|
||||||
|
%post
|
||||||
|
|
||||||
|
# Define vars
|
||||||
|
export docdir="/var/lib/dolibarr/documents"
|
||||||
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
export apacheuser='apache';
|
||||||
|
export apachegroup='apache';
|
||||||
|
|
||||||
|
# Remove lock file
|
||||||
|
%{__rm} -f $docdir/install.lock
|
||||||
|
|
||||||
|
# Create empty directory for uploaded files and generated documents
|
||||||
|
echo Create document directory $docdir
|
||||||
|
%{__mkdir} -p $docdir
|
||||||
|
|
||||||
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# Create config for se $seconfig
|
||||||
|
echo Add SE Linux permissions for dolibarr
|
||||||
|
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||||
|
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
||||||
|
#semanage fcontext -a -t httpd_sys_script_rw_t "/usr/share/dolibarr(/.*?)"
|
||||||
|
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
||||||
|
restorecon -R -v /etc/dolibarr
|
||||||
|
#restorecon -R -v /usr/share/dolibarr
|
||||||
|
restorecon -R -v /var/lib/dolibarr
|
||||||
|
|
||||||
|
# Create a config link dolibarr.conf
|
||||||
|
if [ ! -L $apachelink ]; then
|
||||||
|
echo Create dolibarr web server config link $apachelink
|
||||||
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
|
%{__chown} -R $apacheuser:$apachegroup /var/lib/dolibarr
|
||||||
|
%{__chmod} -R o-w /var/lib/dolibarr
|
||||||
|
|
||||||
|
# Restart web server
|
||||||
|
echo Restart web server
|
||||||
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
|
fi
|
||||||
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart mysql
|
||||||
|
echo Restart mysql
|
||||||
|
if [ -f /etc/init.d/mysqld ]; then
|
||||||
|
/etc/init.d/mysqld restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show result
|
||||||
|
echo
|
||||||
|
echo "----- Dolibarr %version - (c) Dolibarr dev team -----"
|
||||||
|
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||||
|
echo "To finish installation and use Dolibarr, click on the menu"
|
||||||
|
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||||
|
echo "web browser:"
|
||||||
|
echo "http://localhost/dolibarr/"
|
||||||
|
echo "--------------------------------------------------"
|
||||||
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
#---- postun (after uninstall)
|
||||||
|
%postun
|
||||||
|
|
||||||
|
# Define vars
|
||||||
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
|
# Remove apache link
|
||||||
|
if [ -L $apachelink ] ;
|
||||||
|
then
|
||||||
|
echo Delete apache config link for Dolibarr
|
||||||
|
%{__rm} -f $apachelink
|
||||||
|
status=purge
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart web servers if required
|
||||||
|
if [ "x$status" = "xpurge" ] ;
|
||||||
|
then
|
||||||
|
# Restart web server
|
||||||
|
echo Restart web server
|
||||||
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
|
fi
|
||||||
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jul 31 2011 Laurent Destailleur 3.1.0-0.2.beta1
|
||||||
|
- Initial version (#723326)
|
||||||
151
build/rpm/dolibarr.spec → build/rpm/dolibarr_generic.spec
Normal file → Executable file
151
build/rpm/dolibarr.spec → build/rpm/dolibarr_generic.spec
Normal file → Executable file
@ -6,13 +6,11 @@
|
|||||||
# edit it if you need to match your rules.
|
# edit it if you need to match your rules.
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
%define name dolibarr
|
|
||||||
%define version __VERSION__
|
%define version __VERSION__
|
||||||
%define release __RELEASE__
|
|
||||||
|
|
||||||
Name: %{name}
|
Name: dolibarr
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}
|
Release: __RELEASE__
|
||||||
Summary: ERP and CRM software for small and medium companies or foundations
|
Summary: ERP and CRM software for small and medium companies or foundations
|
||||||
Summary(es): Software ERP y CRM para pequeñas y medianas empresas o, asociaciones o autónomos
|
Summary(es): Software ERP y CRM para pequeñas y medianas empresas o, asociaciones o autónomos
|
||||||
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs ou associations
|
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs ou associations
|
||||||
@ -22,12 +20,11 @@ License: GPLv2+
|
|||||||
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||||
Vendor: Dolibarr dev team
|
Vendor: Dolibarr dev team
|
||||||
|
|
||||||
URL: http://www.%{name}.org
|
URL: http://www.dolibarr.org
|
||||||
Source0: http://www.dolibarr.org/files/fedora/%{name}-%{version}.tgz
|
Source0: http://www.dolibarr.org/files/fedora/dolibarr-%{version}.tgz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
#BuildArchitectures: noarch
|
#BuildArchitectures: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/dolibarr-%{version}-build
|
||||||
#Icon: dolibarr_logo1.gif
|
|
||||||
|
|
||||||
# For Mandriva-Mageia
|
# For Mandriva-Mageia
|
||||||
Group: Networking/WWW
|
Group: Networking/WWW
|
||||||
@ -41,9 +38,6 @@ Requires: mysql-server mysql httpd php php-cli php-gd php-ldap php-imap php-mysq
|
|||||||
# Requires for Mandriva-Mageia
|
# Requires for Mandriva-Mageia
|
||||||
#Requires: mysql mysql-client apache-base apache-mod_php php-cgi php-cli php-bz2 php-gd php-ldap php-imap php-mysqli php-openssl
|
#Requires: mysql mysql-client apache-base apache-mod_php php-cgi php-cli php-bz2 php-gd php-ldap php-imap php-mysqli php-openssl
|
||||||
|
|
||||||
#Requires(pre):
|
|
||||||
#Requires(postun):
|
|
||||||
|
|
||||||
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
|
|
||||||
@ -83,20 +77,23 @@ cui hai bisogno ed essere facile da usare.
|
|||||||
|
|
||||||
#---- prep
|
#---- prep
|
||||||
%prep
|
%prep
|
||||||
echo Building %{name}-%{version}-%{release}
|
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---- build
|
#---- build
|
||||||
%build
|
%build
|
||||||
# Nothing to build
|
# Nothing to build
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---- install
|
#---- install
|
||||||
%install
|
%install
|
||||||
%{__rm} -rf $RPM_BUILD_ROOT
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr
|
||||||
|
%{__install} -m 644 etc/dolibarr/conf.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
%{__install} -m 644 etc/dolibarr/install.forced.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/install.forced.php
|
||||||
%{__install} -m 644 etc/dolibarr/apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/apache.conf
|
%{__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
|
%{__install} -m 644 etc/dolibarr/file_contexts.dolibarr $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/file_contexts.dolibarr
|
||||||
|
|
||||||
@ -108,12 +105,13 @@ echo Building %{name}-%{version}-%{release}
|
|||||||
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/build
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/build
|
||||||
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/htdocs
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/htdocs
|
||||||
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/scripts
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/scripts
|
||||||
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/doc/dolibarr
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
%{__cp} -pr usr/share/dolibarr/build $RPM_BUILD_ROOT/usr/share/dolibarr
|
%{__cp} -pr usr/share/dolibarr/build $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
%{__cp} -pr usr/share/dolibarr/htdocs $RPM_BUILD_ROOT/usr/share/dolibarr
|
%{__cp} -pr usr/share/dolibarr/htdocs $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
%{__cp} -pr usr/share/dolibarr/scripts $RPM_BUILD_ROOT/usr/share/dolibarr
|
%{__cp} -pr usr/share/dolibarr/scripts $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
%{__cp} -pr usr/share/dolibarr/doc/* $RPM_BUILD_ROOT%{_datadir}/doc/dolibarr
|
%{__cp} -pr usr/share/dolibarr/doc/* $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
%{__install} -m 644 usr/share/dolibarr/COPYRIGHT $RPM_BUILD_ROOT%{_datadir}/doc/dolibarr/COPYRIGHT
|
%{__install} -m 644 usr/share/dolibarr/COPYRIGHT $RPM_BUILD_ROOT/usr/share/doc/dolibarr/COPYRIGHT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---- clean
|
#---- clean
|
||||||
@ -121,39 +119,57 @@ echo Building %{name}-%{version}-%{release}
|
|||||||
%{__rm} -rf $RPM_BUILD_ROOT
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---- files
|
#---- files
|
||||||
%files
|
%files
|
||||||
|
|
||||||
%defattr(-,root,root)
|
%defattr(-, root, root, 0755)
|
||||||
%doc %{_datadir}/doc/dolibarr/*
|
%doc /usr/share/doc/dolibarr
|
||||||
%dir /usr/share/dolibarr/build
|
%dir /usr/share/dolibarr/build
|
||||||
%dir /usr/share/dolibarr/htdocs
|
%dir /usr/share/dolibarr/htdocs
|
||||||
%dir /usr/share/dolibarr/scripts
|
%dir /usr/share/dolibarr/scripts
|
||||||
%_datadir/pixmaps/dolibarr.png
|
%_datadir/pixmaps/dolibarr.png
|
||||||
%_datadir/applications/%{name}.desktop
|
%_datadir/applications/dolibarr.desktop
|
||||||
/usr/share/dolibarr/build/*
|
/usr/share/dolibarr/build/*
|
||||||
/usr/share/dolibarr/htdocs/*
|
/usr/share/dolibarr/htdocs/*
|
||||||
/usr/share/dolibarr/scripts/*
|
/usr/share/dolibarr/scripts/*
|
||||||
|
#lang(ar_SA) /usr/share/dolibarr/htdocs/langs/ar_SA
|
||||||
|
#lang(ca_ES) /usr/share/dolibarr/htdocs/langs/ca_ES
|
||||||
|
#lang(da_DK) /usr/share/dolibarr/htdocs/langs/da_DK
|
||||||
|
#lang(de_AT) /usr/share/dolibarr/htdocs/langs/de_AT
|
||||||
|
#lang(de_DE) /usr/share/dolibarr/htdocs/langs/de_DE
|
||||||
|
#lang(el_GR) /usr/share/dolibarr/htdocs/langs/el_GR
|
||||||
|
#lang(en_AU) /usr/share/dolibarr/htdocs/langs/el_AU
|
||||||
|
#lang(en_GB) /usr/share/dolibarr/htdocs/langs/el_GB
|
||||||
|
#lang(en_IN) /usr/share/dolibarr/htdocs/langs/el_IN
|
||||||
|
#lang(en_NZ) /usr/share/dolibarr/htdocs/langs/el_NZ
|
||||||
|
#lang(en) /usr/share/dolibarr/htdocs/langs/en_US
|
||||||
|
#lang(es_AR) /usr/share/dolibarr/htdocs/langs/es_AR
|
||||||
|
#lang(es) /usr/share/dolibarr/htdocs/langs/es_ES
|
||||||
|
#lang(es_HN) /usr/share/dolibarr/htdocs/langs/es_HN
|
||||||
|
#lang(es_MX) /usr/share/dolibarr/htdocs/langs/en_MX
|
||||||
|
#lang(es_PR) /usr/share/dolibarr/htdocs/langs/en_PR
|
||||||
|
#lang(fa_IR) /usr/share/dolibarr/htdocs/langs/fa_IR
|
||||||
|
#lang(fi_FI) /usr/share/dolibarr/htdocs/langs/fi_FI
|
||||||
|
#lang(fr_BE) /usr/share/dolibarr/htdocs/langs/fr_BE
|
||||||
|
#lang(fr_CA) /usr/share/dolibarr/htdocs/langs/fr_CA
|
||||||
|
#lang(fr_CH) /usr/share/dolibarr/htdocs/langs/fr_CH
|
||||||
|
#lang(fr) /usr/share/dolibarr/htdocs/langs/fr_FR
|
||||||
|
|
||||||
%defattr(0664, -, -, 0755)
|
%defattr(0664, -, -)
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/conf.php
|
||||||
%config(noreplace) %{_sysconfdir}/dolibarr/apache.conf
|
%config(noreplace) %{_sysconfdir}/dolibarr/apache.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/install.forced.php
|
||||||
%config(noreplace) %{_sysconfdir}/dolibarr/file_contexts.dolibarr
|
%config(noreplace) %{_sysconfdir}/dolibarr/file_contexts.dolibarr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---- post (after unzip during install)
|
#---- post (after unzip during install)
|
||||||
%post
|
%post
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
# Dolibarr files are stored into /usr/share
|
|
||||||
export targetdir='/usr/share/dolibarr'
|
|
||||||
# Dolibarr uploaded files and generated documents will be stored into docdir
|
|
||||||
export docdir="/var/lib/dolibarr/documents"
|
export docdir="/var/lib/dolibarr/documents"
|
||||||
export installfileorig="$targetdir/build/rpm/install.forced.php.install"
|
|
||||||
export installconfig="%{_sysconfdir}/dolibarr/install.forced.php"
|
export installconfig="%{_sysconfdir}/dolibarr/install.forced.php"
|
||||||
export apachefileorig="$targetdir/build/rpm/httpd-dolibarr.conf"
|
|
||||||
export apacheconfig="%{_sysconfdir}/dolibarr/apache.conf"
|
|
||||||
#export config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
|
||||||
export config="%{_sysconfdir}/dolibarr/conf.php"
|
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
os='unknown';
|
os='unknown';
|
||||||
@ -189,35 +205,24 @@ echo OS detected: $os
|
|||||||
# Create empty directory for uploaded files and generated documents
|
# Create empty directory for uploaded files and generated documents
|
||||||
echo Create document directory $docdir
|
echo Create document directory $docdir
|
||||||
%{__mkdir} -p $docdir
|
%{__mkdir} -p $docdir
|
||||||
%{__mkdir} -p %{_sysconfdir}/dolibarr
|
|
||||||
|
|
||||||
# Create install.forced.php into Dolibarr install directory
|
# Create install.forced.php into Dolibarr install directory
|
||||||
superuserlogin=''
|
if [ "x$os" = "xubuntu-debian" ]
|
||||||
superuserpassword=''
|
|
||||||
if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then
|
|
||||||
# Load superuser login and pass
|
|
||||||
superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g')
|
|
||||||
superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g')
|
|
||||||
fi
|
|
||||||
echo Mysql superuser found to use is $superuserlogin
|
|
||||||
if [ -z "$superuserlogin" ] ; then
|
|
||||||
%{__cat} $installfileorig | sed -e 's/__SUPERUSERLOGIN__/root/g' | sed -e 's/__SUPERUSERPASSWORD__//g' > $installconfig
|
|
||||||
else
|
|
||||||
%{__cat} $installfileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
|
||||||
fi
|
|
||||||
%{__chown} -R root:$apachegroup $installconfig
|
|
||||||
%{__chmod} -R 660 $installconfig
|
|
||||||
|
|
||||||
# Create an empty conf.php with permission to web server
|
|
||||||
if [ ! -f $config ]
|
|
||||||
then
|
then
|
||||||
echo Create empty file $config
|
superuserlogin=''
|
||||||
touch $config
|
superuserpassword=''
|
||||||
%{__chown} -R root:$apachegroup $config
|
if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then
|
||||||
%{__chmod} -R 660 $config
|
# Load superuser login and pass
|
||||||
|
superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g')
|
||||||
|
superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g')
|
||||||
|
fi
|
||||||
|
echo Mysql superuser found to use is $superuserlogin
|
||||||
|
%{__cat} /usr/share/dolibarr/build/rpm/install.forced.php.install | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
||||||
|
%{__chmod} -R 660 $installconfig
|
||||||
fi
|
fi
|
||||||
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
# Create config file for se $seconfig
|
# Create config for se $seconfig
|
||||||
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
||||||
echo Add SE Linux permissions for dolibarr
|
echo Add SE Linux permissions for dolibarr
|
||||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||||
@ -230,17 +235,11 @@ if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -f $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
echo Create dolibarr web server config link $apachelink
|
echo Create dolibarr web server config link $apachelink
|
||||||
ln -fs $apacheconfig $apachelink
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set permissions
|
|
||||||
echo Set permission to $apacheuser:$apachegroup on $targetdir
|
|
||||||
%{__chown} -R $apacheuser:$apachegroup $targetdir
|
|
||||||
%{__chmod} -R a-w $targetdir
|
|
||||||
%{__chmod} u+w $targetdir
|
|
||||||
|
|
||||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
%{__chown} -R $apacheuser:$apachegroup /var/lib/dolibarr
|
%{__chown} -R $apacheuser:$apachegroup /var/lib/dolibarr
|
||||||
%{__chmod} -R o-w /var/lib/dolibarr
|
%{__chmod} -R o-w /var/lib/dolibarr
|
||||||
@ -264,7 +263,7 @@ fi
|
|||||||
echo
|
echo
|
||||||
echo "----- Dolibarr %version - (c) Dolibarr dev team -----"
|
echo "----- Dolibarr %version - (c) Dolibarr dev team -----"
|
||||||
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||||
echo "To finish installation and use Dolibarr, click on ne menu"
|
echo "To finish installation and use Dolibarr, click on the menu"
|
||||||
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||||
echo "web browser:"
|
echo "web browser:"
|
||||||
echo "http://localhost/dolibarr/"
|
echo "http://localhost/dolibarr/"
|
||||||
@ -272,52 +271,31 @@ echo "--------------------------------------------------"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---- postun (after uninstall)
|
#---- postun (after uninstall)
|
||||||
%postun
|
%postun
|
||||||
|
|
||||||
# Define vars
|
|
||||||
# Dolibarr files are stored into targetdir
|
|
||||||
export targetdir='/usr/share/dolibarr'
|
|
||||||
# Dolibarr uploaded files and generated documents will be stored into docdir
|
|
||||||
export docdir="/var/lib/dolibarr/documents"
|
|
||||||
export installfileorig="$targetdir/build/rpm/install.forced.php.install"
|
|
||||||
export installconfig="%{_sysconfdir}/dolibarr/install.forced.php"
|
|
||||||
export apachefileorig="$targetdir/build/rpm/httpd-dolibarr.conf"
|
|
||||||
export apacheconfig="%{_sysconfdir}/dolibarr/apache.conf"
|
|
||||||
#export config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
|
||||||
export config="%{_sysconfdir}/dolibarr/conf.php"
|
|
||||||
|
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
os='unknown';
|
os='unknown';
|
||||||
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
||||||
export os='fedora-redhat';
|
export os='fedora-redhat';
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
export apacheuser='apache';
|
|
||||||
export apachegroup='apache';
|
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
||||||
export os='opensuse';
|
export os='opensuse';
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
export apacheuser='wwwrun';
|
|
||||||
export apachegroup='www';
|
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
||||||
export os='mageia-mandriva';
|
export os='mageia-mandriva';
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
export apacheuser='apache';
|
|
||||||
export apachegroup='apache';
|
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
||||||
export os='ubuntu-debian';
|
export os='ubuntu-debian';
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
export apacheuser='www-data';
|
|
||||||
export apachegroup='www-data';
|
|
||||||
fi
|
fi
|
||||||
echo OS detected: $os
|
|
||||||
|
|
||||||
# Remove apache link
|
# Remove apache link
|
||||||
if [ -f $apachelink ] ;
|
if [ -L $apachelink ] ;
|
||||||
then
|
then
|
||||||
echo Delete apache config link for Dolibarr
|
echo Delete apache config link for Dolibarr
|
||||||
%{__rm} -f $apachelink
|
%{__rm} -f $apachelink
|
||||||
@ -337,13 +315,6 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Removed dirs after apache restart
|
|
||||||
echo Removed remaining $config
|
|
||||||
%{__rm} -f $config
|
|
||||||
echo Removed remaining $installconfig
|
|
||||||
%{__rm} -f $installconfig
|
|
||||||
echo Removed remaining $docdir/install.lock
|
|
||||||
%{__rm} -f $docdir/install.lock
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
223
build/rpm/dolibarr_mandriva.spec
Executable file
223
build/rpm/dolibarr_mandriva.spec
Executable file
@ -0,0 +1,223 @@
|
|||||||
|
#---------------------------------------------------------
|
||||||
|
# Spec file to build a rpm file
|
||||||
|
#
|
||||||
|
# This is an example to build a rpm file. You can use this
|
||||||
|
# file to build a package for your own distributions and
|
||||||
|
# edit it if you need to match your rules.
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
%define version __VERSION__
|
||||||
|
|
||||||
|
Name: dolibarr
|
||||||
|
Version: %{version}
|
||||||
|
Release: __RELEASE__
|
||||||
|
Summary: ERP and CRM software for small and medium companies or foundations
|
||||||
|
Summary(es): Software ERP y CRM para pequeñas y medianas empresas o, asociaciones o autónomos
|
||||||
|
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs ou associations
|
||||||
|
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||||
|
|
||||||
|
License: GPLv2+
|
||||||
|
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||||
|
Vendor: Dolibarr dev team
|
||||||
|
|
||||||
|
URL: http://www.dolibarr.org
|
||||||
|
Source0: http://www.dolibarr.org/files/mandriva/dolibarr-%{version}.tgz
|
||||||
|
BuildArch: noarch
|
||||||
|
#BuildArchitectures: noarch
|
||||||
|
BuildRoot: %{_tmppath}/dolibarr-%{version}-build
|
||||||
|
|
||||||
|
Group: Networking/WWW
|
||||||
|
|
||||||
|
Requires: mysql mysql-client apache-base apache-mod_php php-cgi php-cli php-bz2 php-gd php-ldap php-imap php-mysqli php-openssl
|
||||||
|
|
||||||
|
|
||||||
|
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
||||||
|
AutoReqProv: no
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
An easy to use CRM & ERP open source/free software for small
|
||||||
|
and medium companies, foundations or freelances. It includes different
|
||||||
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
|
Management (CRM) but also for different other activities.
|
||||||
|
Dolibarr was designed to provide only features you need and be easy to
|
||||||
|
use.
|
||||||
|
|
||||||
|
%description -l es
|
||||||
|
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||||
|
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||||
|
de Recursos Empresariales (ERP) y Gestión de la Relación con los
|
||||||
|
Clientes (CRM) así como para para otras diferentes actividades.
|
||||||
|
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
|
||||||
|
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
|
||||||
|
et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||||
|
|
||||||
|
%description -l it
|
||||||
|
Un programmo gestionale per piccole e medie
|
||||||
|
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
|
||||||
|
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
|
||||||
|
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||||
|
ed essere facile da usare.
|
||||||
|
Programmo web, progettato per poter fornire solo ciò di
|
||||||
|
cui hai bisogno ed essere facile da usare.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- prep
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- build
|
||||||
|
%build
|
||||||
|
# Nothing to build
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- install
|
||||||
|
%install
|
||||||
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr
|
||||||
|
%{__install} -m 644 etc/dolibarr/conf.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
%{__install} -m 644 etc/dolibarr/install.forced.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/install.forced.php
|
||||||
|
%{__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
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/dolibarr.png
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/dolibarr.desktop
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/build
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/htdocs
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/scripts
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/build $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/htdocs $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/scripts $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/doc/* $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/COPYRIGHT $RPM_BUILD_ROOT/usr/share/doc/dolibarr/COPYRIGHT
|
||||||
|
|
||||||
|
|
||||||
|
#---- clean
|
||||||
|
%clean
|
||||||
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- files
|
||||||
|
%files
|
||||||
|
|
||||||
|
%defattr(-, root, root, 0755)
|
||||||
|
%doc /usr/share/doc/dolibarr
|
||||||
|
%dir /usr/share/dolibarr/build
|
||||||
|
%dir /usr/share/dolibarr/htdocs
|
||||||
|
%dir /usr/share/dolibarr/scripts
|
||||||
|
%_datadir/pixmaps/dolibarr.png
|
||||||
|
%_datadir/applications/dolibarr.desktop
|
||||||
|
/usr/share/dolibarr/build/*
|
||||||
|
/usr/share/dolibarr/htdocs/*
|
||||||
|
/usr/share/dolibarr/scripts/*
|
||||||
|
|
||||||
|
%defattr(0664, -, -)
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/conf.php
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/apache.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/install.forced.php
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/file_contexts.dolibarr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- post (after unzip during install)
|
||||||
|
%post
|
||||||
|
|
||||||
|
# Define vars
|
||||||
|
export docdir="/var/lib/dolibarr/documents"
|
||||||
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
export apacheuser='apache';
|
||||||
|
export apachegroup='apache';
|
||||||
|
|
||||||
|
# Remove lock file
|
||||||
|
%{__rm} -f $docdir/install.lock
|
||||||
|
|
||||||
|
# Create empty directory for uploaded files and generated documents
|
||||||
|
echo Create document directory $docdir
|
||||||
|
%{__mkdir} -p $docdir
|
||||||
|
|
||||||
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# Create a config link dolibarr.conf
|
||||||
|
if [ ! -L $apachelink ]; then
|
||||||
|
echo Create dolibarr web server config link $apachelink
|
||||||
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
|
%{__chown} -R $apacheuser:$apachegroup /var/lib/dolibarr
|
||||||
|
%{__chmod} -R o-w /var/lib/dolibarr
|
||||||
|
|
||||||
|
# Restart web server
|
||||||
|
echo Restart web server
|
||||||
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
|
fi
|
||||||
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart mysql
|
||||||
|
echo Restart mysql
|
||||||
|
if [ -f /etc/init.d/mysqld ]; then
|
||||||
|
/etc/init.d/mysqld restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show result
|
||||||
|
echo
|
||||||
|
echo "----- Dolibarr %version - (c) Dolibarr dev team -----"
|
||||||
|
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||||
|
echo "To finish installation and use Dolibarr, click on the menu"
|
||||||
|
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||||
|
echo "web browser:"
|
||||||
|
echo "http://localhost/dolibarr/"
|
||||||
|
echo "--------------------------------------------------"
|
||||||
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
#---- postun (after uninstall)
|
||||||
|
%postun
|
||||||
|
|
||||||
|
# Define vars
|
||||||
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
|
# Remove apache link
|
||||||
|
if [ -L $apachelink ] ;
|
||||||
|
then
|
||||||
|
echo Delete apache config link for Dolibarr
|
||||||
|
%{__rm} -f $apachelink
|
||||||
|
status=purge
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart web servers if required
|
||||||
|
if [ "x$status" = "xpurge" ] ;
|
||||||
|
then
|
||||||
|
# Restart web server
|
||||||
|
echo Restart web server
|
||||||
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
|
fi
|
||||||
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jul 31 2011 Laurent Destailleur 3.1.0-0.2.beta1
|
||||||
|
- Initial version (#723326)
|
||||||
222
build/rpm/dolibarr_opensuse.spec
Executable file
222
build/rpm/dolibarr_opensuse.spec
Executable file
@ -0,0 +1,222 @@
|
|||||||
|
#---------------------------------------------------------
|
||||||
|
# Spec file to build a rpm file
|
||||||
|
#
|
||||||
|
# This is an example to build a rpm file. You can use this
|
||||||
|
# file to build a package for your own distributions and
|
||||||
|
# edit it if you need to match your rules.
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
%define version __VERSION__
|
||||||
|
|
||||||
|
Name: dolibarr
|
||||||
|
Version: %{version}
|
||||||
|
Release: __RELEASE__
|
||||||
|
Summary: ERP and CRM software for small and medium companies or foundations
|
||||||
|
Summary(es): Software ERP y CRM para pequeñas y medianas empresas o, asociaciones o autónomos
|
||||||
|
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs ou associations
|
||||||
|
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||||
|
|
||||||
|
License: GPLv2+
|
||||||
|
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||||
|
Vendor: Dolibarr dev team
|
||||||
|
|
||||||
|
URL: http://www.dolibarr.org
|
||||||
|
Source0: http://www.dolibarr.org/files/opensuse/dolibarr-%{version}.tgz
|
||||||
|
BuildArch: noarch
|
||||||
|
#BuildArchitectures: noarch
|
||||||
|
BuildRoot: %{_tmppath}/dolibarr-%{version}-build
|
||||||
|
|
||||||
|
Group: Applications/Internet
|
||||||
|
|
||||||
|
Requires: mysql-community-server mysql-community-server-client apache2 apache2-mod_php5 php5 php5-gd php5-ldap php5-imap php5-mysql php5-openssl
|
||||||
|
|
||||||
|
|
||||||
|
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
||||||
|
AutoReqProv: no
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
An easy to use CRM & ERP open source/free software for small
|
||||||
|
and medium companies, foundations or freelances. It includes different
|
||||||
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
|
Management (CRM) but also for different other activities.
|
||||||
|
Dolibarr was designed to provide only features you need and be easy to
|
||||||
|
use.
|
||||||
|
|
||||||
|
%description -l es
|
||||||
|
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||||
|
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||||
|
de Recursos Empresariales (ERP) y Gestión de la Relación con los
|
||||||
|
Clientes (CRM) así como para para otras diferentes actividades.
|
||||||
|
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
|
||||||
|
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
|
||||||
|
et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||||
|
|
||||||
|
%description -l it
|
||||||
|
Un programmo gestionale per piccole e medie
|
||||||
|
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
|
||||||
|
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
|
||||||
|
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||||
|
ed essere facile da usare.
|
||||||
|
Programmo web, progettato per poter fornire solo ciò di
|
||||||
|
cui hai bisogno ed essere facile da usare.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- prep
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
|
#---- build
|
||||||
|
%build
|
||||||
|
# Nothing to build
|
||||||
|
|
||||||
|
|
||||||
|
#---- install
|
||||||
|
%install
|
||||||
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr
|
||||||
|
%{__install} -m 644 etc/dolibarr/conf.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
%{__install} -m 644 etc/dolibarr/install.forced.php $RPM_BUILD_ROOT%{_sysconfdir}/dolibarr/install.forced.php
|
||||||
|
%{__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
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/dolibarr.png
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/dolibarr.desktop
|
||||||
|
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/build
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/htdocs
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/dolibarr/scripts
|
||||||
|
%{__mkdir} -p $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/build $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/htdocs $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/scripts $RPM_BUILD_ROOT/usr/share/dolibarr
|
||||||
|
%{__cp} -pr usr/share/dolibarr/doc/* $RPM_BUILD_ROOT/usr/share/doc/dolibarr
|
||||||
|
%{__install} -m 644 usr/share/dolibarr/COPYRIGHT $RPM_BUILD_ROOT/usr/share/doc/dolibarr/COPYRIGHT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- clean
|
||||||
|
%clean
|
||||||
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- files
|
||||||
|
%files
|
||||||
|
|
||||||
|
%defattr(-, root, root, 0755)
|
||||||
|
%doc /usr/share/doc/dolibarr
|
||||||
|
%dir /usr/share/dolibarr/build
|
||||||
|
%dir /usr/share/dolibarr/htdocs
|
||||||
|
%dir /usr/share/dolibarr/scripts
|
||||||
|
%_datadir/pixmaps/dolibarr.png
|
||||||
|
%_datadir/applications/dolibarr.desktop
|
||||||
|
/usr/share/dolibarr/build/*
|
||||||
|
/usr/share/dolibarr/htdocs/*
|
||||||
|
/usr/share/dolibarr/scripts/*
|
||||||
|
|
||||||
|
%defattr(0664, -, -)
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/conf.php
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/apache.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/install.forced.php
|
||||||
|
%config(noreplace) %{_sysconfdir}/dolibarr/file_contexts.dolibarr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---- post (after unzip during install)
|
||||||
|
%post
|
||||||
|
|
||||||
|
# Define vars
|
||||||
|
export docdir="/var/lib/dolibarr/documents"
|
||||||
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
|
export apacheuser='wwwrun';
|
||||||
|
export apachegroup='www';
|
||||||
|
|
||||||
|
# Remove lock file
|
||||||
|
%{__rm} -f $docdir/install.lock
|
||||||
|
|
||||||
|
# Create empty directory for uploaded files and generated documents
|
||||||
|
echo Create document directory $docdir
|
||||||
|
%{__mkdir} -p $docdir
|
||||||
|
|
||||||
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# Create a config link dolibarr.conf
|
||||||
|
if [ ! -L $apachelink ]; then
|
||||||
|
echo Create dolibarr web server config link $apachelink
|
||||||
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
|
%{__chown} -R $apacheuser:$apachegroup /var/lib/dolibarr
|
||||||
|
%{__chmod} -R o-w /var/lib/dolibarr
|
||||||
|
|
||||||
|
# Restart web server
|
||||||
|
echo Restart web server
|
||||||
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
|
fi
|
||||||
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart mysql
|
||||||
|
echo Restart mysql
|
||||||
|
if [ -f /etc/init.d/mysqld ]; then
|
||||||
|
/etc/init.d/mysqld restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show result
|
||||||
|
echo
|
||||||
|
echo "----- Dolibarr %version - (c) Dolibarr dev team -----"
|
||||||
|
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||||
|
echo "To finish installation and use Dolibarr, click on the menu"
|
||||||
|
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||||
|
echo "web browser:"
|
||||||
|
echo "http://localhost/dolibarr/"
|
||||||
|
echo "--------------------------------------------------"
|
||||||
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
#---- postun (after uninstall)
|
||||||
|
%postun
|
||||||
|
|
||||||
|
# Define vars
|
||||||
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
|
# Remove apache link
|
||||||
|
if [ -L $apachelink ] ;
|
||||||
|
then
|
||||||
|
echo Delete apache config link for Dolibarr
|
||||||
|
%{__rm} -f $apachelink
|
||||||
|
status=purge
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart web servers if required
|
||||||
|
if [ "x$status" = "xpurge" ] ;
|
||||||
|
then
|
||||||
|
# Restart web server
|
||||||
|
echo Restart web server
|
||||||
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
|
fi
|
||||||
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jul 31 2011 Laurent Destailleur 3.1.0-0.2.beta1
|
||||||
|
- Initial version (#723326)
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$force_install_noedit=2;
|
$force_install_noedit=1; # 1 to block var specific to distrib, 2 to block every technical parameters
|
||||||
$force_install_message='KeepDefaultValuesDeb';
|
$force_install_message='KeepDefaultValuesDeb';
|
||||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||||
$force_install_type='mysqli';
|
$force_install_type='mysqli';
|
||||||
|
|||||||
@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p><a class="lien1" href="<?php echo DOL_URL_ROOT ?>/compta/facture.php?facid=<?php echo $_GET['facid']; ?>" target="_blank"><?php echo $langs->trans("ShowInvoice"); ?></a></p>
|
<p><a class="lien1" href="<?php echo DOL_URL_ROOT ?>/compta/facture.php?action=builddoc&facid=<?php echo $_GET['facid']; ?>" target="_blank"><?php echo $langs->trans("ShowInvoice"); ?></a></p>
|
||||||
<br>
|
<br>
|
||||||
<p><a class="lien1" href="#" onclick="Javascript: popupTicket(); return(false);"><?php echo $langs->trans("PrintTicket"); ?></a></p>
|
<p><a class="lien1" href="#" onclick="Javascript: popupTicket(); return(false);"><?php echo $langs->trans("PrintTicket"); ?></a></p>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/compta/resultat/clientfourn.php
|
* \file htdocs/compta/resultat/clientfourn.php
|
||||||
* \brief Page reporting
|
* \brief Page reporting
|
||||||
* \version $Id: clientfourn.php,v 1.63 2011/08/03 00:46:31 eldy Exp $
|
* \version $Id: clientfourn.php,v 1.64 2011/08/06 18:44:59 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
@ -105,7 +105,7 @@ $html=new Form($db);
|
|||||||
if ($modecompta=="CREANCES-DETTES")
|
if ($modecompta=="CREANCES-DETTES")
|
||||||
{
|
{
|
||||||
$nom=$langs->trans("AnnualByCompaniesDueDebtMode");
|
$nom=$langs->trans("AnnualByCompaniesDueDebtMode");
|
||||||
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||||
$description=$langs->trans("RulesResultDue");
|
$description=$langs->trans("RulesResultDue");
|
||||||
@ -114,7 +114,7 @@ if ($modecompta=="CREANCES-DETTES")
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$nom=$langs->trans("AnnualByCompaniesInputOutputMode");
|
$nom=$langs->trans("AnnualByCompaniesInputOutputMode");
|
||||||
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
|
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||||
//$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
//$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
||||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||||
@ -663,8 +663,8 @@ else
|
|||||||
if ($mysoc->tva_assuj != 'franchise') // Assujeti
|
if ($mysoc->tva_assuj != 'franchise') // Assujeti
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES') print '<td colspan="3" align="right">'.price($subtotal_ht).'</td>';
|
if ($modecompta == 'CREANCES-DETTES') print '<td colspan="3" align="right">'.price(price2num($subtotal_ht)).'</td>';
|
||||||
print '<td colspan="3" align="right">'.price($subtotal_ttc).'</td>';
|
print '<td colspan="3" align="right">'.price(price2num($subtotal_ttc)).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -677,8 +677,8 @@ if ($mysoc->tva_assuj != 'franchise') // Assujeti
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("Profit").'</td>';
|
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("Profit").'</td>';
|
||||||
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_total" align="right">'.price($total_ht).'</td>';
|
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_total" align="right">'.price(price2num($total_ht)).'</td>';
|
||||||
print '<td class="liste_total" align="right">'.price($total_ttc).'</td>';
|
print '<td class="liste_total" align="right">'.price(price2num($total_ttc)).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -688,5 +688,5 @@ print '<br>';
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/03 00:46:31 $ - $Revision: 1.63 $');
|
llxFooter('$Date: 2011/08/06 18:44:59 $ - $Revision: 1.64 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \file htdocs/install/fileconf.php
|
* \file htdocs/install/fileconf.php
|
||||||
* \ingroup install
|
* \ingroup install
|
||||||
* \brief Ask all informations required to build Dolibarr htdocs/conf/conf.php file (will be wrote on disk on next page)
|
* \brief Ask all informations required to build Dolibarr htdocs/conf/conf.php file (will be wrote on disk on next page)
|
||||||
* \version $Id: fileconf.php,v 1.94 2011/07/31 23:26:27 eldy Exp $
|
* \version $Id: fileconf.php,v 1.95 2011/08/06 23:10:01 eldy Exp $
|
||||||
*/
|
*/
|
||||||
include_once("./inc.php");
|
include_once("./inc.php");
|
||||||
|
|
||||||
@ -161,8 +161,8 @@ if (! empty($force_install_message))
|
|||||||
?>
|
?>
|
||||||
<td class="label" valign="top">
|
<td class="label" valign="top">
|
||||||
<?php
|
<?php
|
||||||
if ($force_install_noedit == 2) print '<input type="hidden" value="'.$dolibarr_main_data_root.'" name="main_data_dir">';
|
if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_data_root.'" name="main_data_dir">';
|
||||||
print '<input type="text" size="60" value="'.$dolibarr_main_data_root.'"'.(($force_install_noedit != 2)?'':' disabled="true"').' name="main_data_dir'.(($force_install_noedit != 2)?'':'_bis').'">';
|
print '<input type="text" size="60" value="'.$dolibarr_main_data_root.'"'.(empty($force_install_noedit)?'':' disabled="true"').' name="main_data_dir'.(empty($force_install_noedit)?'':'_bis').'">';
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php
|
<td class="comment"><?php
|
||||||
@ -210,8 +210,8 @@ if (empty($dolibarr_main_url_root))
|
|||||||
</td>
|
</td>
|
||||||
<td valign="top" class="label">
|
<td valign="top" class="label">
|
||||||
<?php
|
<?php
|
||||||
if ($force_install_noedit == 2) print '<input type="hidden" value="'.$dolibarr_main_url_root.'" name="main_url">';
|
if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_url_root.'" name="main_url">';
|
||||||
print '<input type="text" size="60" value="'.$dolibarr_main_url_root.'"'.(($force_install_noedit != 2)?'':' disabled="true"').' name="main_url'.(($force_install_noedit != 2)?'':'_bis').'">';
|
print '<input type="text" size="60" value="'.$dolibarr_main_url_root.'"'.(empty($force_install_noedit)?'':' disabled="true"').' name="main_url'.(empty($force_install_noedit)?'':'_bis').'">';
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php print $langs->trans("Examples").":<br>"; ?>
|
<td class="comment"><?php print $langs->trans("Examples").":<br>"; ?>
|
||||||
@ -321,10 +321,10 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="top" class="label"><b> <?php echo $langs->trans("Server"); ?>
|
<td valign="top" class="label"><b> <?php echo $langs->trans("Server"); ?>
|
||||||
</b></td>
|
</b></td>
|
||||||
<td valign="top" class="label"><input type="text" name="db_host<?php print (!empty($force_install_noedit) && $force_install_dbserver)?'_bis':''; ?>"
|
<td valign="top" class="label"><input type="text" name="db_host<?php print ($force_install_noedit==2 && $force_install_dbserver)?'_bis':''; ?>"
|
||||||
<?php if (!empty($force_install_noedit) && $force_install_dbserver) print ' disabled="disabled"'; ?>
|
<?php if ($force_install_noedit==2 && $force_install_dbserver) print ' disabled="disabled"'; ?>
|
||||||
value="<?php print (! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:(empty($force_install_dbserver)?'localhost':$force_install_dbserver); ?>">
|
value="<?php print (! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:(empty($force_install_dbserver)?'localhost':$force_install_dbserver); ?>">
|
||||||
<?php if (!empty($force_install_noedit) && $force_install_dbserver) print '<input type="hidden" name="db_host" value="'.((! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:$force_install_dbserver).'">'; ?>
|
<?php if ($force_install_noedit==2 && $force_install_dbserver) print '<input type="hidden" name="db_host" value="'.((! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:$force_install_dbserver).'">'; ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("ServerAddressDescription"); ?>
|
<td class="comment"><?php echo $langs->trans("ServerAddressDescription"); ?>
|
||||||
</td>
|
</td>
|
||||||
@ -333,10 +333,10 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" class="label"><?php echo $langs->trans("Port"); ?></td>
|
<td valign="top" class="label"><?php echo $langs->trans("Port"); ?></td>
|
||||||
<td valign="top" class="label"><input type="text" name="db_port<?php print (!empty($force_install_noedit) && $force_install_port)?'_bis':''; ?>"
|
<td valign="top" class="label"><input type="text" name="db_port<?php print ($force_install_noedit==2 && $force_install_port)?'_bis':''; ?>"
|
||||||
<?php if (!empty($force_install_noedit) && $force_install_port) print ' disabled="disabled"'; ?>
|
<?php if ($force_install_noedit==2 && $force_install_port) print ' disabled="disabled"'; ?>
|
||||||
value="<?php print (! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port; ?>">
|
value="<?php print (! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port; ?>">
|
||||||
<?php if (!empty($force_install_noedit) && $force_install_port) print '<input type="hidden" name="db_port" value="'.((! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port).'">'; ?>
|
<?php if ($force_install_noedit==2 && $force_install_port) print '<input type="hidden" name="db_port" value="'.((! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port).'">'; ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("ServerPortDescription"); ?>
|
<td class="comment"><?php echo $langs->trans("ServerPortDescription"); ?>
|
||||||
</td>
|
</td>
|
||||||
@ -390,7 +390,10 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
|||||||
|
|
||||||
|
|
||||||
<!-- Super access -->
|
<!-- Super access -->
|
||||||
|
<?php
|
||||||
|
$force_install_databaserootlogin=preg_replace('/__SUPERUSERLOGIN__/','root',$force_install_databaserootlogin);
|
||||||
|
$force_install_databaserootpass=preg_replace('/__SUPERUSERPASSWORD__/','',$force_install_databaserootpass);
|
||||||
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="label" align="center"><br>
|
<td colspan="3" class="label" align="center"><br>
|
||||||
<h3><?php echo $langs->trans("DatabaseSuperUserAccess"); ?></h3>
|
<h3><?php echo $langs->trans("DatabaseSuperUserAccess"); ?></h3>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user