From owner-svn-ports-all@FreeBSD.ORG Thu Jun 5 12:53:39 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38FE84DC; Thu, 5 Jun 2014 12:53:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 181FD28FF; Thu, 5 Jun 2014 12:53:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55CrcaS047607; Thu, 5 Jun 2014 12:53:38 GMT (envelope-from pawel@svn.freebsd.org) Received: (from pawel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55CrcDL047605; Thu, 5 Jun 2014 12:53:38 GMT (envelope-from pawel@svn.freebsd.org) Message-Id: <201406051253.s55CrcDL047605@svn.freebsd.org> From: Pawel Pekala Date: Thu, 5 Jun 2014 12:53:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r356631 - in head/mail/popfile: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 12:53:39 -0000 Author: pawel Date: Thu Jun 5 12:53:38 2014 New Revision: 356631 URL: http://svnweb.freebsd.org/changeset/ports/356631 QAT: https://qat.redports.org/buildarchive/r356631/ Log: - Add staging support - Use options helpers - Rephrase options descriptions to modern standards, use default for SSL - Use shebangfix for popfile.pl and SUB_FILES for popfile.sh instead of post-patch sed manipulations Added: head/mail/popfile/files/popfile.sh.in - copied unchanged from r356628, head/mail/popfile/files/popfile.sh Deleted: head/mail/popfile/files/popfile.sh Modified: head/mail/popfile/Makefile Modified: head/mail/popfile/Makefile ============================================================================== --- head/mail/popfile/Makefile Thu Jun 5 12:34:21 2014 (r356630) +++ head/mail/popfile/Makefile Thu Jun 5 12:53:38 2014 (r356631) @@ -18,69 +18,46 @@ RUN_DEPENDS= p5-DBD-SQLite>=0:${PORTSDIR p5-HTML-Tagset>=0:${PORTSDIR}/www/p5-HTML-Tagset \ p5-HTML-Template>=0:${PORTSDIR}/www/p5-HTML-Template -OPTIONS_DEFINE= SSL XMLRPC UPGRADE_FROM_0_20 KAKASI MECABU -SSL_DESC= \ - Depend SSL libraries/modules to use SSL connection to the servers -XMLRPC_DESC= \ - Depend SOAP libraries to use POPFile as XMLRPC server -UPGRADE_FROM_0_20_DESC= \ - Depend BerkeleyDB libraries to upgrade old POPFile corpus -KAKASI_DESC= \ - Depend Kakasi library to handle Japanese text -MECABU_DESC= \ - Depend MeCab library to handle Japanese text - NO_WRKSUBDIR= yes NO_BUILD= yes -USES= perl5 zip +USES= perl5 shebangfix zip USE_PERL5= run +SHEBANG_FILES= popfile.pl PLIST_SUB= VERSION="${PORTVERSION}" +SUB_FILES= popfile.sh -NO_STAGE= yes -.include +OPTIONS_DEFINE= SSL XMLRPC UPGRADE_FROM_0_20 KAKASI MECABU -.if ${PORT_OPTIONS:MSSL} # POPFile works with IO::Socket::SSL version 1.07 (and not 0.97/0.99). -RUN_DEPENDS+= p5-IO-Socket-SSL>=1.07:${PORTSDIR}/security/p5-IO-Socket-SSL -.endif +SSL_RUN_DEPENDS=p5-IO-Socket-SSL>=1.07:${PORTSDIR}/security/p5-IO-Socket-SSL + +XMLRPC_DESC= POPFile as XMLRPC server +XMLRPC_RUN_DEPENDS= p5-SOAP-Lite>=0:${PORTSDIR}/net/p5-SOAP-Lite -.if ${PORT_OPTIONS:MXMLRPC} -RUN_DEPENDS+= p5-SOAP-Lite>=0:${PORTSDIR}/net/p5-SOAP-Lite -.endif +UPGRADE_FROM_0_20_DESC= Upgrade old POPFile corpus +UPGRADE_FROM_0_20_RUN_DEPENDS= p5-BerkeleyDB>=0:${PORTSDIR}/databases/p5-BerkeleyDB + +KAKASI_DESC= Handle Japanese text via Kakasi library +KAKASI_RUN_DEPENDS= p5-Text-Kakasi>=0:${PORTSDIR}/japanese/p5-Text-Kakasi + +MECABU_DESC= Handle Japanese text via MeCab library +MECABU_RUN_DEPENDS= p5-MeCab>=0:${PORTSDIR}/japanese/p5-MeCab #.if ${PORT_OPTIONS:MSOCKS} # XXX: IO::Socket::Socks should be listed here but no ports yet. For those # interested, check http://search.cpan.org/~reatmon/IO-Socket-Socks-0.1/. #.endif -.if ${PORT_OPTIONS:MUPGRADE_FROM_0_20} -RUN_DEPENDS+= p5-BerkeleyDB>=0:${PORTSDIR}/databases/p5-BerkeleyDB -.endif - -.if ${PORT_OPTIONS:MKAKASI} -RUN_DEPENDS+= p5-Text-Kakasi>=0:${PORTSDIR}/japanese/p5-Text-Kakasi -.endif - -.if ${PORT_OPTIONS:MMECAB} -RUN_DEPENDS+= p5-MeCab>=0:${PORTSDIR}/japanese/p5-MeCab -.endif - -post-patch: - @${REINPLACE_CMD} -e \ - 's|^#!/usr/bin/perl$$|#!${PERL}|' ${WRKSRC}/popfile.pl - @${SED} 's|%%DATADIR%%|${DATADIR}|' \ - < ${FILESDIR}/popfile.sh > ${WRKDIR}/popfile.sh - do-install: - ${INSTALL_SCRIPT} ${WRKDIR}/popfile.sh ${PREFIX}/sbin - @${MKDIR} ${DATADIR} - (cd ${WRKSRC} && ${INSTALL_SCRIPT} *.pl ${DATADIR}) - (cd ${WRKSRC} && ${INSTALL_DATA} \ - stopwords *.change* *.gif *.ico *.pck *.png ${DATADIR}) + ${INSTALL_SCRIPT} ${WRKDIR}/popfile.sh ${STAGEDIR}${PREFIX}/sbin + @${MKDIR} ${STAGEDIR}${DATADIR} + (cd ${WRKSRC} && ${INSTALL_SCRIPT} *.pl ${STAGEDIR}${DATADIR}) + (cd ${WRKSRC} && ${INSTALL_DATA} stopwords *.change* *.gif *.ico \ + *.pck *.png ${STAGEDIR}${DATADIR}) .for i in Classifier POPFile Proxy Services UI languages skins - @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${i} ${DATADIR}) + @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${i} ${STAGEDIR}${DATADIR}) .endfor .include Copied: head/mail/popfile/files/popfile.sh.in (from r356628, head/mail/popfile/files/popfile.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/popfile/files/popfile.sh.in Thu Jun 5 12:53:38 2014 (r356631, copy of r356628, head/mail/popfile/files/popfile.sh) @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $FreeBSD$ +# +case "${HOME}" in +"") + export POPFILE_USER_DEFAULT=/var/db/popfile + ;; +*) + export POPFILE_USER_DEFAULT="${HOME}/.popfile" + ;; +esac + +die() +{ + echo "$1" + exit 1 +} + +export POPFILE_ROOT=%%DATADIR%% +export POPFILE_USER=${POPFILE_USER:-${POPFILE_USER_DEFAULT}} + +mkdir -p "${POPFILE_USER}" || die "mkdir ${POPFILE_USER} failed" +cd "${POPFILE_USER}" +%%DATADIR%%/popfile.pl >/dev/null 2>&1 &