summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dfb8eca32381abba4662536629209962ae6c4543 (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
51
52
53
54
55
56
# Maintainer: Ilaï Deutel <PlMWPh1WSmypRv0JQljz> (echo ... | tr 'A-Za-z' 'l-za-kL-ZA-K' | base64 -d)

_pkgname="scm_breeze"
pkgname="$_pkgname-git"
pkgver=1.0.0.r376.gdd6ee87
pkgrel=1
pkgdesc='Streamline your SCM workflow.'
arch=('any')
url='https://github.com/scmbreeze/scm_breeze'
license=('MIT')
depends=('git' 'ruby')
optdepends=('bash: shell integration'
            'zsh: shell integration')
install='scm_breeze-git.install'
source=("$pkgname::git+https://github.com/scmbreeze/$_pkgname.git"
        "scmbDir-location.patch"
        "no-updates.patch")
sha1sums=('SKIP'
          'd5379956705ba32215237072b953741006bb1d2e'
          '4212a7ccff97bcef809cb96591059d66b44b0b68')

pkgver() {
  cd "$srcdir/$pkgname"
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/$pkgname"

  # Disable updates
  patch --forward --strip=1 --input="${srcdir}/no-updates.patch"

  # Change the location of the scm_breeze directory
  patch --forward --strip=1 --input="${srcdir}/scmbDir-location.patch"

  # egrep is deprecated
  sed -i 's/egrep/grep -E/' lib/git/fallback/status_shortcuts_shell.sh
}

package() {
  cd "$srcdir/$pkgname"

  # Install the installer
  install -Dm755 install.sh "$pkgdir/usr/bin/install-scm-breeze"

  # Install the shared files
  install -Dm755 "git.scmbrc.example" "scm_breeze.sh" \
    "scmbrc.example" -t "$pkgdir/usr/share/$_pkgname"

  # Install the libraries
  (cd "lib" && find -type f -exec install -Dm755 "{}" "$pkgdir/usr/lib/$_pkgname/{}" \;)
  ln -s "/usr/lib/$_pkgname" "$pkgdir/usr/share/$_pkgname/lib"

  # Install the license
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}