wok-next diff dolibarr/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | a3c581bf52b8 |
children | 0cbe4b1f2230 |
line diff
1.1 --- a/dolibarr/receipt Fri Aug 10 12:53:17 2018 +0300 1.2 +++ b/dolibarr/receipt Fri Nov 02 14:15:08 2018 +0200 1.3 @@ -4,21 +4,16 @@ 1.4 VERSION="3.1.0" 1.5 CATEGORY="office" 1.6 SHORT_DESC="ERP/CRM" 1.7 -MAINTAINER="erjo@slitaz.org" 1.8 +MAINTAINER="devel@slitaz.org" 1.9 LICENSE="LGPL2" 1.10 WEB_SITE="https://www.dolibarr.fr/" 1.11 + 1.12 TARBALL="$PACKAGE-$VERSION.tgz" 1.13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.14 1.15 -DEPENDS="apache php-apache php-gd php-mysqli" 1.16 -BUILD_DEPENDS="" 1.17 1.18 -# Rules to configure and make the package. 1.19 -compile_rules() 1.20 -{ 1.21 - cd $src 1.22 - 1.23 - # Fix attributs and perms 1.24 +compile_rules() { 1.25 + # Fix attributes and perms 1.26 chown -R root.root * 1.27 chmod -x C* I* R* 1.28 find . \( -name "*.php" \ 1.29 @@ -30,47 +25,42 @@ 1.30 -o -name "*.html" \) -exec chmod -x {} \; 1.31 } 1.32 1.33 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.34 -genpkg_rules() 1.35 -{ 1.36 - 1.37 +genpkg_rules() { 1.38 mkdir -p $fs/etc/dolibarr \ 1.39 $fs/usr/share/dolibarr \ 1.40 $fs/var/lib/dolibarr/documents \ 1.41 $fs/usr/share/doc/$PACKAGE/schemas \ 1.42 - $fs/usr/share/applications 1.43 - 1.44 - 1.45 + $fs/usr/share/applications 1.46 + 1.47 cp -a $src/htdocs $fs/usr/share/dolibarr 1.48 cp -a $src/scripts $fs/usr/share/dolibarr 1.49 - 1.50 + 1.51 # Remove install directory 1.52 #rm -rf $fs/usr/share/dolibarr/htdocs/install 1.53 - 1.54 + 1.55 # Populate documents directory 1.56 - for dir in facture users propale mycompany ficheinter produit rapport 1.57 - do 1.58 + for dir in facture users propale mycompany ficheinter produit rapport; do 1.59 mkdir $fs/var/lib/dolibarr/documents/$dir 1.60 done 1.61 - 1.62 + 1.63 # Fix perms 1.64 chown -R root.www $fs/var/lib/dolibarr/documents 1.65 chmod -R 770 $fs/var/lib/dolibarr/documents 1.66 - 1.67 + 1.68 cp $stuff/conf.php $fs/etc/dolibarr 1.69 cp $stuff/$PACKAGE-$VERSION-mysql.sql $fs/usr/share/doc/$PACKAGE/schemas 1.70 cp -a $stuff/pixmaps $fs/usr/share/ 1.71 - 1.72 + 1.73 ln -s /etc/dolibarr/conf.php $fs/usr/share/dolibarr/htdocs/conf 1.74 - 1.75 + DEPENDS="apache php-apache php-gd php-mysqli" 1.76 } 1.77 1.78 post_install(){ 1.79 - 1.80 + 1.81 db_name=dolibarr 1.82 db_user=dolibarr 1.83 db_password=dolibarr 1.84 - 1.85 + 1.86 # Configure apache server 1.87 if [ -f "$1/etc/apache/httpd.conf" ]; then 1.88 if [ ! -f "$1/etc/apache/conf.d/dolibarr.conf" ]; then 1.89 @@ -88,32 +78,35 @@ 1.90 EOT 1.91 if [ -z "$1" ]; then 1.92 # Start Web server. 1.93 - test -f /var/run/apache/httpd.pid && \ 1.94 + test -f /var/run/apache/httpd.pid && 1.95 ( kill -0 $(cat /var/run/apache/httpd.pid) && /etc/init.d/apache restart ) 1.96 fi 1.97 fi 1.98 fi 1.99 - 1.100 + 1.101 # Configure every thing. 1.102 if [ -z "$1" ]; then 1.103 if ( ! mysqladmin -s ping > /dev/null ); then 1.104 echo "Starting MySQL server" 1.105 - ( /etc/init.d/mysql start ; status ) || exit 1.106 - sleep 4 #let the mysql daemon start 1.107 + ( /etc/init.d/mysql start; status ) || exit 1.108 + sleep 4 # let the mysql daemon start 1.109 fi 1.110 if ( ! mysql -u root -Be 'show databases' | grep -q $db_name ); then 1.111 - echo -n "Create $db_name database" 1.112 - mysql -Be "create database $db_name" ; status 1.113 + action "Create $db_name database" 1.114 + mysql -Be "create database $db_name" 1.115 + status 1.116 + 1.117 # We suppose that databse user does not exist. 1.118 # It may be false. 1.119 - echo -n "Create user $db_user with password $db_password" 1.120 - mysql -Be "grant all privileges on ${db_name}.* to '$db_user'@'localhost' 1.121 - identified by '$db_password'" ; status 1.122 + action "Create user $db_user with password $db_password" 1.123 + mysql -Be "grant all privileges on ${db_name}.* to '$db_user'@'localhost' 1.124 + identified by '$db_password'" 1.125 + status 1.126 + 1.127 # At last populate the database. 1.128 - echo -n "Create $db_name database schema." 1.129 - mysql -u $db_user -p${db_password} -D $db_name < /usr/share/doc/dolibarr/schemas/$PACKAGE-$VERSION-mysql.sql ; status 1.130 - 1.131 + action "Create $db_name database schema." 1.132 + mysql -u $db_user -p${db_password} -D $db_name < /usr/share/doc/dolibarr/schemas/$PACKAGE-$VERSION-mysql.sql 1.133 + status 1.134 fi 1.135 - 1.136 fi 1.137 }