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