archrelease: copy trunk to extra-x86_64
[arch-packages.git] / nvidia-settings / repos / extra-x86_64 / PKGBUILD
blob8accb77eb4e1abb179a23fd2245263ded1e7e715
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')
7 pkgver=515.48.07
8 pkgrel=1
9 pkgdesc='Tool for configuring the NVIDIA graphics driver'
10 url='https://github.com/NVIDIA/nvidia-settings'
11 arch=('x86_64')
12 license=('GPL2')
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
16         libxnvctrl_so.patch)
17 sha512sums=('65cb9f333b67aaa7ac81ddf8ac8a4501ddf216b885c2b90bf0faf12239c6a5932d8b216db810d13feff921abf9c4f4cde0e0ba066158610fbc1f757d5ae4c702'
18             '91ff94736063b911c83b8876fe3e3778db82e0ffe0102036d81a3a6e872ca44a585914646fcbbbe399cd63aa17685fc7f73263ec4f4084f48768ca4d704037fa')
20 prepare() {
21   export PREFIX=/usr
22   export NV_USE_BUNDLED_LIBJANSSON=0
23   export OUTPUTDIR=out
24   cd ${pkgbase}-${pkgver}
25   patch -p0 < "${srcdir}/libxnvctrl_so.patch"
28 build() {
29   cd ${pkgbase}-${pkgver}
30   export CFLAGS+=" -ffat-lto-objects"
31   make
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"
43   sed \
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() {
54   depends=('libxext')
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"
62   cd src/libXNVCtrl
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"
68 # vim: ts=2 sw=2 et: