wok annotate dolibarr/receipt @ rev 24361

glibmm, glibmm-dev: fix Private:gobj()
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 04 09:24:50 2022 +0000 (2022-02-04)
parents 261355c410d6
children c6a87148ec80
rev   line source
erjo@11794 1 # SliTaz package receipt.
erjo@11794 2
erjo@11794 3 PACKAGE="dolibarr"
Hans-G?nter@22737 4 VERSION="10.0.6"
erjo@11794 5 CATEGORY="office"
Hans-G?nter@22737 6 SHORT_DESC="ERP/CRM for small and medium companies."
erjo@11794 7 MAINTAINER="erjo@slitaz.org"
Hans-G?nter@20842 8 LICENSE="GPLv3"
pascal@22829 9 WEB_SITE="https://www.dolibarr.fr/"
Hans-G?nter@20842 10
erjo@11794 11 TARBALL="$PACKAGE-$VERSION.tgz"
Hans-G?nter@20842 12 WGET_URL="https://sourceforge.net/projects/$PACKAGE/files/Dolibarr%20ERP-CRM/$VERSION/$TARBALL"
erjo@11794 13
erjo@11827 14 DEPENDS="apache php-apache php-gd php-mysqli"
erjo@11794 15 BUILD_DEPENDS=""
erjo@11794 16
pascal@24361 17 # What is the latest version available today?
pascal@24361 18 current_version()
pascal@24361 19 {
pascal@24361 20 wget -O - https://sourceforge.net/projects/dolibarr/files/Dolibarr%20ERP-CRM/ 2>/dev/null | \
pascal@24361 21 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24361 22 sed '/scope="row/!d;/tgz/!d;s|.*/dolibarr-||;s|.tgz.*||;q'
pascal@24361 23 }
pascal@24361 24
erjo@11794 25 # Rules to configure and make the package.
erjo@11794 26 compile_rules()
erjo@11794 27 {
Hans-G?nter@22737 28 # Fix attributes and permissions
erjo@11794 29 chown -R root.root *
erjo@11794 30 chmod -x C* I* R*
erjo@11794 31 find . \( -name "*.php" \
erjo@11794 32 -o -name "*.png" \
erjo@11794 33 -o -name "*.jpg" \
erjo@11794 34 -o -name "*.gif" \
erjo@11794 35 -o -name "*.txt" \
erjo@11794 36 -o -name "*.ico" \
erjo@11794 37 -o -name "*.html" \) -exec chmod -x {} \;
erjo@11794 38 }
erjo@11794 39
erjo@11794 40 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@11794 41 genpkg_rules()
erjo@11794 42 {
Hans-G?nter@22737 43 mkdir -p $fs/etc/dolibarr
Hans-G?nter@22737 44 mkdir -p $fs/usr/share/dolibarr
Hans-G?nter@22737 45 mkdir -p $fs/var/lib/dolibarr/documents
Hans-G?nter@22737 46 mkdir -p $fs/usr/share/doc/$PACKAGE/schemas
Hans-G?nter@22737 47 mkdir -p $fs/usr/share/applications
Hans-G?nter@22737 48
Hans-G?nter@22737 49 cp -a $src/htdocs $fs/usr/share/dolibarr
Hans-G?nter@22737 50 cp -a $src/scripts $fs/usr/share/dolibarr
Hans-G?nter@22737 51
erjo@11794 52 # Remove install directory
erjo@11827 53 #rm -rf $fs/usr/share/dolibarr/htdocs/install
Hans-G?nter@22737 54
erjo@11794 55 # Populate documents directory
erjo@11794 56 for dir in facture users propale mycompany ficheinter produit rapport
Hans-G?nter@22737 57 do
erjo@11794 58 mkdir $fs/var/lib/dolibarr/documents/$dir
Hans-G?nter@22737 59 done
Hans-G?nter@22737 60
Hans-G?nter@22737 61 # Fix permissions
Hans-G?nter@22737 62 chown -R root.www $fs/var/lib/dolibarr/documents
Hans-G?nter@22737 63 chmod -R 770 $fs/var/lib/dolibarr/documents
Hans-G?nter@22737 64
Hans-G?nter@22737 65 cp $stuff/conf.php $fs/etc/dolibarr
Hans-G?nter@22737 66 cp $stuff/$PACKAGE-$VERSION-mysql.sql \
Hans-G?nter@22737 67 $fs/usr/share/doc/$PACKAGE/schemas
Hans-G?nter@22737 68 cp -a $stuff/pixmaps $fs/usr/share/
Hans-G?nter@22737 69
erjo@11794 70 ln -s /etc/dolibarr/conf.php $fs/usr/share/dolibarr/htdocs/conf
erjo@11794 71 }
erjo@11794 72
erjo@11794 73 post_install(){
erjo@11794 74 db_name=dolibarr
erjo@11794 75 db_user=dolibarr
erjo@11794 76 db_password=dolibarr
erjo@11794 77
erjo@11794 78 # Configure apache server
Hans-G?nter@22737 79 if [ -f "$1/etc/apache/httpd.conf" ]
Hans-G?nter@22737 80 then
Hans-G?nter@22737 81 if [ ! -f "$1/etc/apache/conf.d/dolibarr.conf" ]
Hans-G?nter@22737 82 then
pascal@18730 83 cat > "$1/etc/apache/conf.d/dolibarr.conf" <<EOT
erjo@11794 84 <IfModule mod_alias.c>
erjo@11794 85 Alias /dolibarr /usr/share/dolibarr/htdocs
erjo@11794 86 </IfModule>
erjo@11794 87 <Directory "/usr/share/dolibarr/htdocs">
erjo@11794 88 Options Indexes FollowSymLinks
erjo@11794 89 AllowOverride None
erjo@11794 90 Order deny,allow
erjo@11794 91 Allow from all
erjo@11794 92 </Directory>
erjo@11794 93
erjo@11794 94 EOT
Hans-G?nter@22737 95 if [ -z "$1" ]
Hans-G?nter@22737 96 then
erjo@11794 97 # Start Web server.
Hans-G?nter@22737 98 test -f /var/run/apache/httpd.pid &&
Hans-G?nter@22737 99 ( kill -0 $(cat /var/run/apache/httpd.pid) && /etc/init.d/apache restart )
erjo@11794 100 fi
erjo@11794 101 fi
erjo@11794 102 fi
erjo@11794 103
Hans-G?nter@22737 104 # Configure everything.
Hans-G?nter@22737 105 if [ -z "$1" ]
Hans-G?nter@22737 106 then
Hans-G?nter@22737 107 if ( ! mysqladmin -s ping > /dev/null )
Hans-G?nter@22737 108 then
erjo@11794 109 echo "Starting MySQL server"
erjo@11794 110 ( /etc/init.d/mysql start ; status ) || exit
erjo@11794 111 sleep 4 #let the mysql daemon start
erjo@11794 112 fi
Hans-G?nter@22737 113 if ( ! mysql -u root -Be 'show databases' | grep -q $db_name )
Hans-G?nter@22737 114 then
erjo@11794 115 echo -n "Create $db_name database"
Hans-G?nter@22737 116 mysql -Be "create database $db_name"
Hans-G?nter@22737 117 status
Hans-G?nter@22737 118
erjo@11794 119 # We suppose that databse user does not exist.
erjo@11794 120 # It may be false.
erjo@11794 121 echo -n "Create user $db_user with password $db_password"
erjo@11794 122 mysql -Be "grant all privileges on ${db_name}.* to '$db_user'@'localhost'
Hans-G?nter@22737 123 identified by '$db_password'"
Hans-G?nter@22737 124 status
Hans-G?nter@22737 125
erjo@11794 126 # At last populate the database.
erjo@11794 127 echo -n "Create $db_name database schema."
Hans-G?nter@22737 128 mysql -u $db_user -p${db_password} -D $db_name < /usr/share/doc/dolibarr/schemas/$PACKAGE-$VERSION-mysql.sql
Hans-G?nter@22737 129 status
erjo@11794 130 fi
erjo@11794 131 fi
erjo@11794 132 }