ifolder/www-apps/ifolder3-enterprise/ifolder3-enterprise-3.8.0.9328.1.ebuild

164 lines
5.3 KiB
Bash
Raw Normal View History

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
WANT_AUTOMAKE=1.9
#ESVN_REPO_URI="https://forgesvn1.novell.com/svn/simias/trunk/@${PV/3.7_pre/}"
#inherit autotools eutils mono subversion
inherit autotools eutils mono
DESCRIPTION="Enterprise backend for iFolder"
HOMEPAGE="http://www.ifolder.com/"
SRC_URI="mirror://sourceforge/ifolder/files/iFolder%20Server/3.8.0/11.1/${P}.tar.gz
http://ftp.disconnected-by-peer.at/ifolder/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
RESTRICT="mirror"
DEPEND="!net-misc/simias
>=dev-lang/mono-2.2
>=dev-db/libflaim-4.9.617
>=dev-dotnet/log4net-1.2.9
>=www-apache/mod_mono-1.2.1
>=net-libs/gsoap-2.7.12
sys-fs/e2fsprogs"
RDEPEND="${DEPEND}"
PDEPEND="=www-apps/ifolder3-enterprise-plugins-${PV}"
#S=${WORKDIR}/${PN}
simiasdatadir="${ROOT}var/lib/simias"
gentoo_config_dir="${ROOT}etc/simias/apache/gentoo"
logdir="${ROOT}var/log/ifolder3"
DEVNULL=/dev/null
pkg_setup() {
if [[ $(gcc-major-version) -eq 4 ]]; then
if [[ $(gcc-minor-version) -gt 3 ]]; then
eerror "simias requires <gcc-4.4 in order to work correctly"
eerror "please compile it switching to gcc-4.3."
die "gcc 4.4 cannot build simias"
fi
fi
}
src_prepare() {
rm -rf dependencies
# epatch "${FILESDIR}"/WSDLPATCH-1.diff
# epatch "${FILESDIR}"/configure.in-xsp-check-by-dl9pf-version3.diff
# epatch "${FILESDIR}"/simias-libtool22-1.patch
epatch "${FILESDIR}"/simias-1.8-mono22-5.patch
# epatch "${FILESDIR}"/simias-mononamespace.dpatch
# epatch "${FILESDIR}"/simias-etc_use_destdir.dpatch
# epatch "${FILESDIR}"/simias-bash.dpatch
# epatch "${FILESDIR}"/simias_make_gcc43_happy.diff
epatch "${FILESDIR}"/simias-libflaim_shared-1.patch
epatch "${FILESDIR}"/simias-1.8-use_system_gsoap-2.patch
# epatch "${FILESDIR}"/gsoap-2.7.12.patch
# epatch "${FILESDIR}"/simias-recovery_agent-fix-1.patch
#Patch the path of mod_mono.conf
# epatch ${FILESDIR}/${PN}-mod_mono-path.patch
# epatch ${FILESDIR}/${PN}-apache-rights.patch
# epatch ${FILESDIR}/${PN}-simias-server-setup.patch
epatch ${FILESDIR}/new_mod_mono.diff
epatch ${FILESDIR}/ifolder-3.8-admin-setup-1.diff
epatch ${FILESDIR}/ifolder-apache-conf.diff
epatch ${FILESDIR}/ifolder-3.8-web-setup-1.diff
epatch ${FILESDIR}/simias-1.8.3-server-setup-1.diff
# epatch ${FILESDIR}/no_write_to_etc_during_install.diff
epatch ${FILESDIR}/new_default_simias.config.diff
# epatch ${FILESDIR}/flex_in_lib64.diff
# epatch ${FILESDIR}/${PN}-simias-server-setup.patch
epatch "${FILESDIR}"/simias-1.8.3.9328.1-system_xsp-1.patch
epatch "${FILESDIR}"/simias-1.8.3.9328.1-log-data-dir-1.patch
epatch "${FILESDIR}"/simias-1.8.3.9328.1-wsdl-1.patch
eautoreconf || die "eautoreconf failed"
}
src_configure() {
econf --with-runasserver --with-simiasdatadir=${simiasdatadir} || die "configure failed"
}
src_compile() {
emake -j1 || die "build failed"
}
src_install() {
make DESTDIR="${D}" install || die "Error install ${PN}"
dodir "${simiasdatadir}"
keepdir "${simiasdatadir}"
# dodir "${logdir}"
# keepdir "${logdir}"
dodir "${gentoo_config_dir}"
# if [[ ! -f ${simiasdatadir}/Simias.config ]];then
# einfo "It appears you have never setup iFolder"
# einfo "Extracting setup-files to ${simiasdatadir}"
# tar -zxvf ${FILESDIR}/setup-files.tar.gz -C ${D}/${simiasdatadir}
# fi
}
pkg_postinst() {
echo ""
ewarn "Please edit ${ROOT}etc/apache2/httpd.conf and add the following line"
ewarn "at the bottom of the file after Include ${ROOT}etc/apache2/vhosts.d/*.conf"
ewarn "Include /etc/simias/apache/*.conf"
echo ""
ewarn "You MUST add \"-D MONO\" to APACHE2_OPTS in /etc/conf.d/apache2"
echo ""
# ewarn "You can check by running ps aux | grep mono"
# ewarn "Remember, your default admin credentials are: admin:novell"
echo ""
ewarn "You must run emerge --config ifolder3-enterprise now"
ewarn "to complete the install if this is the first time"
ewarn "you have installed the server"
# ewarn "Please edit ${simiasdatadir}/Simias.config now to change your administrative"
# ewarn "username and password if desired and to set the name and description of your new iFolder server."
# ewarn "You must also edit the \"PublicAddress\" and \"PrivateAddress\""
# ewarn "settings to match your environment!"
echo ""
ewarn "Visit http://www.ifolder.com/index.php/HowTo:Building_iFolder_Enterprise_Server_on_Gentoo"
ewarn "for more information"
# echo ""
# ewarn "Please login to http://localhost/admin/ in order to initialize the db"
# ewarn "if this is the first time running the server"
}
pkg_config(){
ewarn "Remember that ${PN} runs behind apache"
ewarn "therefore give appropriate urls when running this"
ewarn "script. Specifically with regards to ports"
ewarn "ie: use \"http://localhost\""
ewarn "do not use \"http://localhost:8086\""
echo ""
simias-server-setup --apache --path=${simiasdatadir} --prompt
ifolder-admin-setup
ifolder-web-setup
chown -R apache:apache "${simiasdatadir}"
echo ""
einfo "Congratulations, configuration complete!"
ewarn "Now login to http://<server>/admin/"
ewarn "to initialize the database and create users"
ewarn "if this is the first time running the server"
ewarn "After you have created users you can login"
ewarn "to the web interface by visiting"
ewarn "http://<server>/ifolder/"
echo ""
ewarn "Do NOT use epiphany"
}