wok-current annotate wordpress/receipt @ rev 25719

Fix miss dep for mesa (libglvnd) libGL.so.1, libEGL.so.1
author Stanislas Leduc <shann@slitaz.org>
date Sun Jun 16 06:14:51 2024 +0000 (5 months ago)
parents 669f61f44760
children
rev   line source
slaxemulator@7399 1 # SliTaz package receipt.
slaxemulator@7399 2
slaxemulator@7399 3 PACKAGE="wordpress"
Hans-G?nter@25414 4 VERSION="6.0.1"
slaxemulator@7399 5 CATEGORY="misc"
slaxemulator@7399 6 SHORT_DESC="Blog Tool and Publishing Platform."
slaxemulator@7399 7 MAINTAINER="slaxemulator@gmail.com"
pascal@15363 8 LICENSE="GPL2"
Hans-G?nter@22138 9 WEB_SITE="https://wordpress.org/"
Hans-G?nter@22138 10
Hans-G?nter@22138 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@22138 12 WGET_URL="${WEB_SITE}$TARBALL"
Hans-G?nter@22138 13
pascal@13024 14 SUGGESTED="apache cherokee"
Hans-G?nter@22138 15 DEPENDS="mysql php php-mysql"
pascal@15363 16
pascal@24505 17 # What is the latest version available today?
pascal@24505 18 current_version()
pascal@24505 19 {
pascal@24505 20 wget -O - https://core.trac.wordpress.org/browser 2>/dev/null | \
pascal@24505 21 sed 's|<opt|\n&|g' | sed '/tags\/[0-9]/!d;s|.*">tags/||;s|<.*||' | sort -Vr | sed q
pascal@24505 22 }
pascal@24505 23
slaxemulator@7399 24 # Rules to gen a SliTaz package suitable for Tazpkg.
slaxemulator@7399 25 genpkg_rules()
slaxemulator@7399 26 {
slaxemulator@7399 27 mkdir -p $fs/var/www/wordpress
Hans-G?nter@23736 28
Hans-G?nter@23736 29 cp -a $src/* $fs/var/www/wordpress
Hans-G?nter@23736 30 chown -R www.www $fs/var/www/wordpress
slaxemulator@7399 31 }
slaxemulator@7399 32
erjo@8354 33 post_install()
erjo@8354 34 {
erjo@8354 35 local db=wordpress
erjo@8354 36 local db_user=wordpress
erjo@8354 37 local db_password=wordpress
erjo@8354 38
Hans-G?nter@23736 39 # Minimal configuration for wordpress.
Hans-G?nter@23736 40 if [ -z "$1" ]
Hans-G?nter@23736 41 then
Hans-G?nter@23736 42 if ( ! mysqladmin -s ping > /dev/null )
Hans-G?nter@23736 43 then
pascal@20319 44 echo
erjo@8354 45 echo "Starting MySQL server"
erjo@8354 46 ( /etc/init.d/mysql start ; status ) || exit
erjo@8354 47 sleep 4 #let the mysql daemon start
erjo@8354 48 fi
Hans-G?nter@23736 49 if ( ! mysql -u root -Be 'show databases' | grep -q $db )
Hans-G?nter@23736 50 then
pascal@20319 51 echo
erjo@8354 52 echo -n "Create $db database"
Hans-G?nter@23736 53 mysql -Be "create database $db"
Hans-G?nter@23736 54 status
erjo@8354 55 # We suppose that $DB_USER user does not exist.
erjo@8354 56 # It may be false.
erjo@8354 57 echo -n "Create user $db_user with password $db_password"
erjo@8354 58 mysql -Be "grant all privileges on $db.* to '"$db_user"'@'localhost'
erjo@8354 59 identified by '"$db_password"'" ; status
erjo@8354 60 # At last create the database for $PACKAGE.
erjo@8354 61 echo -n "Create $db database schema."
erjo@8354 62 #mysql -u glpi -pglpi -D glpi < /usr/share/glpi/install/mysql/glpi-${VERSION}-empty.sql ; status
erjo@8354 63 fi
erjo@8354 64 fi
erjo@8354 65
erjo@8354 66 }
erjo@8354 67
erjo@8354 68 post_remove()
erjo@8354 69 {
slaxemulator@8651 70 local db=wordpress
slaxemulator@8651 71 local db_user=wordpress
slaxemulator@8651 72 local db_password=wordpress
erjo@8354 73
Hans-G?nter@23736 74 if [ -z "$1" ]
Hans-G?nter@23736 75 then
erjo@8354 76 echo -n "Would you like to remove data and database files.(y/n) "
erjo@8354 77 read answer
erjo@8354 78
erjo@8354 79 case $answer in
Hans-G?nter@25414 80 (y|Y)
erjo@8354 81 echo -n "Removing data directories..."
slaxemulator@8651 82 [ -d /var/lib/wordpress ] && rm -rf /var/lib/wordpress ; status
Hans-G?nter@23736 83 if ( mysql -u root -Be 'show databases' | grep -q $db )
Hans-G?nter@23736 84 then
erjo@8354 85 echo -n "Deleting $db database"
Hans-G?nter@23736 86 mysql -Be "drop database $db"
Hans-G?nter@23736 87 status
erjo@8354 88 # We suppose that glpi user does not exist.
erjo@8354 89 # It may be false.
erjo@8354 90 echo -n "Delete user $db_user"
Hans-G?nter@23736 91 mysql -Be "delete from mysql.db where user='"$db_user"'"
Hans-G?nter@23736 92 status
erjo@8354 93 fi
erjo@8354 94 unset $answer
erjo@8354 95 ;;
Hans-G?nter@25414 96 (*)
erjo@8354 97 ;;
erjo@8354 98 esac
slaxemulator@8651 99 fi
erjo@8354 100 }