APKBUILD examples:Special Subpackages Examples: Difference between revisions

From Alpine Linux
(Removal of explicit return 1. (They are still found the old APKBUILD files if you are learning but are now strongly discouraged.))
(use cat template)
 
Line 1: Line 1:
Examples files can be useful it you want to get familiar with a tool. Normally the examples are not needed to run an application or a tool.
Examples files can be useful it you want to get familiar with a tool. Normally the examples are not needed to run an application or a tool.


<pre>
{{cat|APKBUILD|<nowiki>...
subpackages="$pkgname-examples"
subpackages="$pkgname-examples"
...
...
Line 9: Line 9:
         mv "$_builddir"/examples "$subpkgdir"/usr/share/doc/"$pkgname"/examples
         mv "$_builddir"/examples "$subpkgdir"/usr/share/doc/"$pkgname"/examples
}
}
</pre>
...</nowiki>}}


[[Category:Development]]
[[Category:Development]]

Latest revision as of 22:30, 16 September 2023

Examples files can be useful it you want to get familiar with a tool. Normally the examples are not needed to run an application or a tool.

Contents of APKBUILD

... subpackages="$pkgname-examples" ... examples() { # Put the examples into a seperate package mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/examples mv "$_builddir"/examples "$subpkgdir"/usr/share/doc/"$pkgname"/examples } ...