APKBUILD examples:Subpackages: Difference between revisions
(Created page with "Consider the following APKBUILD snippet: pkgname="foo" subpackages="$pkgname-dev $pkgname-doc py-$pkgname:pysub libfoo" It will ... * create the following 5 packages: # foo (m...") |
(use cat template) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Consider the following APKBUILD snippet: | Consider the following APKBUILD snippet: | ||
{{cat|foo/APKBUILD|<nowiki>... | |||
pkgname="foo" | |||
subpackages="$pkgname-dev $pkgname-doc py-$pkgname:pysub libfoo" | |||
...</nowiki>}} | |||
It will ... | It will ... | ||
Line 17: | Line 19: | ||
# ''pysub()'': will be provided by the user (and can make use of the ''$subpkgdir'' variable). | # ''pysub()'': will be provided by the user (and can make use of the ''$subpkgdir'' variable). | ||
# ''libfoo()'': will be provided by the user (and can make use of the ''$subpkgdir'' variable). | # ''libfoo()'': will be provided by the user (and can make use of the ''$subpkgdir'' variable). | ||
[[Category:Development]] |
Latest revision as of 22:27, 16 September 2023
Consider the following APKBUILD snippet:
Contents of foo/APKBUILD
...
pkgname="foo"
subpackages="$pkgname-dev $pkgname-doc py-$pkgname:pysub libfoo"
...
It will ...
- create the following 5 packages:
- foo (main)
- foo-dev (sub)
- foo-doc (sub)
- py-foo (sub)
- libfoo (sub)
- using the following 5 package functions (respectively) to fill them with files:
- package(): will be provided by the user (and can make use of the $pkgdir variable).
- dev(): will be provided by abuild unless we override it, by providing our own dev() function (which can make use of the $subpkgdir variable).
- doc(): will be provided by abuild unless we override it, by providing our own doc() function (which can make use of the $subpkgdir variable).
- pysub(): will be provided by the user (and can make use of the $subpkgdir variable).
- libfoo(): will be provided by the user (and can make use of the $subpkgdir variable).