summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2012-07-15 23:37:02 +0000
committerDoug Goldstein <cardoe@gentoo.org>2012-07-15 23:37:02 +0000
commite4be39761487f11a6f7179b795227175c233ac30 (patch)
tree550100373d3608c6656a17e3c3d29d49f663cfa2 /www-apps/mythweb
parentMask the development version of mythweb. (diff)
downloadgentoo-2-e4be39761487f11a6f7179b795227175c233ac30.tar.gz
gentoo-2-e4be39761487f11a6f7179b795227175c233ac30.tar.bz2
gentoo-2-e4be39761487f11a6f7179b795227175c233ac30.zip
Version bump with patches from upstream. Attempted to cleanup the ebuild and set defaults in the config files based on what webapp-config has set. Additionally added initial support for nginx in additional to the officially supported Apache and lighttpd.
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'www-apps/mythweb')
-rw-r--r--www-apps/mythweb/ChangeLog11
-rw-r--r--www-apps/mythweb/files/mythweb.conf.nginx30
-rw-r--r--www-apps/mythweb/files/reconfig35
-rw-r--r--www-apps/mythweb/mythweb-0.25.1_p20120715.ebuild90
4 files changed, 165 insertions, 1 deletions
diff --git a/www-apps/mythweb/ChangeLog b/www-apps/mythweb/ChangeLog
index 33e8a9bee85b..d78b47509604 100644
--- a/www-apps/mythweb/ChangeLog
+++ b/www-apps/mythweb/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for www-apps/mythweb
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/mythweb/ChangeLog,v 1.91 2012/07/12 02:59:19 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/mythweb/ChangeLog,v 1.92 2012/07/15 23:37:01 cardoe Exp $
+
+*mythweb-0.25.1_p20120715 (15 Jul 2012)
+
+ 15 Jul 2012; Doug Goldstein <cardoe@gentoo.org>
+ +mythweb-0.25.1_p20120715.ebuild, +files/mythweb.conf.nginx, +files/reconfig:
+ Version bump with patches from upstream. Attempted to cleanup the ebuild and
+ set defaults in the config files based on what webapp-config has set.
+ Additionally added initial support for nginx in additional to the officially
+ supported Apache and lighttpd.
*mythweb-0.25.1 (11 Jul 2012)
diff --git a/www-apps/mythweb/files/mythweb.conf.nginx b/www-apps/mythweb/files/mythweb.conf.nginx
new file mode 100644
index 000000000000..727f68ea8a71
--- /dev/null
+++ b/www-apps/mythweb/files/mythweb.conf.nginx
@@ -0,0 +1,30 @@
+location /mythweb/ {
+ root /var/www/localhost/htdocs;
+ auth_basic "MythWeb";
+ auth_basic_user_file /var/www/htpasswd;
+ index /mythweb/mythweb.php;
+ try_files $uri @handler;
+}
+
+location ~ /mythweb/.+\.php {
+ root /var/www/localhost/htdocs;
+ include fastcgi_params;
+ fastcgi_index mythweb.php;
+ fastcgi_split_path_info ^(.+\.php)(/?.+)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_param db_server localhost;
+ fastcgi_param db_name mythconverg;
+ fastcgi_param db_login mythtv;
+ fastcgi_param db_password mythtv;
+ fastcgi_param hostname mythtv.cardoe.com;
+ fastcgi_pass 127.0.0.1:9000;
+}
+
+location @handler {
+ root /var/www/localhost/htdocs;
+ rewrite /mythweb/(.+\.(php|pl))/.* /mythweb/$1 last;
+ rewrite /mythweb/(pl(/.*)?)$ /mythweb/mythweb.pl/$1 last;
+ rewrite /mythweb/(.+)$ /mythweb/mythweb.php/$1 last;
+ rewrite /mythweb/(.*)$ /mythweb/mythweb.php last;
+}
diff --git a/www-apps/mythweb/files/reconfig b/www-apps/mythweb/files/reconfig
new file mode 100644
index 000000000000..d4508ea356a6
--- /dev/null
+++ b/www-apps/mythweb/files/reconfig
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+die() {
+ echo "###"
+ echo $1
+ echo "###"
+ exit 1
+}
+
+if [[ $1 = "install" ]]; then
+ if [[ "${VHOST_SERVER}" = "apache" ]]; then
+ sed -e "s|/var/www/html/data|${MY_INSTALLDIR}/data|g" \
+ -e "s|/var/www/html|${VHOST_ROOT}/${PN}|g" \
+ -i ${MY_SERVERCONFIGIR}/mythweb.conf || \
+ die "apache sed failed"
+ elif [[ "${VHOST_SERVER}" = "lighttpd" ]]; then
+ sed -e "s|/var/www/html/data|${MY_INSTALLDIR}/data|g" \
+ -e "s|/var/www/html|${VHOST_ROOT}/${PN}|g" \
+ -i ${MY_SERVERCONFIGIR}/mythweb.conf || \
+ die "lighttpd sed failed"
+ elif [[ "${VHOST_SERVER}" = "nginx" ]]; then
+ sed -e "s|/var/www/localhost/htdocs|${MY_INSTALLDIR}/htdocs|g" \
+ -i ${MY_SERVERCONFIGIR}/mythweb.include || \
+ die "nginx sed failed"
+ fi
+
+ # Ownership fixes
+ chown ${VHOST_SERVER_UID}:${VHOST_SERVER_GID} "${MY_INSTALLDIR}"/data || \
+ die "chown failed"
+
+elif [[ $1 = "clean" ]]; then
+ echo $1
+fi
+
+exit 0
diff --git a/www-apps/mythweb/mythweb-0.25.1_p20120715.ebuild b/www-apps/mythweb/mythweb-0.25.1_p20120715.ebuild
new file mode 100644
index 000000000000..e2d2e6fd540c
--- /dev/null
+++ b/www-apps/mythweb/mythweb-0.25.1_p20120715.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/mythweb/mythweb-0.25.1_p20120715.ebuild,v 1.1 2012/07/15 23:37:01 cardoe Exp $
+
+EAPI=4
+
+inherit webapp depend.php
+
+BACKPORTS="4f6ac2a60b"
+# Release version
+MY_PV="${PV%_p*}"
+MY_P="mythplugins-${MY_PV}"
+
+DESCRIPTION="PHP scripts intended to manage MythTV from a web browser."
+HOMEPAGE="http://www.mythtv.org"
+LICENSE="GPL-2"
+SRC_URI="ftp://ftp.osuosl.org/pub/mythtv/${MY_P}.tar.bz2
+ ${BACKPORTS:+http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="dev-lang/php:5.3[json,mysql,session,posix]
+ dev-perl/DBI
+ dev-perl/DBD-mysql
+ dev-perl/HTTP-Date
+ dev-perl/Net-UPnP"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}/${PN}"
+
+need_httpd_cgi
+need_php5_httpd
+
+src_prepare() {
+ cd "${S}"/../
+
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \
+ epatch
+
+ epatch_user
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ webapp_src_preinst
+
+ # Install docs
+ cd "${S}"
+ dodoc README INSTALL
+
+ # Install htdocs files
+ insinto "${MY_HTDOCSDIR}"
+ doins mythweb.php
+ doins -r classes
+ doins -r configuration
+ doins -r data
+ doins -r includes
+ doins -r js
+ doins -r modules
+ doins -r skins
+ doins -r tests
+ exeinto "${MY_HTDOCSDIR}"
+ doexe mythweb.pl
+
+ # Install our server config files
+ webapp_server_configfile apache mythweb.conf.apache mythweb.conf
+ webapp_server_configfile lighttpd mythweb.conf.lighttpd mythweb.conf
+ webapp_server_configfile nginx "${FILESDIR}"/mythweb.conf.nginx \
+ mythweb.include
+
+ # Data needs to be writable and modifiable by the web server
+ webapp_serverowned -R "${MY_HTDOCSDIR}"/data
+
+ # Message to display after install
+ #webapp_postinst_txt en "${FILESDIR}"/0.24-postinstall-en.txt
+
+ # Script to set the correct defaults on install
+ webapp_hook_script "${FILESDIR}"/reconfig
+
+ webapp_src_install
+}