summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ff365cfa4c5d4db3ca17b4d0569345112952f541 (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
# Maintainer: Jan-Jaap Korpershoek <jjkorpershoek96 at gmail dot com>
pkgname=batch-git
pkgver=r23.e6410c3
pkgrel=1
pkgdesc="A command-line program for batch processing of files using your favorite text editor"
arch=('any')
url="https://github.com/alexherbo2/batch"
license=('Unlicense')
makedepends=(
    'shards'
    'git'
)
source=('git+https://github.com/alexherbo2/batch.git')
sha256sums=('SKIP')
replaces=('batch')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$pkgname"
    make build
}

package() {
    cd "$pkgname"
    bindir="$pkgdir/usr/bin"
    sharedir="$pkgdir/usr/share/$pkgname"
	mkdir -p "$sharedir" "$bindir"
	install -Dm755 "${PWD}/bin/batch" "$bindir/batch_process"
	install -Dm755 "${PWD}/scripts/rename" "${PWD}/scripts/convert" "${PWD}/scripts/relink" "$sharedir"
}