Skip to content
This repository was archived by the owner on May 2, 2024. It is now read-only.
This repository was archived by the owner on May 2, 2024. It is now read-only.

PACBUILD spec #105

@Elsie19

Description

@Elsie19
pkgname='potato'
pkgver='1.0.0'   # this is the variable pkgver, can also be a function that will return dynamic version, but both are required for VCS packages
pkgrel=2         # If a PACBUILD is modified that could affect the resulting package but no package update
epoch='0'        # force package to be seen as newer no matter what
pkgdesc='Pretty obvious
Long description'
url='https://potato.com'
license="Apache-2.0 OR MIT"
arch=('any' 'x86_64' 'x86') # Valid arches defined here: https://doc.rust-lang.org/std/env/consts/constant.ARCH.html. `any` and the other arches are mutually exclusive.
maintainer='Elsie19 <hwengerstickel@pm.me>'
repology=("project: ${pkgname}")
source=(
  "https://potato.com/${pkgver}.tar.gz"
  "potato.tar.gz::https://potato.com/${pkgver}.tar.gz"                                                    # with a forced download name
  "${pkgname}::git+https://github.com/pacstall/pacstall"                                                  # git repo
  "${pkgname}::https://github.com/pacstall/pacstall/releases/download/2.0.1/pacstall-2.0.1.deb::repology" # use changelog with repology
  "${pkgname}::git+https://github.com/pacstall/pacstall#branch=master"                                    # git repo with branch
  "${pkgname}::git+file://home/henry/pacstall/pacstall"                                                   # local git repo
  "patch-me-harder.patch::https://potato.com/patch-me.patch"
) # also source_amd64=(), source_i386=()

noextract=(
  "${pkgver}.tar.gz"
)

sha256sums=(
  'e69fcf51c211772d4f193f3dc59b1e91607bea7e53999f1d5e03ba401e5da969'
  'SKIP'
  'SKIP'
  'etc'
) # can also do sha256sums_amd64=(), repeat for sha384, sha512, and b2

optdepends=(
  'same as pacstall: yes'
) # rince and repeat optdepends_$arch=()

depends=(
  'hashbrowns: >=1.8.0'
  'mashed-potatos: ^1.9.0'
  'gravy: ~2.3.0'
  'applesauce: >3.*'
  'chicken: <2.0.0'
  'libappleslices.so'
  'libdeepfryer.so: 3'
)

makedepends=(
  'whisk'
  'onions'
)

checkdepends=(
  'customer_satisfaction'
)

ppa=('mcdonalds/ppa')

provides=(
  'mashed-potatos'
  'aaaaaaaaaaaaaaaaaaaaaaaaaa'
)

conflicts=(
  'KFC'
  'potato_rights'
) # can also do conflicts_$arch=()

replaces=(
  'kidney_beans'
)

backup=(
  'etc/potato/prepare.conf'
  'r:etc/mashed_potato/prepare.conf'
)

options=(
  '!strip'
  '!docs'
  'etc'
)

groups=('potato-clan')

incompatible=('debian::jessy' 'ubuntu::20.04')

prepare() {
  cd "${pkgname}-${pkgver}"
  patch -p1 -i "${srcdir}/patch-me-harder.patch"
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr
  make
}

check() {
  cd "${pkgname}-${pkgver}"
  make -k check
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}/" install
}

pre_install() {
  echo "potato"
}

post_install() {
  echo "potato"
}

pre_upgrade() {
  echo "potato"
}

post_upgrade() {
  echo "potato"
}

pre_remove() {
  echo "potato"
}

post_remove() {
  echo "potato"
}

pre_purge() {
  echo "potato"
}

post_purge() {
  echo "potato"
}

Key changes from PKGBUILD

  • license is now a license expression that can be used to better describe software licenses.
  • pkgdesc allows for long descriptions.
  • maintainer is now a variable.
  • repology array exists.
  • {make,check,}depends have more complex version specifiers
  • ppa array exists.
  • backup array can have r: specifier to remove stale config files on install/upgrade. Those denoted with r: cannot be in the final deb.
  • incompatible array exists.
  • All postscripts are moved from install=file to main file.

Common code in both Pacscripts and PACBUILDs

  • maintainer, we don't need to do much to convert if we end up using a variable instead of array.
  • repology, nothing to be changed.
  • ppa, nothing to be changed.
  • backup, nothing to be changed.
  • incompatible, add extra : to align with PACBUILD style.
  • optdepends, nothing to be changed.
  • depends, nothing to be changed.
  • build_depends -> makedepends.

Full list of stuff we need to implement from PKGBUILDs

https://wiki.archlinux.org/title/PKGBUILD

  1. pkgbase
  2. pkgname
  3. pkgver
  4. pkgver()
  5. pkgrel
  6. epoch
  7. pkgdesc
  8. arch
  9. url
  10. license
  11. groups
  12. depends
  13. makedepends
  14. checkdepends
  15. optdepends
  16. provides
  17. conflicts
  18. replaces
  19. backup
  20. options
  21. source
  22. noextract
  23. sha256sums

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaRelated to the repository itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions