# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit linux-info MY_VER="${PV/.}0" DESCRIPTION="offsite backup software for cloud storage with RackSpace or Amazon S3" HOMEPAGE="https://www.jungledisk.com/business/server/features/" SRC_URI="amd64? ( https://downloads.jungledisk.com/jungledisk/junglediskserver64-${MY_VER}.tar.gz ) x86? ( https://downloads.jungledisk.com/jungledisk/junglediskserver${MY_VER}.tar.gz )" LICENSE="as-is" SLOT="0" KEYWORDS="amd64 ~x86" IUSE="" RESTRICT="" RDEPEND="sys-apps/acl sys-apps/attr sys-libs/zlib" DEPEND="" S=${WORKDIR}/junglediskserver GAMEDIR=${GAMES_PREFIX_OPT}/${PN} pkg_setup() { linux-info_pkg_setup if ! linux_config_exists; then ewarn "Can't check the linux kernel configuration." ewarn "You might have some incompatible options enabled." else if linux_chkconfig_present PAX_MPROTECT && ! linux_chkconfig_present PAX_MPROTECT_COMPAT; then ewarn "You appear to be running a hardened kernel with PAX_MPROTECT enabled," ewarn "and PAX_MPROTECT_COMPAT disabled. Jungle Disk Server does not work well" ewarn "in this configuration. It is recommend that you enable PAX_MPROTECT_COMPAT." fi fi } src_prepare() { # Update included redhat init script to work on Gentoo sed -e 's;/etc/init.d/functions;/etc/init.d/functions.sh;' \ -e 's;/usr/local/bin/junglediskserver;/usr/bin/junglediskserver;' \ -i init_d_examples/junglediskserver-redhat.init } src_install() { # Install binary dobin junglediskserver || die "install binary failed" # Install license file insinto /etc/jungledisk newins junglediskserver-license-EXAMPLE.xml junglediskserver-license.xml || die "install config failed" # Install init script doinitd "${FILESDIR}/jungledisk-server" # install documentation dodoc INSTALL || die "install doc failed" } pkg_postinst() { echo ewarn "Before using Jungle Disk Server, you MUST add your license key here:" ewarn "/etc/jungledisk/junglediskserver-license.xml" echo einfo "The INSTALL doc has additional useful information for getting started." einfo "${PN}" echo games_pkg_postinst }