ifolder/www-apps/ifolder3-enterprise/ifolder3-enterprise-3.9.2.7683.ebuild
Mario Fetka 39e1b92b27 Bump
Package-Manager: portage-2.2.14
RepoMan-Options: --force
2015-07-15 03:16:55 +02:00

178 lines
6.3 KiB
Bash

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
WANT_AUTOMAKE=1.9
ESVN_REPO_URI="https://simias.svn.sourceforge.net/svnroot/simias/branches/iFolder_3.9.2_updates/@${PV/3.9.2./}"
inherit autotools eutils mono subversion toolchain-funcs versionator multilib
MY_PV=$(replace_version_separator 3 '-' )
MY_PVV=$(replace_version_separator 3 'beta' $MY_PV )
MY_PVM=$(get_version_component_range 1-2 )
MY_PVR=$(get_version_component_range 1-3 )
DESCRIPTION="Enterprise backend for iFolder"
HOMEPAGE="http://www.ifolder.com/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
RESTRICT="mirror"
DEPEND="!net-misc/simias
=dev-lang/mono-2.6*
>=dev-db/libflaim-4.9.617
>=dev-dotnet/log4net-1.2.9
>=www-apache/mod_mono-1.2.1
=net-libs/gsoap-2.7.9*
sys-fs/e2fsprogs
sys-devel/gcc:4.3"
RDEPEND="=dev-lang/mono-2.6*
>=dev-dotnet/log4net-1.2.9
=www-apache/mod_mono-2.6*"
PDEPEND="=www-apps/ifolder3-enterprise-plugins-${MY_PVR}*
=www-apps/ifolder3-clients-${MY_PVR}*"
simiasdatadir="${ROOT}var/lib/simias"
gentoo_config_dir="${ROOT}etc/simias/apache/gentoo"
logdir="${ROOT}var/log/ifolder3"
DEVNULL=/dev/null
src_prepare() {
# rm -rf dependencies
find ${S} -name *.dll -type f | xargs rm -fv
# epatch "${FILESDIR}"/${MY_PVR}/use_system_gsoap.patch
#epatch "${FILESDIR}"/${MY_PVR}/use_wsdl_not_wsdl1.patch
epatch "${FILESDIR}"/${MY_PVR}/use_mono_webserver2.patch
#epatch "${FILESDIR}"/${MY_PVR}/use_lib_as_libdir_on_amd64.patch
epatch "${FILESDIR}"/${MY_PVR}/use_libdir_for_executables.patch
epatch "${FILESDIR}"/${MY_PVR}/SimiasLib.dll.config-use-systemwide-FlaimWrapper.so.patch
epatch "${FILESDIR}"/${MY_PVR}/www-data_apache.patch
epatch "${FILESDIR}"/${MY_PVR}/mod_mono_path.patch
epatch "${FILESDIR}"/${MY_PVR}/mod_mono_SimiasServerSetup_cs.patch
epatch "${FILESDIR}"/${MY_PVR}/mod_mono_iFolderAdminSetup_cs.patch
epatch "${FILESDIR}"/${MY_PVR}/mod_mono_iFolderWebSetup_cs.patch
#epatch "${FILESDIR}"/${MY_PVR}/convert_relative_path_to_webbindir_variable.patch
epatch "${FILESDIR}"/${MY_PVR}/ifdata.patch
epatch "${FILESDIR}"/${MY_PVR}/SimiasServerSetup_use_simiasconfdir_in_SetupDefaultConfigPath.patch
# epatch "${FILESDIR}"/${MY_PVR}/use_webbindir_variable_configurein.patch
epatch "${FILESDIR}"/${MY_PVR}/use_webbindir_variable_configurein_no_gsoap.patch
epatch "${FILESDIR}"/${MY_PVR}/separate_client_server_dirs.patch
epatch "${FILESDIR}"/${MY_PVR}/serverpaths_from_configure_v2.patch
epatch "${FILESDIR}"/${MY_PVR}/dont_download_deleted_nodes.patch
epatch "${FILESDIR}"/${MY_PVR}/remove_nodesFromServer.patch
epatch "${FILESDIR}"/${MY_PVR}/home_never_network_drive.patch
epatch "${FILESDIR}"/${MY_PVR}/DEBUG_log_default.patch
epatch "${FILESDIR}"/${MY_PVR}/gentoo-apache-path.patch
epatch "${FILESDIR}"/${MY_PVR}/xps-MonoWebServer2.patch
eautoreconf || die "eautoreconf failed"
# die
}
src_configure() {
for GCC_SUB_VERSION in 0 1 2 3 4 5 6 7 8 9 ; do
if has_version =sys-devel/gcc-4.3.$GCC_SUB_VERSION* ; then
local GCC_SLOT_VERSION=-4.3.$GCC_SUB_VERSION
fi
done
CSC=gmcs WSDL=wsdl CXX="$(tc-getCXX)$GCC_SLOT_VERSION" CC="$(tc-getCC)$GCC_SLOT_VERSION" econf --with-simiasdatadir=${simiasdatadir} || die "configure failed"
}
src_compile() {
pushd dependencies/external/tools/gsoap/linux-2.7
cd src
make -f MakefileMacOSX COFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" LIBS=""
cp soapcpp2 ..
cd ..
cd wsdl
make -f MakefileSolaris COFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" LIBS="-lnsl"
cd ..
popd
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
# symlink shared server components to the server files (could do a find here as above?)
rm -fv ${D}/usr/$(get_libdir)/simias/admin/bin/SimiasClient.dll
dosym ../../server/bin/SimiasClient.dll /usr/$(get_libdir)/simias/admin/bin/SimiasLib.dll
rm -fv ${D}/usr/$(get_libdir)/simias/admin/bin/SimiasLib.dll
dosym ../../server/bin/SimiasLib.dll /usr/$(get_libdir)/simias/admin/bin/SimiasLib.dll
rm -fv ${D}/usr/$(get_libdir)/simias/webaccess/bin/SimiasLib.dll
dosym ../../server/bin/SimiasLib.dll /usr/$(get_libdir)/simias/webaccess/bin/SimiasLib.dll
keepdir /var/www/.config
fowners apache:apache /var/www/.config
keepdir /var/www/.mono
fowners apache:apache /var/www/.mono
}
pkg_postinst() {
echo ""
ewarn "Please make sure that your Apache is Correctly configured for the iFolder System"
ewarn "This means if you want to use SSL, apache needs to be correctly setup for this"
ewarn "with the for produktion certifikates because ifolder setup stores them into the"
ewarn "simias DB."
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"
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"
echo ""
ewarn "!!! Please make sure that your apache is configured corectly and is running !!!"
ewarn "!!! before you start the configuration of the iFolder System !!!"
echo ""
ewarn "Visit http://www.ifolder.com/index.php/HowTo:Building_iFolder_Enterprise_Server_on_Gentoo"
ewarn "for more information"
}
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"
}