blob: ca8417ab20d4c79d8e33ac5ed67d3b5b81d19df4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: Sebastian Reuße <seb@wirrsal.net>
pkgname=git-mediate-git
_gitname=git-mediate
pkgver=r94.07b1a7b
pkgrel=2
pkgdesc="Resolve trivial conflicts automatically when merging branches in git repositories."
arch=(i686 x86_64)
url="https://github.com/Peaker/git-mediate"
license=(GPL)
provides=(git-mediate)
conflicts=(git-mediate resolve-trivial-conflicts)
replaces=(resolve-trivial-conflicts resolve-trivial-conflicts-git)
makedepends=(git cabal-install chrpath ghc-static)
depends=(gmp libffi)
source=(git+https://github.com/Peaker/git-mediate)
md5sums=(SKIP)
pkgver() {
cd "$_gitname"
# No tagged commits. ヽ(´ー`)ノ
commit=$(git rev-list --count master)
hash=$(git rev-parse --short HEAD)
echo "r$commit.$hash"
}
build() {
cd "$_gitname"
cabal update
cabal sandbox init
local _pkgdb=(/usr/lib/ghc-*/static-package.conf.d)
cabal install \
--dependencies-only \
--ghc-pkg-option=--global-package-db="$_pkgdb"
cabal configure \
--prefix /usr \
--disable-executable-dynamic \
--ghc-pkg-option=--global-package-db="$_pkgdb"
cabal build
}
package() {
cd "$_gitname"
# Cabal 1.22 currently has an issue where it injects the paths to library dependencies
# even into statically built executables. Since this will add /tmp locations to the
# RPATH, we kill them manually until Cabal 1.23 is released.
find dist -type f -perm -+x -exec chrpath -d {} \;
cabal copy --destdir "$pkgdir"
install -m644 -D README.md "$pkgdir"/usr/share/doc/git-mediate/README.md
}
|