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' '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
16 nvidia-settings-libxnvctrl_so.patch)
17 sha512sums=('486a5a326b28d6907c2596c980b37994b2f559a3eb389b0fb464df6d4e598ae1220355e88a943e1678f7f7c0d003ea0b8141acf09b86c425b36e8241361e1c6e'
18 '0303fe615d6ef4e14112998c531a17613b94776f9a6a027ddb81e400fddd5f2ff15583da8b8631c2306aca854edf2f54a8007eb36f1732b4c064c857aaf268ae')
22 export NV_USE_BUNDLED_LIBJANSSON=0
25 cd ${pkgbase}-${pkgver}
26 patch -Np1 -i "${srcdir}"/nvidia-settings-libxnvctrl_so.patch
30 cd ${pkgbase}-${pkgver}
31 export CFLAGS+=" -ffat-lto-objects"
35 package_nvidia-settings() {
36 depends=('jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxnvctrl')
38 cd ${pkgbase}-${pkgver}
39 DESTDIR="${pkgdir}" make 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"
51 package_libxnvctrl() {
53 pkgdesc='NVIDIA NV-CONTROL X extension'
54 provides=('libXNVCtrl.so')
56 cd ${pkgbase}-${pkgver}
57 install -Dm 644 doc/{NV-CONTROL-API.txt,FRAMELOCK.txt} -t "${pkgdir}/usr/share/doc/${pkgname}"
58 install -Dm 644 samples/{Makefile,README,*.c,*.h,*.mk} -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
60 install -Dm 644 src/libXNVCtrl/*.h -t "${pkgdir}/usr/include/NVCtrl"
61 install -d "${pkgdir}/usr/lib"
62 cp -Pr src/out/libXNVCtrl.* -t "${pkgdir}/usr/lib"