diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-10-27 18:22:59 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-10-27 18:22:59 -0300 |
commit | 95b671b9b16868fae0e4ab88ae0ab661ffbec575 (patch) | |
tree | 2d0d47c2f815ad3161446c3e44f9a3e585f27702 | |
parent | 110e690ad01e02a10956b655976c814c1e85726e (diff) | |
download | abslibre-95b671b9b16868fae0e4ab88ae0ab661ffbec575.tar.gz abslibre-95b671b9b16868fae0e4ab88ae0ab661ffbec575.tar.bz2 abslibre-95b671b9b16868fae0e4ab88ae0ab661ffbec575.zip |
git-annex
-rw-r--r-- | pcr/git-annex-static/PKGBUILD | 63 | ||||
-rw-r--r-- | pcr/git-annex-static/SRCBUILD | 50 |
2 files changed, 113 insertions, 0 deletions
diff --git a/pcr/git-annex-static/PKGBUILD b/pcr/git-annex-static/PKGBUILD new file mode 100644 index 000000000..96477a265 --- /dev/null +++ b/pcr/git-annex-static/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar> +# Based on haskell-git-annex + +# Run `makepkg -sp SRCBUILD` if you want to update the source tarball + +# hslua fails if LANG is empty or C +test -z "$LANG" && export LANG="en_US.utf8" + +pkgname=git-annex-static +_pkgname=git-annex +pkgver=5.20141024 +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') +makedepends=('ghc' 'sh' 'cabal-install' 'alex' 'happy') +options=(strip !makeflags !distcc !emptydirs) +source=(https://repo.parabolagnulinux.org/other/git-annex-static/${_pkgname}-${pkgver}-${_srcrel}-any.src.tar.xz{,.sig} + SRCBUILD) +replaces=('git-annex') +provides=('git-annex') +md5sums=('5c1760042568c068d76087a24776715f' + 'SKIP' + 'c62b7f7093662f2e672b562bb97c86ae') + +# PKGBUILD functions +build() { + mkdir -p ${srcdir}/{build,${_pkgname}-${pkgver}} + cd ${srcdir}/${_pkgname}-${pkgver} + + export PATH=${srcdir}/build/usr/bin:$PATH + + while read _hkpkg extra; do +# 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 + + popd >/dev/null + done <BUILDORDER + +} + +package() { + cd ${srcdir}/${_pkgname}-${pkgver}/${_pkgname}-${pkgver} + + install -Dm755 ${srcdir}/build/usr/bin/git-annex ${pkgdir}/usr/bin/git-annex + + msg2 "Installing manpages" + install -Dm644 git-annex.1 ${pkgdir}/usr/share/man/man1/git-annex.1 + install -Dm644 git-annex-shell.1 ${pkgdir}/usr/share/man/man1/git-annex-shell.1 + + msg2 "Installing licenses" + install -d ${pkgdir}/usr/share/licenses/${pkgname} + cp -rv ${srcdir}/build/usr/share/doc/* ${pkgdir}/usr/share/licenses/${pkgname} +} diff --git a/pcr/git-annex-static/SRCBUILD b/pcr/git-annex-static/SRCBUILD new file mode 100644 index 000000000..bd596eb12 --- /dev/null +++ b/pcr/git-annex-static/SRCBUILD @@ -0,0 +1,50 @@ +# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar> +# Based on haskell-git-annex + +pkgname=git-annex +pkgver=5.20141024 +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.1.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 . +} |