ALPM-PACKAGE-BASE(7)

πŸ“¦ version 0.13.0, in arch rolling

πŸ’… ALPM-PACKAGE-BASE(7) β€” the group chat edition

okay so this is the alpm-package-base page, and it lives in the Miscellaneous Information Manual, section 7. grab a snack, bestie, we're learning where packages come from πŸŽ€


✨ NAME ✨

package base β€” an identifier that tracks from which sources an ALPM based package originates. it's giving "everyone's birth certificate, but for packages" πŸ‘‘


🌸 DESCRIPTION 🌸

the package base format is literally just an identifier, and what it does is describe the source origin of each alpm-package file. like, which source did you come from, bestie? 🫢 it's especially iconic in alpm-split-package files, where it keeps track of the sources each package file gets built from.

more specifically (ngl, this one gets around), the alpm-package-base format shows up allll throughout the package management life cycle:

  • in build scripts and source metadata files (i.e. PKGBUILD and SRCINFO) πŸ› οΈ
  • in file formats for package metadata (i.e. BUILDINFO and PKGINFO) πŸ“¦
  • in file formats for repository metadata (i.e. alpm-repo-desc) πŸ—‚οΈ
  • and in system state metadata (i.e. alpm-db-desc) πŸ’Ύ

πŸ¦‹ General Format

okay so the identifier name for alpm-package-base can differ depending on context β€” different vibes, different contexts, we get it β€” however, the value restrictions for it are literally the same as those for alpm-package-name. no cap, same rules, always. ⭐


πŸ’– EXAMPLES πŸ’–

the PKGBUILD of a package named example, that implicitly specifies its alpm-package-base as example. (implicit?? yes bestie, it just knows.)

pkgname=example
pkgver=1.0.0
pkgrel=1
pkgdesc="An example package"
arch=(any)
url="https://example.org"
license=('CC0-1.0')

package() {
  install -vdm 755 "$pkgdir/usr/share/doc/$pkgname/"
  printf "example\n" > "$pkgdir/usr/share/doc/$pkgname/example.txt"
}

the PKGBUILD of a package named example, that explicitly specifies its alpm-package-base as something-else. plot twist 🫒

pkgname=example
pkgbase=something-else
pkgver=1.0.0
pkgrel=1
pkgdesc="An example package"
arch=(any)
url="https://example.org"
license=('CC0-1.0')

package() {
  install -vdm 755 "$pkgdir/usr/share/doc/$pkgname/"
  printf "example\n" > "$pkgdir/usr/share/doc/$pkgname/example.txt"
}

the PKGBUILD of a split package setup with the packages example and other-example that both share the implicit alpm-package-base example. shared base, two packages, main character energy 🌈

pkgname=(
  example
  other-example
)
pkgver=1.0.0
pkgrel=1
pkgdesc="An example package"
arch=(any)
url="https://example.org"
license=('CC0-1.0')

package_example() {
  install -vdm 755 "$pkgdir/usr/share/doc/$pkgname/"
  printf "example\n" > "$pkgdir/usr/share/doc/$pkgname/example.txt"
}

package_other-example() {
  install -vdm 755 "$pkgdir/usr/share/doc/$pkgname/"
  printf "other-example\n" > "$pkgdir/usr/share/doc/$pkgname/example.txt"
}

the PKGBUILD of a split package setup with the packages example1 and example2 that both share the explicit alpm-package-base example. look at them, matching outfits πŸ’œ

pkgname=(
  example1
  example2
)
pkgbase=example
pkgver=1.0.0
pkgrel=1
pkgdesc="An example package"
arch=(any)
url="https://example.org"
license=('CC0-1.0')

package_example1() {
  install -vdm 755 "$pkgdir/usr/share/doc/$pkgname/"
  printf "example1\n" > "$pkgdir/usr/share/doc/$pkgname/example.txt"
}

package_example2() {
  install -vdm 755 "$pkgdir/usr/share/doc/$pkgname/"
  printf "example2\n" > "$pkgdir/usr/share/doc/$pkgname/example.txt"
}

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, bestie, they're all linked and they're all worth it πŸ”₯


πŸ’€ reminder that the value restrictions here are the same as alpm-package-name β€” don't go inventing your own rules, iykyk.

and that's the whole page, bestie 🧚 this one's from the Miscellaneous Information Manual, section 7 β€” mwah, go slay your PKGBUILD πŸ’…βœ¨

πŸ“¦ where this page comes from