{ S M N }

xbps-src

Part of the Void Linux project.

About

xbps-src itself is nothing but a Bash shell script that allows you to build and install source packages from Void’s GitHub repository into Void’s binaries that you can use XBPS to install.

Link to github.

The main reason you would use it, is to install packages that are not in the official repositories. The core of Void’s method of organizing source packages directories, build directories, and associated build system paths is a clone Void’s GitHub repository of source packages. Therefore, make sure that you have the git package installed.

$ git clone https://github.com/void-linux/void-packages --depth=1

This will create the directory void-packages with the source tree of all Void packages in srcpkgs. The depth flag is very important as it makes sure you don't have to wait for hours to access the software.
Next, you need to go to the directory void-packages and run the following command to bootstrap the binaries used for the compilation or installation.

$ cd void-packages && ./xbps-src binary-bootstrap

Some packages are not in the official repositories, and are restricted. To mitigate this, you have to run this command.

$ echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf

Usage

To build a package, you have to run the following command.

$ ./xbps-src pkg package-name

The above process places the built binary package in the void-packages/hostdir/binpkgs/nonfree/ directory. To install those you can use the wonderfully written xtools package scripts...

$ xi package-name

Or you can use the xbps binaries, and just run the following command.

# xbps-install --repository=hostdir/binpkgs/nonfree package-name

System update

To update all of the system packages with the latest available self compiled packages, you can run the following command.

$ ./xbps-src update-sys

This will update the system with the latest available self compiled packages.

Creating templates

To create a template for a package, you can run the following command provided by the xtools package.

$ xnew [-a pkg [subpkgs ...]]
  – create XBPS template
    -a  append subpkgs to existing pkg

This is quite useful for creating a template for packages that are not available in the official void repositories but you still want to have access to them. Once you make a template for a package, the void comunity and developers might not only improve and maintain your work, but also see that there is demand for such a package to be added to the official repositories.