summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3b761cb7e086778ba02097412ea5b5b6c0554d92 (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
# Maintainer: Alexander Kobel <a-kobel@a-kobel.de>

pkgname=git-scripts-jwiegley-git
pkgver=r276.fd9f3cb
pkgrel=1
pkgdesc="Git scripts written by different people (collected by John Wiegley)"
url="https://github.com/jwiegley/git-scripts"
arch=(any)
license=('unknown')
depends=('git')
optdepends=('perl: git-archive-all, git-flush, git-force-mtimes, git-forest, git-rm-conflicts'
            'python: git-changelog, git-record'
            'ruby: git-flatten, git-merge-from-svn, git-opendiff, git-all, git-wtf, git-find, git-rank-contributors')
source=("git+https://github.com/jwiegley/git-scripts.git")
sha256sums=('SKIP')

pkgver () {
  cd ${srcdir}/git-scripts
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare () {
  cd ${srcdir}/git-scripts
  for with_extension in git-*.*; do
    mv ${with_extension} ${with_extension%.*}
  done
}

package () {
  provides=( $(find ${srcdir}/git-scripts -type f -perm 755 -name 'git-*' -exec basename {} \; 2> /dev/null | sort) )
  conflicts=( $(find ${srcdir}/git-scripts -type f -perm 755 -name 'git-*' -exec basename {} \; 2> /dev/null | sort) )

  install -d ${pkgdir}/usr/bin
  find ${srcdir}/git-scripts -type f -perm 755 -name 'git-*' -exec install -t ${pkgdir}/usr/bin {} +
}