APKBUILD examples:Special Subpackages Examples: Difference between revisions

From Alpine Linux
m (added to Development Category)
(use cat template)
 
(One intermediate revision by one other user not shown)
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"
...
...
examples() {
examples() {
         # Put the examples into a seperate package
         # Put the examples into a seperate package
         mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/examples || return 1
         mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/examples
         mv "$_builddir"/examples "$subpkgdir"/usr/share/doc/"$pkgname"/examples || return 1
         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 } ...