wok-next view nvidia-96xx/receipt @ rev 20785

gpgme: add gnupg, since build can not find gpgconf and gpg
author Erkan Yilmaz <erkan@slitaz.org>
date Sat Jun 09 07:02:52 2018 +0000 (2018-06-09)
parents d247e85339a4
children 4e6503d7a19f
line source
1 # SliTaz package receipt v2.
3 PACKAGE="nvidia-96xx"
4 VERSION="96.43.23"
5 EXTRAVERSION="_$kvers"
6 CATEGORY="network"
7 MAINTAINER="psychomaniak@xakep.ru"
8 LICENSE="other"
9 SHORT_DESC="NVIDIA-legacy drivers (from Geforce MX200 to 7950) (non-free)"
10 WEB_SITE="http://www.nvidia.com/"
12 TARBALL="NVIDIA-Linux-x86-${VERSION}-pkg0.run"
13 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
15 RUN_OPTS="--extract-only"
16 TAZBB_NO_INSTALL="because this is not hardware neutral"
18 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
20 compile_rules() {
21 cd $src/usr/src/nv/
22 # Only use .unblocked_ioctl since 2.6.36
23 sed -i 's|\.ioctl|// &|' nv.c
24 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' || return 1
26 xz nvidia.ko
27 mkdir -p \
28 $install/usr/share/ \
29 $install/usr/lib/X11/ \
30 $install/usr/share/licenses/$PACKAGE/ \
31 $install/usr/share/doc/$PACKAGE/
33 # Compress and install module
34 install -Dm644 $src/usr/src/nv/nvidia.ko.xz \
35 $install/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
37 cp -a $src/LICENSE $install/usr/share/licenses/$PACKAGE/
38 cp -a $src/usr/bin $install/usr/
39 cp -a $src/nvidia-installer $install/usr/bin/
40 cp -a $src/usr/lib/*.so* $install/usr/lib/
41 cp -a $src/usr/lib/tls $install/usr/lib/
42 cp -a $src/usr/share/pixmaps $install/usr/share/
43 cp -a $src/usr/share/doc/* $install/usr/share/doc/$PACKAGE/
44 cp -a $src/usr/X11R6/lib/* $install/usr/lib/X11
46 # Links
47 for i in $(find $install -iname *.so*); do
48 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.$VERSION/so/})
49 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.$VERSION/so.1/})
50 done
51 }
53 genpkg_rules() {
54 copy @std
56 # exclude from files.list (for tazpkg's "find-depends")
57 cd $fs/usr/lib
58 for i in $(ls libGL.so*); do
59 mv -f $i ${i//./-.-}
60 done
62 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
63 PROVIDE="mesa"
64 TAGS="drivers graphic video"
65 }
67 pre_install() {
68 title 'PROPRIETARY LICENSE'
69 echo 'You are installing a package with proprietary license.'
70 echo 'You must accept the license.'
71 footer
72 }
74 post_install() {
75 # Restore excluded from files.list (for tazpkg's "find-depends")
76 cd $1/usr/lib
77 for i in $(ls libGL.so*); do
78 mv -f $i ${i//-.-/.}
79 done
81 newline
82 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
84 # correct .desktop file file
85 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
86 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
88 title 'NVIDIA LICENSE INFORMATION'
89 echo "For installing this package, you have to accept the $PACKAGE license."
90 echo "The license is stored in /usr/share/licenses/$PACKAGE "
91 echo -n "Would you like to read the license (y/N) : "; read anser
92 if [ "$anser" == 'y' ]; then
93 more /usr/share/licenses/"$PACKAGE"/LICENSE
94 echo
95 fi
96 separator
97 echo -n "Do you accept the license (y/N) : "; read anser
98 if [ "$anser" == 'N' ]; then
99 echo "You did not accept the license, Removing the pkg."
100 tazpkg remove "$PACKAGE"
101 fi
102 }