summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 90b397b9198370f423d248bad661e581b003a1fc (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
# Maintainer: Dylan Araps <dyl@tfwno.gf>
pkgname=fetch-git
_pkgname=fetch
pkgver=1.0.r26.g9bde0eb
pkgrel=1
pkgdesc="CLI script to show your system's info and display an image using w3m."
arch=('any')
url="https://github.com/dylanaraps/fetch"
license=('MIT')
provides=($_pkgname)
conflicts=($_pkgname)
depends=('bash' 'ncurses')
optdepends=(
    'cmus: Current Song'
    'feh: Wallpaper Display'
    'imagemagick: Image cropping / Thumbnail creation'
    'mpc: Current Song'
    'nitrogen: Wallpaper Display'
    'scrot: Take a screenshot'
    'w3m: Display Images'
    'wmctrl: Accurate window manager detection'
    'xorg-xdpyinfo: Resolution Detection'
)
makedepends=('git')
source=("$pkgname::git+https://github.com/dylanaraps/fetch.git")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags --long | sed -r -e 's,^[^0-9]*,,;s,([^-]*-g),r\1,;s,[-_],.,g'
}

package() {
  cd $pkgname
  install -D -m755 fetch "$pkgdir/usr/bin/fetch"
  install -D -m644 LICENSE.md "$pkgdir/usr/share/licenses/fetch/LICENSE.md"
  install -D -m755 config "$pkgdir/usr/share/fetch/config"
  install -d -m755 ascii/distro/ "$pkgdir/usr/share/fetch/ascii/distro"
  install -D -m755 ascii/distro/* "$pkgdir/usr/share/fetch/ascii/distro/"
}