Data files and ports
glarkin at FreeBSD.org
Fri Jun 11 14:17:47 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
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
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:
Note the DISTFILES value and how it is affected by setting NOPORTDOCS.
You can show the different values like so:
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:
This example is somewhat more complicated. I recently worked with
gerald@ to include support for the GNU Java Compiler (gcj) in the gcc45
Search for "WITHOUT_JAVA" in the file, and you can see some use of
additional distribution files, including the use of tagging
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,
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/
-----END PGP SIGNATURE-----
More information about the freebsd-ports