new package: tenki-php
This commit is contained in:
parent
d1a5f64726
commit
b09a6a5fcc
34
packages/tenki-php/build.sh
Normal file
34
packages/tenki-php/build.sh
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://github.com/dmpop/tenki
|
||||||
|
TERMUX_PKG_DESCRIPTION="A simple PHP application for logging current weather conditions, notes, and waypoints"
|
||||||
|
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||||
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
|
_COMMIT=e59f7f97804fa0c4e6fcc9368cccf4379ad92d6e
|
||||||
|
TERMUX_PKG_VERSION=2022.01.08
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/dmpop/tenki.git
|
||||||
|
TERMUX_PKG_GIT_BRANCH=main
|
||||||
|
TERMUX_PKG_DEPENDS="apache2, php"
|
||||||
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||||
|
|
||||||
|
termux_step_post_get_source() {
|
||||||
|
git fetch --unshallow
|
||||||
|
git checkout $_COMMIT
|
||||||
|
|
||||||
|
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
|
||||||
|
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
|
||||||
|
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
|
||||||
|
echo " is different from what is expected to be: \"$version\""
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_make_install() {
|
||||||
|
local _TENKI_ROOT=$TERMUX_PREFIX/share/tenki-php
|
||||||
|
rm -rf ${_TENKI_ROOT}
|
||||||
|
mkdir -p ${_TENKI_ROOT}
|
||||||
|
cp -a $TERMUX_PKG_SRCDIR/* ${_TENKI_ROOT}/
|
||||||
|
local _APACHE_CONF_DIR=$TERMUX_PREFIX/etc/apache2/conf.d
|
||||||
|
mkdir -p ${_APACHE_CONF_DIR}
|
||||||
|
sed -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \
|
||||||
|
$TERMUX_PKG_BUILDER_DIR/tenki-php.conf \
|
||||||
|
> ${_APACHE_CONF_DIR}/tenki-php.conf
|
||||||
|
}
|
16
packages/tenki-php/tenki-php.conf
Normal file
16
packages/tenki-php/tenki-php.conf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Alias /tenki @TERMUX_PREFIX@/share/tenki-php
|
||||||
|
|
||||||
|
<Directory @TERMUX_PREFIX@/share/tenki-php>
|
||||||
|
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>
|
Loading…
Reference in New Issue
Block a user