From owner-freebsd-ports@FreeBSD.ORG Fri Jun 11 14:17:47 2010 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 97EA01065673 for ; Fri, 11 Jun 2010 14:17:47 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id 749078FC15 for ; Fri, 11 Jun 2010 14:17:47 +0000 (UTC) Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235] helo=cube.entropy.prv) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1ON53J-000BVq-9u; Fri, 11 Jun 2010 10:17:46 -0400 Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12]) by cube.entropy.prv (Postfix) with ESMTP id 4F23E4129363; Fri, 11 Jun 2010 10:17:45 -0400 (EDT) Message-ID: <4C12458A.10109@FreeBSD.org> Date: Fri, 11 Jun 2010 10:17:46 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Jesse Smith References: <1276264730.2503.20.camel@hp-laptop> In-Reply-To: <1276264730.2503.20.camel@hp-laptop> X-Enigmail-Version: 0.96.0 OpenPGP: id=1C940290 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) Cc: freebsd-ports Subject: Re: Data files and ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 14:17:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jesse Smith wrote: > I'm trying to teach myself how to build a FreeBSD port and, with a lot > of help from the manual, it's going well. I have a question though > concerning policy/style. > > I'm trying to port a program which is distributed in two separate > packages from the upstream project. One package contains the executable > program and the other contains data files. The Data package rarely > changes. The idea being packaging them together would use up a lot of > extra bandwidth. > > Which brings me to the question: Since the executable relies on the data > files being in place before it's run, how should I handle that in the > port? Should I just get the executable to install and let the user > manually get the data files? Should I create a second port for the data > package? Or should I find some way of making the executable's makefile > download and unpack the data package? > > My instinct is to create a separate port for the Data package and list > it as a dependency for the Executable port. I'd appreciate some > guidance. > > Thanks. Hi Jesse, Welcome to the fray, and I'm glad to hear that you're learning how to develop FreeBSD ports! To answer your question - your port Makefile can download multiple distribution files from the upstream download site. For a couple of examples, see these Makefiles: #1 - www/zend-framework: http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/zend-framework/Makefile?rev=1.48;content-type=text%2Fplain Note the DISTFILES value and how it is affected by setting NOPORTDOCS. You can show the different values like so: cd /usr/ports/www/zend-framework make -V DISTFILES make NOPORTDOCS=yes -V DISTFILES The ZF port is a little different than yours because the distribution files do change at each release, but the idea is the same. #2 - lang/gcc45: http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/gcc45/Makefile?rev=1.444;content-type=text%2Fplain This example is somewhat more complicated. I recently worked with gerald@ to include support for the GNU Java Compiler (gcj) in the gcc45 port. Search for "WITHOUT_JAVA" in the file, and you can see some use of additional distribution files, including the use of tagging (http://www.freebsd.org/doc/en/books/porters-handbook/makefile-distfiles.html#PORTING-MASTER-SITES-N) and preventing some distribution files from being automatically extracted. If you have any further questions about your new port or the examples above, please post back to the list. Hope that helps, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFMEkWK0sRouByUApARAi2RAJ9BsjY6G/uCNpjo5Hb3hMr0my+18gCgzO/N 1zbqQjs5FbBshIvSnYboHn0= =RUVI -----END PGP SIGNATURE-----