You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.4 KiB

# Maintainer: artoo <artoo@artixlinux.org>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
pkgbase=nvidia-settings
pkgname=('nvidia-settings' 'libxnvctrl')
pkgver=520.56.06
pkgrel=1
pkgdesc='Tool for configuring the NVIDIA graphics driver'
url='https://github.com/NVIDIA/nvidia-settings'
arch=('x86_64')
license=('GPL2')
makedepends=('inetutils' 'jansson' 'gtk2' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxext')
options=('staticlibs')
source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/NVIDIA/nvidia-settings/archive/${pkgver}.tar.gz
libxnvctrl_so.patch)
sha512sums=('b642c7d2b38f9f9472d58dffc8a722aba58f29564baf35e28fcc761f2b2b8ff8ea078eeb88c851255e295efd24261be2bbac85db7219ffa184d25ffbe68bb280'
'91ff94736063b911c83b8876fe3e3778db82e0ffe0102036d81a3a6e872ca44a585914646fcbbbe399cd63aa17685fc7f73263ec4f4084f48768ca4d704037fa')
prepare() {
export PREFIX=/usr
export NV_USE_BUNDLED_LIBJANSSON=0
export OUTPUTDIR=out
cd ${pkgbase}-${pkgver}
patch -p0 < "${srcdir}/libxnvctrl_so.patch"
}
build() {
cd ${pkgbase}-${pkgver}
export CFLAGS+=" -ffat-lto-objects"
make
make -C src/libXNVCtrl
}
package_nvidia-settings() {
depends=('jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxnvctrl')
cd ${pkgbase}-${pkgver}
make DESTDIR="${pkgdir}" install
install -D -m644 doc/nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
install -D -m644 doc/nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png"
sed \
-e 's:__UTILS_PATH__:/usr/bin:' \
-e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \
-e 's/__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__/Settings;HardwareSettings;/' \
-e 's/Icon=.*/Icon=nvidia-settings/' \
-i "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
rm "$pkgdir/usr/lib/libnvidia-gtk2.so.$pkgver"
}
package_libxnvctrl() {
depends=('libxext')
pkgdesc='NVIDIA NV-CONTROL X extension'
provides=('libXNVCtrl.so')
cd ${pkgbase}-${pkgver}
install -Dm 644 doc/{NV-CONTROL-API.txt,FRAMELOCK.txt} -t "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm 644 samples/{Makefile,README,*.c,*.h,*.mk} -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
cd src/libXNVCtrl
install -Dm 644 ./*.h -t "${pkgdir}/usr/include/NVCtrl"
install -d "${pkgdir}/usr/lib"
cp -Pr out/libXNVCtrl.* -t "${pkgdir}/usr/lib"
}
# vim: ts=2 sw=2 et: