From owner-freebsd-ports@FreeBSD.ORG Tue May 15 17:29:57 2012 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 5AA4D1065672 for ; Tue, 15 May 2012 17:29:57 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id CEA668FC12 for ; Tue, 15 May 2012 17:29:56 +0000 (UTC) Received: by bkvi18 with SMTP id i18so5581059bkv.13 for ; Tue, 15 May 2012 10:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Urs207es0dwwKd78AdVw1ctbhFoq2+IQu9qcLnlqNuo=; b=FntxNAkryUAe5zt/+vJGYz7QAJT3b/ilaubcPvEssORNy8XFuddOYNhWIVT5cso1ey xBEdf8XBsPrELomP2hQzgqpgL3e+hBtfdvU9oDhMSBHutNz3FjIAIgpav11dXli9Hkzn Hexaqb+OEab3GrIKVAJJSM4ef6E61hwluhkfj1Hphn6Z8jzxOb90+mFtfPnWae6K2Gq4 3rmHRk4AJJOeaqjC//kmupoK6UoBhT9LgI+McvGC/aWXDdbRn+J9EF4zv6YlfeAGYC+j Cvp/ixbnmsX7vXvbgdqHshWic+7iv50YaDMsKwgWRHlrGgJflcTpUig2rDjb8uzIo/TQ tFOQ== Received: by 10.205.33.136 with SMTP id so8mr4766285bkb.1.1337102995572; Tue, 15 May 2012 10:29:55 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.171.138 with HTTP; Tue, 15 May 2012 10:29:18 -0700 (PDT) In-Reply-To: References: From: Chris Rees Date: Tue, 15 May 2012 18:29:18 +0100 X-Google-Sender-Auth: XE7N8IPOGAChqILd8ze13Kcz1SA Message-ID: To: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports@freebsd.org Subject: Re: On file installation 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: Tue, 15 May 2012 17:29:57 -0000 On 15 May 2012 18:14, Fernando Apestegu=EDa = wrote: > On Mon, May 14, 2012 at 7:40 PM, Fernando Apestegu=EDa > wrote: >> On Mon, May 14, 2012 at 7:31 PM, Chris Rees wrote: >>> On 14 May 2012 18:23, Fernando Apestegu=EDa wrote: >>>> Hi, >>>> >>>> I'm working on a port for an application written in Java and I'm >>>> having some problems deciding how to install the application. >>>> Previous to the installation, the WRKSRC directory contains some .jar >>>> files and some directories along with some .txt files for >>>> licenses, but also some .exe and .bat files _which I don't want to >>>> install_. It is basically a package that contains both files for >>>> windows and non-windows systems. >>>> >>>> I was thinking on using COPYTREE_SHARE to install everything and then >>>> remove the non necessary files, but doesn't look like >>>> an elegant solution. Also, I wouldn't like to explicitly specify every >>>> one of the files I want to copy. Is there a way of using something >>>> similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to = proceed? >>>> >>>> I already looked at the existent ports to find something similar but >>>> it seems hard to find. I also had a look at bsd.port.mk but >>>> I couldn't find what I'm looking for. >>> >>> You can use find primaries with COPYTREE_SHARE such as; >>> >>> (cd ${WRKSRC}/wherever && ${COPYTREE_SHARE} \* >>> ${JAVALIBDIR}/${PORTNAME}/wherever "-not -name \*.exe -and -not -name >>> \*.bat" >> >> Thanks! I think that is what I was looking for :) > > Sorry guys, but I think I need more help :). I tried with the following l= ine: > > ( cd ${WRKSRC}/JDownloader && ${COPYTREE_SHARE} \* > ${PREFIX}/${PORTNAME}/ "! -name \*.exe" ) > > but it doesn't seem to follow primaries and it still installs the .exe > files. I just tried with: > > ( cd ${WRKSRC}/JDownloader && ${COPYTREE_SHARE} \* > ${PREFIX}/${PORTNAME}/ "! -name JDownloader.exe" ) > > and check that effectively the file is not installed so I suppose this > has something to do with quoting and escaping special characters (the > asterisk). I found the following line in audio/xmp/Makefile: > > ( cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0${DOCSDIR} '! ( -name Makefile -or -name x= mp.1 \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-or -name *.bak -or -name *.orig )' ) > > that seems pretty close to what I'm trying to do, so I tried with this: > > ( cd ${WRKSRC}/JDownloader && ${COPYTREE_SHARE} \* > ${PREFIX}/${PORTNAME}/ '! ( -name *.exe )' ) > > but then, the asterisk is expanded and find fails: > > find: JDownloader.exe: unknown primary or operator > > what am I doing wrong? Escape the *; (cd ${WRKSRC}/JDownloader && ${COPYTREE_SHARE} \* ${PREFIX}/${PORTNAME}/ '! ( -name \*.exe )' ) Chris