ELI5: what is the Ports-tree? - BSD
fayesafe
Hey there,

I was thinking about that a very long Time, because i think about changing from linux to BSD or at least switching from arch to a distro that provides some kind of a ports-tree like crux linux does, or gentoo if you want. So, whenever i read about this topic, i cannot find out *in detail* what this is. Is it some kind of Directory, that provides sources and stuff or is it completely different from my idea?
I apologize if this maybe Sounds a Little noobish, but i thought, this'd by the right Place to ask.
venam
If you are on Arch you can try the ABS to get an idea of what ports are like.
https://wiki.archlinux.org/index.php/Arch_Build_System
z3bra
A port-tree is a cook book. But instead of making cakes, you create packages.
Instead of pages, you have directories.
Instead of recipes, you have scripts or makefiles (depending on your system).

The most simple recipe to build a package would be:

Code:
#!/bin/sh

wget http://project.org/download/cookies-0.1.tar.gz
tar xvzf cookies-0.1.tar.zg
cd cookies-0.1
make
make install

Where would you put this recipe ? In your cookbook :

Code:
/usr/cookbook
    |`- fish/
    |`- meat/
    |`- cake/
    |    `- cookies/
    |        `- recipe.sh
     `- drink/

This, tiny boy, is a cookbook port-tree
pizzaroll1
It's just a directory full of Makefiles that fetch the source, build a package and install it. Here is the OpenBSD documentation on what the ports tree is. Basically, if you want to install chromium, for example:
Code:
$ cd /usr/ports/www/chromium
$ sudo make install
And you'll have built and installed a package from source. The directories are laid out like /usr/ports/$CATEGORY/$PACKAGE: for example, irssi is in net/irssi, dmenu is in x11/dmenu, terminus font is in fonts/terminus-font and so on. Generally you might want a ports tree if the prebuilt packages weren't built with a specific feature you want (support for a scripting language, a specific sound server etc) or if there are too many features and you want to cut down.
my website: kaashif.co.uk




Members  |  Stats  |  Night Mode