summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b7cc3187e4923dc29b1f5842362f21ac66b12cd6 (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
# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
# Contributor: Lara Maia <lara@craft.net.br>
# Contributor: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>

pkgbase=redshift-git
pkgname=('redshift-git' 'redshift-gtk-git')
pkgver=1.10.r32.g5f26b3d
pkgrel=1
pkgdesc='Adjusts the color temperature of your screen according to your surroundings (development version)'
arch=('i686' 'x86_64')
url='http://jonls.dk/redshift/'
license=('GPL3')
depends=('libxxf86vm' 'libdrm' 'libxcb' 'geoclue2')
makedepends=('git' 'intltool' 'python')
source=(redshift::"git+https://github.com/jonls/redshift.git")
md5sums=('SKIP')

pkgver() {
  cd redshift
  git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./g'
}

build() {
  cd redshift

  ./bootstrap
  ./configure --prefix=/usr --enable-randr --enable-drm --enable-vidmode --enable-geoclue2 \
    --with-systemduserunitdir=/usr/lib/systemd/user
  make
}

package_redshift-git() {
  provides=('redshift')
  conflicts=('redshift')

  make -C redshift DESTDIR="$pkgdir" install

  # remove duplicate redshift-gtk stuff
  rm -rf "$pkgdir"/usr/{bin/redshift-gtk,lib/{python*,systemd/user/redshift-gtk.service}}
  rm -rf "$pkgdir"/usr/share/{applications,icons,appdata}
}

package_redshift-gtk-git() {
  depends=("redshift-git=$pkgver" 'gtk3' 'python-xdg' 'python-gobject' 'librsvg'
           'hicolor-icon-theme')
  install=redshift-gtk-git.install

  make -C redshift DESTDIR="$pkgdir" install

  # remove duplicate redshift stuff
  rm -rf "$pkgdir"/usr/{bin/redshift,lib/systemd/user/redshift.service,share/{locale,man}}
}