wok-undigest annotate phpliteadmin/receipt @ rev 1209
palemoon: --without-intl-api
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Thu Nov 24 22:11:06 2016 +0100 (2016-11-24) |
parents | 7f2ea0f1161b |
children |
rev | line source |
---|---|
pascal@1193 | 1 # SliTaz package receipt. |
pascal@1193 | 2 |
pascal@1193 | 3 PACKAGE="phpliteadmin" |
pascal@1193 | 4 VERSION="1.9.6" |
pascal@1193 | 5 CATEGORY="misc" |
pascal@1193 | 6 SHORT_DESC="Administration of SQLite over the Web." |
pascal@1193 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@1193 | 8 #TARBALL="phpLiteAdmin_v${VERSION//./-}.zip" |
pascal@1193 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@1193 | 10 WEB_SITE="https://www.phpliteadmin.org/" |
pascal@1193 | 11 #WGET_URL="https://bitbucket.org/phpliteadmin/public/downloads/$TARBALL" |
pascal@1193 | 12 WGET_URL="https://github.com/phpLiteAdmin/pla/archive/$VERSION.tar.gz" |
pascal@1193 | 13 CONFIG_FILES="/etc/phpliteadmin/config.php" |
pascal@1193 | 14 |
pascal@1193 | 15 DEPENDS="php-sqlite" |
pascal@1193 | 16 BUILD_DEPENDS="wget" |
pascal@1193 | 17 |
pascal@1193 | 18 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1193 | 19 genpkg_rules() |
pascal@1193 | 20 { |
pascal@1193 | 21 mkdir -p $fs/usr/share/phpliteadmin $fs/etc/phpliteadmin $fs/usr/share/applications |
pascal@1193 | 22 cp -a $src/. $fs/usr/share/phpliteadmin |
pascal@1193 | 23 ln -s /etc/phpliteadmin/config.php $fs/usr/share/phpliteadmin/phpliteadminconfig.php |
pascal@1193 | 24 cp $src/phpliteadmin.config.sample.php $fs/etc/phpliteadmin/config.php |
pascal@1193 | 25 cp $stuff/phpliteadmin.desktop $fs/usr/share/applications |
pascal@1193 | 26 chown -R www.www $fs/usr/share/phpliteadmin $fs/etc/phpliteadmin |
pascal@1193 | 27 chmod 700 $fs/etc/phpliteadmin |
pascal@1193 | 28 chmod 644 $fs/etc/phpliteadmin/config.php |
pascal@1194 | 29 find $fs/usr/share/phpliteadmin/ $fs/etc/phpliteadmin/ \ |
pascal@1194 | 30 -type f -exec dos2unix {} \; |
pascal@1193 | 31 } |
pascal@1193 | 32 |
pascal@1193 | 33 post_install() |
pascal@1193 | 34 { |
pascal@1193 | 35 # Configure lighttpd server |
pascal@1193 | 36 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1193 | 37 if ! grep -q /usr/share/phpliteadmin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1193 | 38 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpliteadmin/" => "/usr/share/phpmliteadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf |
pascal@1193 | 39 if [ -z "$1" ]; then |
pascal@1193 | 40 # Start Web server. |
pascal@1193 | 41 /etc/init.d/lighttpd stop |
pascal@1193 | 42 /etc/init.d/lighttpd start |
pascal@1193 | 43 fi |
pascal@1193 | 44 fi |
pascal@1193 | 45 fi |
pascal@1193 | 46 # Configure apache server |
pascal@1193 | 47 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@1193 | 48 if [ ! -f $1/etc/apache/conf.d/phpliteadmin ]; then |
pascal@1193 | 49 cat > $1/etc/apache/conf.d/phpliteadmin <<EOT |
pascal@1193 | 50 <IfModule mod_alias.c> |
pascal@1193 | 51 Alias /phpliteadmin /usr/share/phpliteadmin |
pascal@1193 | 52 </IfModule> |
pascal@1193 | 53 <Directory /usr/share/phpliteadmin/> |
pascal@1193 | 54 DirectoryIndex index.php |
pascal@1193 | 55 Options +FollowSymLinks |
pascal@1193 | 56 AllowOverride None |
pascal@1193 | 57 Order allow,deny |
pascal@1193 | 58 Allow from all |
pascal@1193 | 59 </Directory> |
pascal@1193 | 60 EOT |
pascal@1193 | 61 if [ -z "$1" ]; then |
pascal@1193 | 62 # Start Web server. |
pascal@1193 | 63 /etc/init.d/apache stop |
pascal@1193 | 64 /etc/init.d/apache start |
pascal@1193 | 65 fi |
pascal@1193 | 66 fi |
pascal@1193 | 67 fi |
pascal@1193 | 68 } |