# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit flag-o-matic user MY_P="${PN}-${PV/_rc/-RC}" DESCRIPTION="Open Decentralized Platform for Collaborative Search, Filtering and content Curation" HOMEPAGE="http://www.seeks-project.info/" SRC_URI="mirror://sourceforge/${PN}/hippy/${MY_P}.tar.gz" LICENSE="AGPL3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="extended-host-patterns +httpserv-plugin +icu +image-websearch-plugin keepalive +opencv perl +personalization xslserializer-plugin +zlib" RDEPEND=" dev-cpp/gtest dev-libs/libevent dev-libs/libpcre:3 dev-libs/libxml2 dev-libs/protobuf net-misc/curl net-misc/tokyotyrant icu? ( dev-libs/icu ) opencv? ( media-libs/opencv ) perl? ( dev-lang/perl ) xslserializer-plugin? ( dev-libs/libxslt ) zlib? ( sys-libs/zlib )" DEPEND="${RDEPEND} virtual/pkgconfig" MAKEOPTS+=" -j1" S=${WORKDIR}/${MY_P} pkg_setup() { enewgroup seeks enewuser seeks -1 -1 /var/lib/seeks seeks if [[ ${MERGE_TYPE} != binary ]]; then append-ldflags $(no-as-needed) fi } src_prepare() { sed -i \ -e '/^logdir/s#\.#/var/log/#' \ -e 's#logfile logfile#logfile seeks\.log#' \ src/config || die sed -i \ -e "s/cxflann.h/cv.h/" \ src/plugins/img_websearch/ocvsurf.cpp || die sed -i \ -e "s/docbook2x-man/true/" \ configure || die } src_configure() { econf \ --sysconfdir=/etc \ --disable-static \ $(use_enable perl) \ $(use_enable icu) \ $(use_enable zlib) \ $(use_enable httpserv-plugin) \ $(use_enable image-websearch-plugin) \ $(use_enable opencv) \ $(use_enable xslserializer-plugin) \ $(use_enable personalization) \ $(use_enable keepalive) \ $(use_enable extended-host-patterns) \ --enable-external-gtest } src_install() { default newinitd "${FILESDIR}"/seeks.initd seeks newconfd "${FILESDIR}"/seeks.conf.d seeks insinto /etc/logrotate.d newins "${FILESDIR}"/seeks.logrotate seeks dodir /var/log touch "${ED%/}"/var/log/seeks.log fowners seeks:seeks /var/log/seeks.log prune_libtool_files }