Include:Newapkbuild: Difference between revisions
Prabuanand (talk | contribs) (content updated so that it can transcluded in multiple pages) Tags: Removed redirect Manual revert |
Prabuanand (talk | contribs) (rephrased sentence and added cmd format) |
||
Line 1: | Line 1: | ||
The <code>newapkbuild</code> tool, which is installed as part of the {{Pkg|abuild}} package, can | The <code>newapkbuild</code> tool, which is installed as part of the {{Pkg|abuild}} package, can generate a new APKBUILD template to use as a starting point. The [https://git.alpinelinux.org/abuild/tree/newapkbuild.1.scd manual page] (available via <code>man newapkbuild</code>) describes all options for <code>newapkbuild</code>. | ||
If you doubt to which repository your package belongs to you can safely use testing. Building package in your aports/testing directory is not mandatory but this way the package is already at the right place. | |||
{{Tip|Follow the package naming conventions mentioned in [[Package_policies|package policies]] while choosing a ''packagename''.}} | |||
The following command will create a directory with the given package name, place an example/template APKBUILD file in the directory, and fill some variables if those are provided. {{Cmd|newapkbuild ''packagename''}} | |||
If you are creating a daemon package which needs initd scripts you can add the '''-c''' option as follows:{{Cmd|newapkbuild -c packagename}} | |||
This will copy the sample ''initd'' and ''confd'' files to the build directory. A third file ''sample.install'' file will be copied as well (we will discuss this later on). |
Revision as of 08:46, 26 February 2025
The newapkbuild
tool, which is installed as part of the abuild package, can generate a new APKBUILD template to use as a starting point. The manual page (available via man newapkbuild
) describes all options for newapkbuild
.
If you doubt to which repository your package belongs to you can safely use testing. Building package in your aports/testing directory is not mandatory but this way the package is already at the right place.
The following command will create a directory with the given package name, place an example/template APKBUILD file in the directory, and fill some variables if those are provided.
newapkbuild packagename
If you are creating a daemon package which needs initd scripts you can add the -c option as follows:
newapkbuild -c packagename
This will copy the sample initd and confd files to the build directory. A third file sample.install file will be copied as well (we will discuss this later on).