APKBUILD examples:Subpackages: Difference between revisions

From Alpine Linux
(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...")
 
m (added to Development Category)
Line 17: Line 17:
# ''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]]

Revision as of 05:01, 12 March 2012

Consider the following APKBUILD snippet:

pkgname="foo"
subpackages="$pkgname-dev $pkgname-doc py-$pkgname:pysub libfoo"

It will ...

  • create the following 5 packages:
  1. foo (main)
  2. foo-dev (sub)
  3. foo-doc (sub)
  4. py-foo (sub)
  5. libfoo (sub)
  • using the following 5 package functions (respectively) to fill them with files:
  1. package(): will be provided by the user (and can make use of the $pkgdir variable).
  2. dev(): will be provided by abuild unless we override it, by providing our own dev() function (which can make use of the $subpkgdir variable).
  3. doc(): will be provided by abuild unless we override it, by providing our own doc() function (which can make use of the $subpkgdir variable).
  4. pysub(): will be provided by the user (and can make use of the $subpkgdir variable).
  5. libfoo(): will be provided by the user (and can make use of the $subpkgdir variable).