### this file is sourced not run
PKGVER=1.12
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=redshift-$PKGVER.tar.xz
MD5SUM=5d04f2413dacdf3434cb86f373842462
SRC_URL=https://github.com/jonls/redshift/releases/download/v${PKGVER}/$TARBALL
BUNDLE=

# note: icon was from here: https://github.com/ltGuillaume/Redshift-Tray

SLACKREQ='libdrm libxcb libX11' # 
SLACKDESC="redshift: redshift $PKGVER (Adjust colour temperature of your LCD screen)  
redshift:  
redshift: Redshift adjust colour temperature of your LCD screen according to 
redshift: your surroundings. This may help your eyes hurt less if you are 
redshift: working in front of the screen at night. 
redshift: 
redshift: http://jonls.dk/redshift/
redshift: 
redshift: 
redshift: 
redshift: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-geoclue2 --disable-gui"
	pkg_build_autoconf &&
	pkg_build_slackdesc &&

	# install X11 startup file
	mkdir -p /etc/xdg/Startup &&
	install -m644 /tmp/pkg/redshift /etc/xdg/Startup # disabled by default

	# install our GUI and its desktop file
	mkdir -p /usr/share/applications /usr/share/icons
	install -m755 /tmp/pkg/redshiftgui.sh /usr/bin &&
	install -m644 /tmp/pkg/redshiftgui.sh.xml /usr/bin &&
	install -m644 /tmp/pkg/redshiftgui.desktop /usr/share/applications &&
	install -m644 /tmp/pkg/redshift-6500k.png /usr/share/icons &&
	true
}
    
