new package: phpmyadmin (#5746)

This commit is contained in:
ifurther 2020-08-31 19:41:55 +08:00 committed by GitHub
parent f3b09882b1
commit 5c67e0d779
3 changed files with 57 additions and 0 deletions

View File

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://httpd.apache.org
TERMUX_PKG_DESCRIPTION="Apache Web Server"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=2.4.46
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.apache.org/dist/httpd/httpd-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_SHA256=740eddf6e1c641992b22359cabc66e6325868c3c5e2e3f98faf349b61ecf41ea
TERMUX_PKG_DEPENDS="apr, apr-util, pcre, openssl, libcrypt, libandroid-support, libnghttp2, libexpat, libuuid, zlib"
@ -116,12 +117,14 @@ termux_step_post_make_install() {
-e 's|User daemon|#User daemon|' \
-e 's|Group daemon|#Group daemon|' \
-i "$TERMUX_PREFIX/etc/apache2/httpd.conf"
echo -e "#\n# Load config files from the config directory 'conf.d'.\n#\nInclude conf.d/*.conf" >> $TERMUX_PREFIX/etc/apache2/httpd.conf
}
termux_step_post_massage() {
# sometimes it creates a $TERMUX_PREFIX/bin/sh -> /bin/sh
rm -f ${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/bin/sh
mkdir -p ${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/etc/apache2/conf.d
mkdir -p ${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/var/run/apache2
mkdir -p ${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/var/log/apache2
}

View File

@ -0,0 +1,18 @@
TERMUX_PKG_HOMEPAGE=https://www.phpmyadmin.net
TERMUX_PKG_DESCRIPTION="A PHP tool for administering MySQL databases"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=5.0.2
TERMUX_PKG_SRCURL=https://files.phpmyadmin.net/phpMyAdmin/$TERMUX_PKG_VERSION/phpMyAdmin-$TERMUX_PKG_VERSION-all-languages.tar.xz
TERMUX_PKG_SHA256=cbcc78d1499308d9329950fcba2ebaa84c559a934fe54efc027d459d8e4161c8
TERMUX_PKG_DEPENDS="apache2, php"
TERMUX_PKG_CONFFILES="etc/phpmyadmin/config.inc.php"
termux_step_make_install() {
rm -rf $TERMUX_PREFIX/usr/share/phpmyadmin
mkdir -p $TERMUX_PREFIX/usr/share/phpmyadmin
cp -a $TERMUX_PKG_SRCDIR/* $TERMUX_PREFIX/usr/share/phpmyadmin/
mkdir -p $TERMUX_PREFIX/etc/phpmyadmin
cp $TERMUX_PKG_SRCDIR/config.sample.inc.php $TERMUX_PREFIX/etc/phpmyadmin/config.inc.php
ln -s $TERMUX_PREFIX/etc/phpmyadmin/config.inc.php $TERMUX_PREFIX/usr/share/phpmyadmin
cp $TERMUX_PKG_BUILDER_DIR/phpmyadmin.conf $TERMUX_PREFIX/etc/apache2/conf.d
}

View File

@ -0,0 +1,36 @@
Alias /phpmyadmin /data/data/com.termux/files/usr/share/phpmyadmin
<Directory /data/data/com.termux/files/usr/share/phpmyadmin>
Options Indexes FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php7.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
</Directory>
# Authorize for setup
<Directory /data/data/com.termux/files/usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Directory>
# Disallow web access to directories that don't need it
<Directory /data/data/com.termux/files/usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /data/data/com.termux/files/usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>