# Maintainer: Erich Eckner # Contributor: Adrian C. pkgname=alpine pkgver=2.21.9999.r46.3443fe5 _commit=${pkgver##*.} pkgrel=2 arch=("i686" "pentium4" "x86_64") pkgdesc="Apache licensed PINE mail user agent" url="http://alpine.freeiz.com" license=("APACHE") depends=("libldap" "krb5" "gettext") 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}" 'topal-patch.patch' 'backwards-search.patch' # thanks, Astyanax Foo - http://mailman13.u.washington.edu/pipermail/alpine-info/2009-February/001753.html ) sha512sums=('SKIP' 'bc7a3143cb2f7d79438c49b89bfdc52db7473521a7870ad621ecba96fff2f1688f4f3d58def9b8d57f8beba4e1e9c8b193f9281571e0564538ca7c7db16f0027' 'c4ebb6ace5c2520e74ed28eea730d34d4dea68b7ae3ac67966e5cc4db0a5731de748f8f11137115cc2a5d4b7278e10fa450d0b4b04956e53402f1d92fae2d7d6') prepare() { cd "${srcdir}/${pkgname}" patch -p1 -i "${srcdir}/topal-patch.patch" patch -p1 -i "${srcdir}/backwards-search.patch" } pkgver() { cd "${srcdir}/${pkgname}" _rev=$( git rev-parse --short master ) _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 --disable-shared \ --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 }