5db653fc3d
Package-Manager: portage-2.2.0_alpha166 RepoMan-Options: --force
155 lines
5.3 KiB
Bash
155 lines
5.3 KiB
Bash
# Copyright 1999-2013 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.8.4_updates/@${PV/3.8.4./}"
|
|
inherit autotools eutils mono subversion toolchain-funcs versionator
|
|
|
|
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.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.9*
|
|
sys-fs/e2fsprogs
|
|
sys-devel/gcc:4.3"
|
|
RDEPEND=">=dev-lang/mono-2.2
|
|
>=dev-dotnet/log4net-1.2.9
|
|
>=www-apache/mod_mono-1.2.1"
|
|
#PDEPEND="=www-apps/ifolder3-enterprise-plugins-${PV}"
|
|
|
|
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_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}/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}/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
|
|
eautoreconf || die "eautoreconf failed"
|
|
}
|
|
|
|
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() {
|
|
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"
|
|
|
|
}
|