1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
5 pkgbase=nvidia-settings
6 pkgname=('nvidia-settings' 'libxnvctrl')
9 pkgdesc='Tool for configuring the NVIDIA graphics driver'
10 url='https://github.com/NVIDIA/nvidia-settings'
13 makedepends=('inetutils' 'jansson' 'gtk2' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxext')
14 options=('staticlibs')
15 source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/NVIDIA/nvidia-settings/archive/${pkgver}.tar.gz
17 sha512sums=('c7b6c1b9acdd9e4daa601fb27199946d48d1d59e1483f3187e93ee887a27027ef29f274ae068089b1abdf089b5c106aa09bd1c87bc7ace41606b019393106ea9'
18 '91ff94736063b911c83b8876fe3e3778db82e0ffe0102036d81a3a6e872ca44a585914646fcbbbe399cd63aa17685fc7f73263ec4f4084f48768ca4d704037fa')
22 export NV_USE_BUNDLED_LIBJANSSON=0
24 cd ${pkgbase}-${pkgver}
25 patch -p0 < "${srcdir}/libxnvctrl_so.patch"
29 cd ${pkgbase}-${pkgver}
30 export CFLAGS+=" -ffat-lto-objects"
32 make -C src/libXNVCtrl
35 package_nvidia-settings() {
36 depends=('jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxnvctrl')
38 cd ${pkgbase}-${pkgver}
39 make DESTDIR="${pkgdir}" install
41 install -D -m644 doc/nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
42 install -D -m644 doc/nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png"
44 -e 's:__UTILS_PATH__:/usr/bin:' \
45 -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \
46 -e 's/__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__/Settings;HardwareSettings;/' \
47 -e 's/Icon=.*/Icon=nvidia-settings/' \
48 -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
50 rm "$pkgdir/usr/lib/libnvidia-gtk2.so.$pkgver"
53 package_libxnvctrl() {
55 pkgdesc='NVIDIA NV-CONTROL X extension'
56 provides=('libXNVCtrl.so')
58 cd ${pkgbase}-${pkgver}
59 install -Dm 644 doc/{NV-CONTROL-API.txt,FRAMELOCK.txt} -t "${pkgdir}/usr/share/doc/${pkgname}"
60 install -Dm 644 samples/{Makefile,README,*.c,*.h,*.mk} -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
63 install -Dm 644 ./*.h -t "${pkgdir}/usr/include/NVCtrl"
64 install -d "${pkgdir}/usr/lib"
65 cp -Pr out/libXNVCtrl.* -t "${pkgdir}/usr/lib"