2015-07-15 03:16:55 +02:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2011-06-08 17:26:24 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI="2"
|
|
|
|
WANT_AUTOMAKE=1.9
|
|
|
|
|
2015-07-15 03:16:55 +02:00
|
|
|
ESVN_REPO_URI="https://simias.svn.sourceforge.net/svnroot/simias/branches/iFolder_3.9.2_updates/@${PV/3.9.2./}"
|
2013-04-20 08:11:17 +02:00
|
|
|
inherit autotools eutils mono subversion toolchain-funcs versionator multilib
|
2013-04-18 20:55:08 +02:00
|
|
|
|
|
|
|
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 )
|
|
|
|
|
2011-06-08 17:26:24 +02:00
|
|
|
DESCRIPTION="Enterprise backend for iFolder"
|
|
|
|
HOMEPAGE="http://www.ifolder.com/"
|
|
|
|
|
2015-07-30 14:45:24 +02:00
|
|
|
LICENSE="GPL-2+"
|
2011-06-08 17:26:24 +02:00
|
|
|
SLOT="0"
|
2015-07-30 14:39:52 +02:00
|
|
|
KEYWORDS="~amd64 arm ~x86"
|
2011-06-08 17:26:24 +02:00
|
|
|
RESTRICT="mirror"
|
|
|
|
|
|
|
|
DEPEND="!net-misc/simias
|
2013-04-20 08:11:17 +02:00
|
|
|
=dev-lang/mono-2.6*
|
2013-04-18 15:25:33 +02:00
|
|
|
>=dev-db/libflaim-4.9.617
|
2011-06-08 17:26:24 +02:00
|
|
|
>=dev-dotnet/log4net-1.2.9
|
|
|
|
>=www-apache/mod_mono-1.2.1
|
2013-04-18 15:25:33 +02:00
|
|
|
=net-libs/gsoap-2.7.9*
|
2011-06-08 17:26:24 +02:00
|
|
|
sys-fs/e2fsprogs
|
2015-07-30 14:55:23 +02:00
|
|
|
=sys-devel/gcc-4.3*"
|
2013-04-20 08:11:17 +02:00
|
|
|
RDEPEND="=dev-lang/mono-2.6*
|
2011-06-08 17:26:24 +02:00
|
|
|
>=dev-dotnet/log4net-1.2.9
|
2013-04-20 08:11:17 +02:00
|
|
|
=www-apache/mod_mono-2.6*"
|
|
|
|
PDEPEND="=www-apps/ifolder3-enterprise-plugins-${MY_PVR}*
|
|
|
|
=www-apps/ifolder3-clients-${MY_PVR}*"
|
2011-06-08 17:26:24 +02:00
|
|
|
|
|
|
|
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
|
2015-07-30 14:45:24 +02:00
|
|
|
find "${S}" -name *.dll -type f | xargs rm -fv
|
2013-04-20 08:11:17 +02:00
|
|
|
# epatch "${FILESDIR}"/${MY_PVR}/use_system_gsoap.patch
|
2013-04-18 20:55:08 +02:00
|
|
|
#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
|
2013-04-20 08:11:17 +02:00
|
|
|
# epatch "${FILESDIR}"/${MY_PVR}/use_webbindir_variable_configurein.patch
|
|
|
|
epatch "${FILESDIR}"/${MY_PVR}/use_webbindir_variable_configurein_no_gsoap.patch
|
2013-04-18 20:55:08 +02:00
|
|
|
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
|
2013-04-20 08:11:17 +02:00
|
|
|
epatch "${FILESDIR}"/${MY_PVR}/gentoo-apache-path.patch
|
|
|
|
epatch "${FILESDIR}"/${MY_PVR}/xps-MonoWebServer2.patch
|
2011-06-08 17:26:24 +02:00
|
|
|
eautoreconf || die "eautoreconf failed"
|
2013-04-20 08:11:17 +02:00
|
|
|
# die
|
2011-06-08 17:26:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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() {
|
2013-04-20 08:11:17 +02:00
|
|
|
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"
|
2011-06-08 17:26:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-04-20 08:11:17 +02:00
|
|
|
# symlink shared server components to the server files (could do a find here as above?)
|
2015-07-30 14:45:24 +02:00
|
|
|
rm -fv "${D}"/usr/$(get_libdir)/simias/admin/bin/SimiasClient.dll
|
2013-04-20 08:11:17 +02:00
|
|
|
dosym ../../server/bin/SimiasClient.dll /usr/$(get_libdir)/simias/admin/bin/SimiasLib.dll
|
2015-07-30 14:45:24 +02:00
|
|
|
rm -fv "${D}"/usr/$(get_libdir)/simias/admin/bin/SimiasLib.dll
|
2013-04-20 08:11:17 +02:00
|
|
|
dosym ../../server/bin/SimiasLib.dll /usr/$(get_libdir)/simias/admin/bin/SimiasLib.dll
|
2015-07-30 14:45:24 +02:00
|
|
|
rm -fv "${D}"/usr/$(get_libdir)/simias/webaccess/bin/SimiasLib.dll
|
2013-04-20 08:11:17 +02:00
|
|
|
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
|
2011-06-08 17:26:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
|
2015-07-30 14:45:24 +02:00
|
|
|
echo ""
|
2013-04-20 08:11:17 +02:00
|
|
|
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."
|
2011-06-08 17:26:24 +02:00
|
|
|
echo ""
|
|
|
|
ewarn "You MUST add \"-D MONO\" to APACHE2_OPTS in /etc/conf.d/apache2"
|
|
|
|
echo ""
|
2013-04-20 08:11:17 +02:00
|
|
|
ewarn "You can check by running ps aux | grep mono"
|
2011-06-08 17:26:24 +02:00
|
|
|
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"
|
2013-04-20 08:11:17 +02:00
|
|
|
echo ""
|
|
|
|
ewarn "!!! Please make sure that your apache is configured corectly and is running !!!"
|
|
|
|
ewarn "!!! before you start the configuration of the iFolder System !!!"
|
2011-06-08 17:26:24 +02:00
|
|
|
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"
|
|
|
|
|
|
|
|
}
|