Difference between revisions of "Create Manjaro Packages"
→Guidelines for creating Manjaro packages
imported>Philm |
imported>Richard |
||
Line 1: | Line 1: | ||
=Guidelines for creating Manjaro packages= | =Guidelines for creating Manjaro packages= | ||
This article aims to assist users creating their own packages using | This article aims to assist users creating their own packages using Manjaro optimized [[devtools]], also for submission in Manjaro binary repositories. It covers creation of a [[PKGBUILD]], a package build description file sourced by {{ic|makepkg}} to create a binary package from source. If already in possession of a {{ic|PKGBUILD}} (see [[makepkg]]). For instructions regarding existing rules and ways to improve package quality see [[Manjaro Packaging Standards]]. | ||
== Overview == | == Overview == | ||
Line 47: | Line 47: | ||
== Creating a PKGBUILD == | == Creating a PKGBUILD == | ||
When you run {{ic|makepkg}}, it will look for a {{ic|PKGBUILD}} file in the present working directory. If a {{ic|PKGBUILD}} file is found it will download the software's source code and compile it according to the instructions specified in the {{ic|PKGBUILD}} file. The instructions must be fully interpretable by the [[Wikipedia:Bash_(Unix_shell)|Bash]] shell. After successful completion, the resulting binaries and metadata of the package | When you run {{ic|makepkg}}, it will look for a {{ic|PKGBUILD}} file in the present working directory. If a {{ic|PKGBUILD}} file is found it will download the software's source code and compile it according to the instructions specified in the {{ic|PKGBUILD}} file. The instructions must be fully interpretable by the [[Wikipedia:Bash_(Unix_shell)|Bash]] shell. After successful completion, the resulting binaries and metadata of the package (package version and dependencies,) are packed in a {{ic|pkgname.pkg.tar.xz}} package file that can be installed with {{ic|pacman -U ''<package file>''}}. | ||
To begin with a new package, you should first create an empty working directory, (preferably {{ic|~/abs/'''pkgname'''}}), change into that directory, and create a {{ic|PKGBUILD}} file. You can either copy the prototype PKGBUILD {{ic|/usr/share/pacman/PKGBUILD.proto}} to your working directory or copy a {{ic|PKGBUILD}} from a similar package. The latter may be useful if you only need to change a few options. | To begin with a new package, you should first create an empty working directory, (preferably {{ic|~/abs/'''pkgname'''}}), change into that directory, and create a {{ic|PKGBUILD}} file. You can either copy the prototype PKGBUILD {{ic|/usr/share/pacman/PKGBUILD.proto}} to your working directory or copy a {{ic|PKGBUILD}} from a similar package. The latter may be useful if you only need to change a few options. |