summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ff295cb3cac44f921a7825fd5582d7af67bb06bd (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:
# Contributor: 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.12.r40.g490ba2a
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/redshift-gtk.desktop,icons,appdata}
}

package_redshift-gtk-git() {
  depends=('redshift-git' 'gtk3' 'python-xdg' 'python-gobject' 'librsvg' 'hicolor-icon-theme')

  make -C redshift DESTDIR="$pkgdir" install

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