add ioncube loader
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2232 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
parent
81406604b7
commit
078d7260a0
90
dev-php5/ioncube_loaders/ioncube_loaders-3.3.1.ebuild
Normal file
90
dev-php5/ioncube_loaders/ioncube_loaders-3.3.1.ebuild
Normal file
@ -0,0 +1,90 @@
|
||||
# Copyright 1999-2005 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
PHP_EXT_NAME="ioncube_loader"
|
||||
PHP_EXT_ZENDEXT="yes"
|
||||
PHP_EXT_INI="yes"
|
||||
|
||||
inherit php-ext-base-r1
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
MY_P="${PN}"
|
||||
MY_ARCH=${ARCH/amd64/x86-64}
|
||||
|
||||
SRC_URI="http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_${MY_ARCH}.tar.bz2"
|
||||
|
||||
S="${WORKDIR}/ioncube"
|
||||
|
||||
DESCRIPTION="PHP extension that support for running PHP scripts encoded with ionCube's encoder"
|
||||
HOMEPAGE="http://www.ioncube.com/"
|
||||
LICENSE="${PN}"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RESTRICT="nomirror strip"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="!dev-php/eaccelerator !dev-php/PECL-apc"
|
||||
|
||||
PHP_LIB_DIR="/usr/lib/php/${PN}"
|
||||
|
||||
need_php_by_category
|
||||
|
||||
pkg_setup() {
|
||||
PHP_VER=$(best_version =dev-lang/php-5*)
|
||||
PHP_VER=$(echo ${PHP_VER} | sed -e's#dev-lang/php-\([0-9]*\.[0-9]*\)\..*#\1#')
|
||||
QA_TEXTRELS="${EXT_DIR/\//}/${PHP_EXT_NAME}.so"
|
||||
QA_EXECSTACK="${EXT_DIR/\//}/${PHP_EXT_NAME}.so"
|
||||
|
||||
php_binary_extension
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
|
||||
# Detect if we use ZTS and change the file path accordingly
|
||||
if has_zts ; then
|
||||
IONCUBE_SO_FILE="${PHP_EXT_NAME}_lin_${PHP_VER}_ts.so"
|
||||
else
|
||||
IONCUBE_SO_FILE="${PHP_EXT_NAME}_lin_${PHP_VER}.so"
|
||||
fi
|
||||
|
||||
cd ${S}
|
||||
mv ${IONCUBE_SO_FILE} "${PHP_EXT_NAME}.so"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
php-ext-base-r1_src_install
|
||||
|
||||
# Install the binary
|
||||
insinto ${EXT_DIR}
|
||||
doins "${PHP_EXT_NAME}.so"
|
||||
|
||||
insinto "${PHP_LIB_DIR}"
|
||||
doins ioncube-loader-helper.php
|
||||
doins ioncube-encoded-file.php
|
||||
|
||||
dodoc-php README.txt
|
||||
dodoc-php LICENSE.txt
|
||||
}
|
||||
|
||||
pkg_config () {
|
||||
einfo "Please remember to create the 'ioncube' directory as documented"
|
||||
einfo "in /usr/share/doc/${P}/README."
|
||||
einfo
|
||||
einfo "The ioncube loader runtime test script has been installed into"
|
||||
einfo "${PHP_LIB_DIR}/ioncube-rtl-tester.php"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
has_php
|
||||
|
||||
# You only need to restart apache2 if you're using mod_php
|
||||
if built_with_use =${PHP_PKG} apache2 ; then
|
||||
elog
|
||||
elog "You need to restart apache2 to activate the ${PN}."
|
||||
elog
|
||||
fi
|
||||
}
|
Loading…
Reference in New Issue
Block a user