summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6cd2a588fb87c18e15833bf51e410cab68e8cbc7 (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
# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
# Contributor: Sam S <smls75@gmail.com>
# Contributor: Testuser_01 <arch@nico-siebler.de>

pkgname=lscolors-git
_pkgname=LS_COLORS
pkgver=r259.03e66df
pkgrel=1
pkgdesc='Colorize the output of the "ls" shell command via LS_COLORS'
url='https://github.com/trapd00r/LS_COLORS'
arch=('any')
makedepends=('git')
license=('PerlArtistic')
install="$pkgname.install"
source=("git+https://github.com/trapd00r/$_pkgname.git")
sha256sums=('SKIP')

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

build() {
  cd "$_pkgname"
  dircolors -b LS_COLORS > dircolors.sh
  dircolors -c LS_COLORS > dircolors.csh
}

package() {
  cd "$_pkgname"

  install -Dm644 -t "$pkgdir/usr/share/$_pkgname" LS_COLORS
  install -Dm644 -t "$pkgdir/usr/share/$_pkgname" dircolors.sh
  install -Dm644 -t "$pkgdir/usr/share/$_pkgname" dircolors.csh
  install -Dm644 README.markdown "$pkgdir/usr/share/doc/$_pkgname/README.md"
}