pacstall / libpacstall

Backend API library for Pacstall
GNU General Public License v3.0
5 stars 0 forks source link

PACBUILD spec #105

Open Elsie19 opened 1 year ago

Elsie19 commented 1 year ago
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

Common code in both Pacscripts and PACBUILDs

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