wok view nvidia-96xx/receipt @ rev 19560

fusecloop: libdeflate uses 12 compression levels, not 9
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Dec 14 21:23:06 2016 +0100 (2016-12-14)
parents 6fab3264ba87
children 02c70d036ea0
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia-96xx"
4 VERSION="96.43.23"
5 CATEGORY="network"
6 MAINTAINER="psychomaniak@xakep.ru"
7 LICENSE="other"
8 SHORT_DESC="NVIDIA-legacy drivers (from Geforce MX200 to 7950) (non-free)"
9 WEB_SITE="http://www.nvidia.com/"
10 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0"
11 TARBALL="${SOURCE}.run"
12 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
13 RUN_OPTS="--extract-only"
14 TAGS="drivers graphic video"
15 PROVIDE="mesa"
17 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
18 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
20 # Rules to configure and make the package.
22 compile_rules()
23 {
24 cd $src/usr/src/nv/
25 # Only use .unblocked_ioctl since 2.6.36
26 sed -i 's|\.ioctl|// &|' nv.c
27 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' &&
28 xz nvidia.ko
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 EXTRAVERSION=_${kvers}
36 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE
37 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/video
38 mkdir -p $fs/usr/share/doc/$PACKAGE
40 # Compress and install module
41 cp $src/usr/src/nv/nvidia.ko.xz \
42 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
44 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
45 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
47 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
48 cp -a $src/usr/bin $fs/usr
49 cp -a $src/nvidia-installer $fs/usr/bin
50 cp -a $src/usr/lib/*.so* $fs/usr/lib/
51 cp -a $src/usr/lib/tls $fs/usr/lib/
52 cp -a $src/usr/share/pixmaps $fs/usr/share
53 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
54 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
56 # Links
57 for i in $(find $fs -iname *.so*); do
58 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so/})
59 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so.1/})
60 done
62 # exclude from files.list (for tazpkg's "find-depends")
63 cd $fs/usr/lib
64 for i in $(ls libGL.so*) ; do mv -f $i ${i//./-.-} ; done
65 }
67 pre_install()
68 {
69 title 'PROPRIETARY LICENSE'
70 echo 'You are installing a package with proprietary license.'
71 echo 'You must accept the license.'
72 footer
73 }
75 post_install()
76 {
77 # Restore excluded from files.list (for tazpkg's "find-depends")
78 cd $1/usr/lib
79 for i in $(ls libGL.so*) ; do mv -f $i ${i//-.-/.} ; 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 }
104 TAZBB_NO_INSTALL="because this is not hardware neutral"