# Maintainer: Erich Eckner # Contributor: Adrian C. pkgname=alpine pkgver=2.24.2.r24.b465d22 _commit=${pkgver##*.} pkgrel=1 arch=("i686" "pentium4" "x86_64") pkgdesc="Apache licensed PINE mail user agent" url="http://alpine.freeiz.com" license=("APACHE") _pinned_dependencies=( 'glibc>=2.31' 'libcrypt.so=2' 'libgssapi_krb5.so=2' 'libkrb5.so=3' 'libncursesw.so=6' 'openssl=1.1.1.l' ) depends=("gettext" "${_pinned_dependencies[@]}") makedepends=('openssl' 'git') optdepends=("aspell: for spell-checking support" "hunspell: for spell-checking support" "topal: glue program that links GnuPG and alpine") provides=("pine") conflicts=("pine" "re-alpine") replaces=("pine") options=("!makeflags") source=( "alpine::git://repo.or.cz/alpine.git#commit=${_commit}" 'default-pipe.patch' 'rules.patch' 'topal-patch.patch' ) sha512sums=('SKIP' '15f2143d7fd33b16eedac778aebcff8b89a2c6fdad65e100ad643f397f3d85207c66325975ad73f5189c187d8420f5e7c811e54257c67f97ee69b2ccf50d63e2' '3b994af23aaa976f83d4340537a9b61ad0aefce8603cb13e02e91e0f430a89818aa80d1da8eeec9885dd06c4c3a91f8443a8f001709d6261f3edabffa3260212' 'bdaf9f0ed2bb9d10eaf4b456e24684cd09eb9e97ae2cf6eb4a2bc2bb5e231e8254d79efa63da9918022302fd970180f2dcd90a69d8c8d817c729c6a18fd6d506') prepare() { cd "${srcdir}/${pkgname}" patch -p1 -i "${srcdir}/default-pipe.patch" patch -p1 -i "${srcdir}/rules.patch" patch -p1 -i "${srcdir}/topal-patch.patch" } pkgver() { cd "${srcdir}/${pkgname}" _rev=$( git rev-parse --short "${_commit}" ) _pkgver=$( git archive "${_rev}" -- configure | \ tar -Ox | \ sed -n ' /^\s*VERSION\s*=/!d = s/^.*=\s*// s/['"'"'"]//g p q ' | \ sed ' N s/\n/ / ' ) _line=${_pkgver% *} _pkgver=${_pkgver#* } _rev_count=$( git rev-list "${_rev}" ^$(git blame -L${_line},${_line} "${_rev}" -- configure | cut -d' ' -f1) --count ) printf '%s.r%s.%s' \ "${_pkgver}" \ "${_rev_count}" \ "${_rev}" } build() { cd "${srcdir}/${pkgname}" # Configure Alpine ./configure --prefix=/usr \ --with-passfile=.pine-passfile \ --without-tcl \ --with-system-pinerc=/etc/${pkgname}.d/pine.conf \ --with-system-fixed-pinerc=/etc/${pkgname}.d/pine.conf.fixed # Build Alpine make } package() { cd "${srcdir}/${pkgname}" # Install Alpine make DESTDIR="${pkgdir}" install }