archrelease: copy trunk to extra-x86_64
[arch-packages.git] / nvidia-settings / trunk / PKGBUILD
blobe1ee5234684a042a83ad133f85cd946999ce57c7
1 # Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
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=495.44
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=('1ca671029b88d171663e9a7ff79a276d99fe194ee359726f74d6f05327895f0965daa2bff8aa83941be88189f7a1d9f22fe0386e887c33af21ba18f94c994a67'
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   make
31   make -C src/libXNVCtrl
34 package_nvidia-settings() {
35   depends=('jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxnvctrl')
37   cd ${pkgbase}-${pkgver}
38   make DESTDIR="${pkgdir}" install
40   install -D -m644 doc/nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
41   install -D -m644 doc/nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png"
42   sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -e 's/__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__/Settings;HardwareSettings;/' -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
44   rm "$pkgdir/usr/lib/libnvidia-gtk2.so.$pkgver"
47 package_libxnvctrl() {
48   depends=('libxext')
49   pkgdesc='NVIDIA NV-CONTROL X extension'
50   provides=('libXNVCtrl.so')
52   cd ${pkgbase}-${pkgver}
53   install -Dm 644 doc/{NV-CONTROL-API.txt,FRAMELOCK.txt} -t "${pkgdir}/usr/share/doc/${pkgname}"
54   install -Dm 644 samples/{Makefile,README,*.c,*.h,*.mk} -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
56   cd src/libXNVCtrl
57   install -Dm 644 ./*.h -t "${pkgdir}/usr/include/NVCtrl"
58   install -d "${pkgdir}/usr/lib"
59   cp -Pr out/libXNVCtrl.* -t "${pkgdir}/usr/lib"
62 # vim: ts=2 sw=2 et: