APKBUILD examples:Special Subpackages Examples: Difference between revisions

From Alpine Linux
m (added to Development Category)
(Removal of explicit return 1. (They are still found the old APKBUILD files if you are learning but are now strongly discouraged.))
Line 6: Line 6:
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>
</pre>


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

Revision as of 20:56, 3 June 2020

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.

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
}