From d59fa1ced90aa8a696a1883e6903b4f08a7c6069 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Mon, 29 Jun 2015 12:33:01 -0300 Subject: git-annex-static: upgrade --- pcr/git-annex-static/PKGBUILD | 71 +++++++++++++++++++++++++++++-------------- pcr/git-annex-static/SRCBUILD | 50 ------------------------------ 2 files changed, 48 insertions(+), 73 deletions(-) delete mode 100644 pcr/git-annex-static/SRCBUILD diff --git a/pcr/git-annex-static/PKGBUILD b/pcr/git-annex-static/PKGBUILD index dd246472a..afe0c2128 100644 --- a/pcr/git-annex-static/PKGBUILD +++ b/pcr/git-annex-static/PKGBUILD @@ -8,57 +8,82 @@ test -z "$LANG" && export LANG="en_US.utf8" pkgname=git-annex-static _pkgname=git-annex -pkgver=5.20150317 +pkgver=5.20150617 pkgrel=1 _srcrel=1 pkgdesc='Manage files with git, without checking their contents in' url='http://git-annex.branchable.com/' license=('GPL') arch=('i686' 'x86_64') -depends=('git' 'gsasl') +depends=('git' 'gsasl' 'libxml2' 'rsync') makedepends=('ghc' 'sh' 'cabal-install' 'alex' 'happy') options=(strip !makeflags !distcc !emptydirs) -source=(https://repo.parabola.nu/other/git-annex-static/${_pkgname}-${pkgver}-${_srcrel}-any.src.tar.xz{,.sig} - SRCBUILD) +source=(https://repo.parabola.nu/other/${pkgname}/${pkgname}-${pkgver}-${pkgrel}.tar.xz{,.sig}) +sha512sums=('179f4fd1a084ad20b5af32905db73c1132fff244df1dd4d311a389552431f3850169a8f4a402bf336bd651c3ba29492a9555128479e04a94e6ebb8ed6e2db40c' + 'SKIP') validpgpkeys=('49F707A1CB366C580E625B3C456032D717A4CD9C') replaces=('git-annex') provides=('git-annex') +mkdepends=('ghc' 'cabal-install') +_packages=(transformers-0.4.3.0 c2hs ${_pkgname}-${pkgver}) +mksource() { + export HOME="$srcdir" + + mkdir -p ${srcdir}/{build,${pkgname}-${pkgver}} + cd ${srcdir}/${pkgname}-${pkgver} + + cabal update + +# Ignore the cabal messages + cabal install \ + --flags="${flags[@]}"\ + --dry-run \ + ${_packages[@]} | + sed -rn 's/(\S*[0-9]+).*/\1/p' >BUILDORDER + + cabal get $(cat BUILDORDER) +} + # PKGBUILD functions build() { - mkdir -p ${srcdir}/{build,${_pkgname}-${pkgver}} - cd ${srcdir}/${_pkgname}-${pkgver} + cd ${srcdir}/${pkgname}-${pkgver} + mkdir -p ../build - export PATH=${srcdir}/build/usr/bin:$PATH + export HOME="${srcdir}" + export PATH="${srcdir}/build/usr/bin:${PATH}" - while read _hkpkg extra; do + while read hkpkg extra; do + if [ -d "$srcdir"/build/usr/share/doc/*/"$hkpkg" ]; then + msg2 'Skipping %s' "$hkpkg" + continue + fi # Skip already built - [ -d "${srcdir}/build/usr/lib/i386-linux-ghc-7.8.3/$_hkpkg" ] && continue - - pushd ${srcdir}/${_pkgname}-${pkgver}/${_hkpkg} >/dev/null || continue - - msg2 "Building $_hkpkg" - HOME=${srcdir}/${_pkgname}-${pkgver} \ - cabal install --prefix=${srcdir}/build/usr + if [ -f "${hkpkg}/.built" ]; then + msg2 'Skipping %s' "$hkpkg" + continue + fi - popd >/dev/null - done /dev/null + cabal install --prefix="${srcdir}"/build/usr + touch .built + popd >/dev/null + done -# Based on haskell-git-annex - -pkgname=git-annex -pkgver=5.20150317 -pkgrel=1 -pkgdesc='Manage files with git, without checking their contents in' -url='http://git-annex.branchable.com/' -license=('GPL3') -arch=('any') -makedepends=('ghc' 'sh' 'cabal-install') -options=(!strip) -_flags=() -_packages=(transformers-0.4.3.0 c2hs ${pkgname}-${pkgver}) - -_cabal() { - HOME=${srcdir}/${pkgname}-${pkgver} cabal $@ -} - -# PKGBUILD functions -build() { - mkdir -p ${srcdir}/{build,${pkgname}-${pkgver}} - cd ${srcdir}/${pkgname}-${pkgver} - - _cabal --verbose=3 update - _cabal --verbose=3 fetch ${_packages[@]} - - msg2 "Getting the dependency build order" -# Ignore the cabal messages - _cabal install \ - --flags="${flags[@]}"\ - --dry-run \ - ${_packages[@]} | - grep "\-[0-9]\+" | - cut -d" " -f1 | - tee BUILDORDER -} - -package() { - export PKGEXT=.src.tar.xz - export PKGDEST=${SRCDEST} - - mkdir -p ${pkgdir}/${pkgname}-${pkgver} - cd ${pkgdir}/${pkgname}-${pkgver} - - find ${srcdir}/${pkgname}-${pkgver} -iname '*.tar.?z' -a \! -iname '00-index.tar.gz' -exec \ - bsdtar xvf '{}' \; - - cp ${srcdir}/${pkgname}-${pkgver}/BUILDORDER . -} -- cgit v1.2.3