diff --git a/packages/apache2/build.sh b/packages/apache2/build.sh index b88fbddef..d6405f3e4 100644 --- a/packages/apache2/build.sh +++ b/packages/apache2/build.sh @@ -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 } diff --git a/packages/phpmyadmin/build.sh b/packages/phpmyadmin/build.sh new file mode 100644 index 000000000..effe6fe91 --- /dev/null +++ b/packages/phpmyadmin/build.sh @@ -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 +} diff --git a/packages/phpmyadmin/phpmyadmin.conf b/packages/phpmyadmin/phpmyadmin.conf new file mode 100644 index 000000000..90eb1df6d --- /dev/null +++ b/packages/phpmyadmin/phpmyadmin.conf @@ -0,0 +1,36 @@ +Alias /phpmyadmin /data/data/com.termux/files/usr/share/phpmyadmin + + + Options Indexes FollowSymLinks + DirectoryIndex index.php + + + 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 . + + + + +# Authorize for setup + + + AuthType Basic + AuthName "phpMyAdmin Setup" + AuthUserFile etc/phpmyadmin/htpasswd.setup + + Require valid-user + + +# Disallow web access to directories that don't need it + + Order Deny,Allow + Deny from All + + + Order Deny,Allow + Deny from All +