# 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 toolchain-funcs DESCRIPTION="Enterprise backend for iFolder" HOMEPAGE="http://www.ifolder.com/" SRC_URI="mirror://sourceforge/ifolder/iFolder%20Server/3.8.0.3/11.1/ifolder3-enterprise.tar.gz -> ${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[static] >=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}" S=${WORKDIR}/${PN} 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}"/use_system_gsoap.patch epatch "${FILESDIR}"/use_wsdl_not_wsdl1.patch epatch "${FILESDIR}"/use_mono_webserver2.patch #epatch "${FILESDIR}"/use_lib_as_libdir_on_amd64.patch epatch "${FILESDIR}"/use_libdir_for_executables.patch epatch "${FILESDIR}"/SimiasLib.dll.config-use-systemwide-FlaimWrapper.so.patch epatch "${FILESDIR}"/www-data_apache.patch epatch "${FILESDIR}"/mod_mono_path.patch epatch "${FILESDIR}"/mod_mono_SimiasServerSetup_cs.patch epatch "${FILESDIR}"/mod_mono_iFolderAdminSetup_cs.patch epatch "${FILESDIR}"/mod_mono_iFolderWebSetup_cs.patch epatch "${FILESDIR}"/convert_relative_path_to_webbindir_variable.patch epatch "${FILESDIR}"/ifdata.patch epatch "${FILESDIR}"/SimiasServerSetup_use_simiasconfdir_in_SetupDefaultConfigPath.patch epatch "${FILESDIR}"/use_webbindir_variable_configurein.patch epatch "${FILESDIR}"/separate_client_server_dirs.patch epatch "${FILESDIR}"/serverpaths_from_configure_v2.patch epatch "${FILESDIR}"/dont_download_deleted_nodes.patch epatch "${FILESDIR}"/remove_nodesFromServer.patch epatch "${FILESDIR}"/home_never_network_drive.patch epatch "${FILESDIR}"/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:///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:///ifolder/" echo "" ewarn "Do NOT use epiphany" }