summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/git-annex-static/PKGBUILD71
-rw-r--r--pcr/git-annex-static/SRCBUILD50
2 files changed, 48 insertions, 73 deletions
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 <BUILDORDER
+ msg2 'Building %s' "$hkpkg"
+ pushd "$hkpkg" >/dev/null
+ cabal install --prefix="${srcdir}"/build/usr
+ touch .built
+ popd >/dev/null
+ done <BUILDORDER
}
package() {
- cd ${srcdir}/${_pkgname}-${pkgver}/${_pkgname}-${pkgver}
+ 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
+ for man in man/*.1; do
+ install -Dm644 ${man} ${pkgdir}/usr/share/man/man1/${man%.1}
+ done
msg2 "Installing licenses"
install -d ${pkgdir}/usr/share/licenses/${pkgname}
cp -rv ${srcdir}/build/usr/share/doc/* ${pkgdir}/usr/share/licenses/${pkgname}
}
-md5sums=('ea2bad7c7212c3175bb2ef7bf5cc6068'
- 'SKIP'
- 'fbdeab3e6e83d511ab7bdcdf8ccdbe64')
diff --git a/pcr/git-annex-static/SRCBUILD b/pcr/git-annex-static/SRCBUILD
deleted file mode 100644
index c0960f66b..000000000
--- a/pcr/git-annex-static/SRCBUILD
+++ /dev/null
@@ -1,50 +0,0 @@
-# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar>
-# 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 .
-}