Understanding Ports Skeleton In FreeBSD

Understanding Ports Skeleton In FreeBSD

   

This post was last updated on August 1st, 2020 at 12:09 pm

In FreeBSD, there are two ways to install software packages: pkg and ports collection. The pkg is used to install from prebuilt binaries while the ports are compiled and install from the source of an application.

In this article, we will understand the ports skeleton and how a port or package is compiled and installed in FreeBSD.

What is ports collection

So before we discuss ports skeleton you should understand the ports collection and how ports collection is used to install packages in FreeBSD.

Ports collection in FreeBSD offers a simple way to compile and install third-party applications. It is also used to build packages that are to be installed using pkg.  Ports collection can be installed and updated using portsnap.

By default, it gets stored as the subdirectory of /usr/ports.

Now if you run the following command you will see different categories of softwares –

ls /usr/ports

 

If you move into any of these categories you will see the related software packages these packages are known as ports.

cd editors
ls | more

You can see a list of ports in the image below –

 

What is ports skeleton

In ports collection, each application subdirectory contains a set of files that tells FreeBSD how to compile and install that application, known as ports skeleton. Now if you move into any one of listed ports and run the following command you will see a set of files –

ls

Each of the ports contains the following files and directories –

Makefile –

This file contains the statements that specify how the application should be compiled and its components will be installed on a system.

distinfo –

It contains the name and checksum of the file that must be downloaded to build the port.

pkg-descr –

This file describes a port completely enough so that a user is not needed to see the documentation or visit its website.

pkg-plist –

It contains the list of all the files that will be installed by the port. This file is also called the ‘packing list’ because the package is built by packing the files listed here. It also tells the system which files to remove when the package is deinstalled.

files/ –

This directory contains patches and some other files that are required to compile and install or build an application in FreeBSD.

Some applications or ports include pkg-message and such other files to handle the special situation. These ports don’t include actual source code, which is also known as distfile. It automatically downloads the source code of a port whenever required and saves it in /usr/ports/destfiles.

Ok, that’s all for now. If you want to say something on this topic then write to us in the comments below.

Previous MAKE error for GPU BURN
Next modifer keys have decided they want to randomly stick!

About author

You might also like

FreeBSD Topics 0 Comments

How To Execute A Command With Superuser Privilege In FreeBSD?

This post was last updated on August 1st, 2020 at 10:28 amA superuser or root user is a most privileged user account in FreeBSD. It has access to all the

FreeBSD Topics 0 Comments

How To Make A File Write Protected And Undeletable In FreeBSD?

This post was last updated on August 1st, 2020 at 10:19 amFreeBSD operating system has an extra security feature for files called file flags. It provides additional control over files,

FreeBSD Topics 0 Comments

[FreeBSD] How to set and unset loader variables in boot loader prompt

This post was last updated on February 17th, 2019 at 06:08 amImportant question is why you need to set and unset variables at boot time???The answer is when something is

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply