From owner-freebsd-ports@FreeBSD.ORG Wed Feb 4 09:48:37 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7073310656E8 for ; Wed, 4 Feb 2009 09:48:37 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id F18148FC17 for ; Wed, 4 Feb 2009 09:48:36 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1011290fgb.35 for ; Wed, 04 Feb 2009 01:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=1uXiFKjY/F1CCk4ydXkzcP9XlU9y50l0CGjnuYfXRig=; b=FPTSzuk7V8zrND2arE3Z5ThZ6LMQ8KTUnx7+YmAwB1YTN3lcy+12GsCEzsRlqeD3uc +KWsyJ7CmWzP98FysPVf3Ywc0O8zhpLkjmH9MnpIiPqMiHCcLBsq17PhjzZCu6qPVNOa OPZ27fzYQi9TK3pnVErY3BR5pOzpC1XJogW2U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=NnGjYRuehg5JCLqHriNsAhKj+6mKnZe7Rdjlhvk+J6V7dtG3srkynroO6Zw4PIT5Cg igbSRDQ4Num1qzmv450jEuBOQ8sKWH4flSMy5FxWqoka0gfWgyvjkGx6uBMPGLta6Fdy UyU115pijUehvU9mj6O2y+85OvBSSClKlFBrY= MIME-Version: 1.0 Sender: florent.thoumie@gmail.com Received: by 10.86.95.8 with SMTP id s8mr1084550fgb.79.1233740916049; Wed, 04 Feb 2009 01:48:36 -0800 (PST) In-Reply-To: <81F17B20B78F9C5531571788@10.40.128.112> References: <81F17B20B78F9C5531571788@10.40.128.112> Date: Wed, 4 Feb 2009 09:48:36 +0000 X-Google-Sender-Auth: 557192568d540fa8 Message-ID: From: Florent Thoumie To: Paul Schmehl Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: Question about WRKSRC 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: Wed, 04 Feb 2009 09:48:37 -0000 On Wed, Feb 4, 2009 at 4:42 AM, Paul Schmehl wrote: > I maintain the sguil ports; security/sguil-server, security/sguil-sensor and > security/sguil-agent. It came to my attention today that the pkg-install > script that I've written for the security/sguil-server port fails during > package building. (The script works fine when compiling from source.) > > The problem appears to be related to the location of WRCSRC, which appears > to be different than it is when building from source. Am I correct about > that? Is WRCSRC different when building packages? If so, is there a way to > differentiate programmatically between a port being built from source and > one being built from a package? There's no WRKSRC directory when a package is installed. I've had a look at sguil-server and you have two options. The first one is to install your sql script somewhere under ${DATADIR} then read it from there in your pkg-install script. The second, better in my opinion, is to move most of your POST-INSTALL target into a shell script of its own that you'll install in ${DATADIR} (note that it still requires to install that sql file as well). Quick look shows that your port is interactive, and not marked as such in Makefile. If you choose to go with solution #1, then you'll have to set IS_INTERACTIVE=yes (unless I'm wrong of course). -- Florent Thoumie flz@FreeBSD.org FreeBSD Committer