summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66dbb7afebdeab210b0c2cec1ea755a964f2b5ca (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
# Maintainer: Niels Sonnich Poulsen <niels@nielssp.dk>
pkgname=colorgrab
pkgver=0.3
pkgrel=1
pkgdesc="A cross-platform color picker."
url="https://github.com/nielssp/colorgrab"
arch=('x86_64' 'i686')
license=('MIT')
depends=('wxgtk' 'desktop-file-utils' 'gtk-update-icon-cache')
makedepends=('cmake')
conflicts=()
replaces=()
backup=()
install="${pkgname}.install"
source=(
  "https://github.com/nielssp/${pkgname}/archive/v${pkgver}.tar.gz"
)
md5sums=(
  'd1db6f37cd4a4f0cf1878d3cb76ef216'
)

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  cmake ./ -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd "${srcdir}"
  cd "${pkgname}-${pkgver}"
  install -Dm755 "${pkgname}" "$pkgdir/usr/bin/${pkgname}"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  
  desktop-file-install -m 644 --dir "$pkgdir/usr/share/applications" "pkg/arch/colorgrab.desktop"
  install -Dm644 img/scalable.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
  for size in 16 32 48 64 128 256; do
    install -Dm644 "img/${size}x${size}.png" \
      "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.png"
  done
}