From owner-freebsd-ports@FreeBSD.ORG Thu Apr 9 10:54:13 2009 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91579106564A for ; Thu, 9 Apr 2009 10:54:13 +0000 (UTC) (envelope-from lupe@lupe-christoph.de) Received: from buexe.b-5.de (buexe.b-5.de [84.19.0.30]) by mx1.freebsd.org (Postfix) with ESMTP id 20CB78FC0A for ; Thu, 9 Apr 2009 10:54:12 +0000 (UTC) (envelope-from lupe@lupe-christoph.de) Received: from alanya.lupe-christoph.de (alanya.lupe-christoph.de [172.17.0.19]) by buexe.b-5.de (8.13.8/8.13.8/b-5/buexe-3.6.3) with ESMTP id n39AhPhW003465; Thu, 9 Apr 2009 12:43:25 +0200 Received: from localhost (localhost [127.0.0.1]) by alanya.lupe-christoph.de (Postfix) with ESMTP id CF03F2C1DC; Thu, 9 Apr 2009 12:42:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at lupe-christoph.de Received: from alanya.lupe-christoph.de ([127.0.0.1]) by localhost (alanya.lupe-christoph.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JlTwIWtP2cpZ; Thu, 9 Apr 2009 12:42:27 +0200 (CEST) Received: by alanya.lupe-christoph.de (Postfix, from userid 1000) id 58BA22C1E6; Thu, 9 Apr 2009 12:42:27 +0200 (CEST) Date: Thu, 9 Apr 2009 12:42:27 +0200 From: Lupe Christoph To: Guido Falsi Message-ID: <20090409104226.GD9629@lupe-christoph.de> References: <20090409094545.GB43377@megatron.madpilot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090409094545.GB43377@megatron.madpilot.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: ports@freebsd.org Subject: Re: squidguard and default blacklists in plist X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2009 10:54:13 -0000 On Thursday, 2009-04-09 at 11:45:45 +0200, Guido Falsi wrote: This is how sysutils/munin=node does it: Makefile: post-install: ... ${INSTALL_DATA} ${FILESDIR}/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample @if [ ! -f ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf ]; then \ ${INSTALL_DATA} ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf; \ fi ... pkg-plist: @unexec if cmp -s %D/etc/munin/plugin-conf.d/plugins.conf %D/etc/munin/plugin-conf.d/plugins.conf.sample; then rm -f %D/etc/munin/plugin-conf.d/plugins.conf; fi etc/munin/plugin-conf.d/plugins.conf.sample I.e. I install the config provided by Munin as plugins.conf.sample. If there is no plugins.conf, I copy plugins.conf.sample to plugins.conf. On deinstall, I check if plugins.conf has been modified by comparing it to the sample. If it hasn't (e.g. package build), I remove it. Then i remove the sample. I believe this is a simple and robust method. HTH, Lupe Christoph -- | There is no substitute for bad design except worse design. | | /me |