unitas/app-admin/xibo/xibo-1.7.3.ebuild

71 lines
2.1 KiB
Bash
Raw Normal View History

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=4
WEBAPP_MANUAL_SLOT="yes"
inherit autotools depend.php webapp
DESCRIPTION="Digital Signage server"
HOMEPAGE="https://github.com/xibosignage/xibo-cms/"
SRC_URI="https://github.com/xibosignage/xibo-cms/archive/${PV}.zip"
KEYWORDS="~amd64 ~x86"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
2015-05-07 16:35:03 +02:00
RDEPEND="virtual/mysql
www-servers/apache
dev-lang/php[apache2,bcmath,calendar,curl,gd,intl,mysql,mysqli,pdo,soap,zip]
"
DEPEND="${RDEPEND}"
S=${WORKDIR}/xibo-cms-${PV}
src_install() {
webapp_src_preinst
#elog "${D} ### ${MY_HTDOCSDIR} ### ${S}"
#/var/tmp/portage/app-admin/xibo-1.7.3/image/ ### /usr/share/webapps//xibo/1.7.3/htdocs ### /var/tmp/portage/app-admin/xibo-1.7.3/work/xibo-cms-1.7.3
#elog "${DESCRIPTION} # ${IUSE} # ${RDEPEND} # ${S}"
# * Digital Signage server # vhosts # dev-db/mysql
#elog "${VHOST_ROOT} # ${VHOST_HOSTNAME} # ${VHOST_APPDIR}"
#/var/www/localhost # localhost #
#elog "${MY_HOSTROOTDIR} # ${PF}"
#/usr/share/webapps//xibo/1.7.3/hostroot # xibo-1.7.3
#elog "${VHOST_SERVER_UID} # ${VHOST_SERVER_GID} # ${MY_INSTALLDIR}"
#root # root #
#elog "${MY_HTDOCSDIR}"
cp -R "${S}"/* "${D}/${MY_HTDOCSDIR}"
#einfo "webapp_serverowned ${MY_HTDOCSDIR}"
# webapp_serverowned ${MY_HTDOCSDIR}
# webapp_serverowned -R ${MY_HTDOCSDIR}
webapp_src_install
}
pkg_postinst() {
webapp_pkg_postinst
PHPVER=`eselect php list apache2 | grep "*" | cut -d \ -f 6`
einfo "Alter current php.ini to match Xibo requirements:"
einfo "post_max_size = 128M"
einfo "upload_max_size = 128M"
einfo "max_execution_time = 120"
sed -i 's/^post_max_size\ =\ .*$/post_max_size\ =\ 128M/g' /etc/php/apache2-${PHPVER}/php.ini
sed -i 's/^upload_max_filesize\ =\ .*$/upload_max_filesize\ =\ 128M/g' /etc/php/apache2-${PHPVER}/php.ini
sed -i 's/^max_execution_time\ =\ .*$/max_execution_time\ =\ 120/g' /etc/php/apache2-${PHPVER}/php.ini
einfo "Set apache owner to xibo directory"
chown apache:apache ${VHOST_ROOT}/htdocs/${PN}
chown apache:apache -R ${VHOST_ROOT}/htdocs/${PN}/
service apache2 restart
}
#webapp_src_install() {}