# $Header: /magellan-cvs/smage/adito/adito-0.9.0-r1.smage2,v 1.1 2008/08/26 10:08:25 niro Exp $ PNAME="adito" PVER="0.9.1" PBUILD="r1" PCATEGORIE="net-vpn" STATE="unstable" DESCRIPTION="Adito - a fork of SSL-Explorer- is a fully-featured, web-based SSL VPN server." HOMEPAGE="http://sourceforge.net/projects/adito/" # needs as runtime deps tools.jar and keytool, so a jdk is required! DEPEND=">= virtual/java-jdk >= dev-java/junit-4.4 >= dev-java/apache-ant-1.7" SRCFILE="${PNAME}-${PVER}-src.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools cleanutils SRC_URI=( sourceforge://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/adito-install.sh mirror://${PNAME}/adito.rc ) src_compile() { cd ${SRCDIR}/adito ant compile || die ant local-deploy || die ant deploy-community-extensions || die } src_install() { cd ${SRCDIR} local dest="/opt/adito" local bindest="${BINDIR}/${dest}" minstalldir ${dest} || die # copy everything but with tar to honor dot-files tar cf - * | (cd ${bindest}/; tar xvf -) || die # now clean up zapmost ${bindest}/maverick-crypto build || die zapmost ${bindest}/maverick-multiplex build lib || die zapmost ${bindest}/maverick-ssl build lib || die zapmost ${bindest}/maverick-util build lib || die zapmost ${bindest}/adito build conf db install lib serverlib store webapp || die zapmost ${bindest}/adito-commons-vfs build lib || die zapmost ${bindest}/adito-community-activedirectory build extensions webapp || die zapmost ${bindest}/adito-community-applications build extensions webapp || die zapmost ${bindest}/adito-community-network-places build extensions webapp || die zapmost ${bindest}/adito-community-tunnels build extensions webapp || die zapmost ${bindest}/adito-community-unix build extensions webapp || die zapmost ${bindest}/adito-community-web-forwards build extensions webapp || die mkeepdir ${dest}/adito/db || die mkeepdir ${dest}/adito/logs || die mkeepdir ${dest}/adito/tmp || die # don't need the samples rm -rf ${bindest}/adito-samples || die rm -r ${bindest}/build-tools || die rm -r ${bindest}/certificate || die rm -r ${bindest}/commons-logging-java1 || die rm -r ${bindest}/private-build-tools || die rm -r ${bindest}/ui || die rm ${bindest}/build.xml || die rm ${bindest}/CHANGELOG || die rm ${bindest}/INSTALL || die rm ${bindest}/license.html || die rm ${bindest}/modules.list || die rm ${bindest}/README || die rm ${bindest}/TODO || die find ${bindest} -name .classpath | xargs rm || die find ${bindest} -name .project | xargs rm || die find ${bindest} -name .settings | xargs rm -rf || die # install our install-helper script minstallexec -s adito-install.sh ${dest}/adito-install || die # install our initscript zapmost ${bindest}/adito/install upgrade platforms/linux || die minstallrc adito.rc adito || die # fix installdir sed -i "s:^\(ADITO_ROOT=\).*:\1${dest}:" \ ${bindest}/adito-install \ ${BINDIR}/etc/rc.d/init.d/adito || die # config protect minstalldir /etc/env.d || die echo "CONFIG_PROTECT=${dest}/adito/conf" > ${BINDIR}/etc/env.d/50adito || die echo "CONFIG_PROTECT=${dest}/adito/db" >> ${BINDIR}/etc/env.d/50adito || die # runtime fixes - remove jars which are provided by the system # tools.jar comes with jre and gets installed with adito-install rm ${bindest}/adito/lib/tools.jar || die local myarch case ${ARCH} in i*86) myarch=x86 ;; x86_64) myarch=x86-64 ;; esac # fix wrapper config sed -i -e 's:^\(wrapper.java.command=\).*:\1java:' \ -e "s:^\(wrapper.working.dir=\).*:\1${dest}/adito:" \ -e "s:^\(wrapper.java.library.path.1=\).*:\1${dest}/adito/install/platforms/linux/${myarch}:" \ ${bindest}/adito/conf/wrapper.conf || die # fix wrapper startup script sed -i -e "s:\(.*WRAPPER_CONF=\).*:\1\"${dest}/adito/conf/wrapper.conf\":" \ -e "s:\(.*PIDDIR=\).*:\1\"${dest}/audito/tmp\":" \ ${bindest}/adito/install/platforms/linux/adito || die } postinstall() { echo echo "To complete the installation please run:" echo " /opt/adito/adito-install" echo "and point your browser to http://127.0.0.1:28080/" echo }