wok-current view nvidia-96xx/receipt @ rev 18741
Finish to remove redundant messages 'Processing * commands...'; KISS get-msttcorefonts; add get-msttcorefonts2
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 25 15:23:46 2015 +0200 (2015-12-25) |
parents | 9e01bc6321ea |
children | 0c85739e5ac3 |
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"
16 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
17 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
19 # Rules to configure and make the package.
21 compile_rules()
22 {
23 cd $src/usr/src/nv/
24 # Only use .unblocked_ioctl since 2.6.36
25 sed -i 's|\.ioctl|// &|' nv.c
26 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' &&
27 xz nvidia.ko
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 EXTRAVERSION=_${kvers}
35 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE
36 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/video
37 mkdir -p $fs/usr/share/doc/$PACKAGE
39 # Compress and install module
40 cp $src/usr/src/nv/nvidia.ko.xz \
41 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
43 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
44 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
46 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
47 cp -a $src/usr/bin $fs/usr
48 cp -a $src/nvidia-installer $fs/usr/bin
49 cp -a $src/usr/lib/*.so* $fs/usr/lib/
50 cp -a $src/usr/lib/tls $fs/usr/lib/
51 cp -a $src/usr/share/pixmaps $fs/usr/share
52 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
53 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
55 # Links
56 for i in $(find $fs -iname *.so*); do
57 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so/})
58 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so.1/})
59 done
60 }
62 pre_install()
63 {
64 title 'PROPRIETARY LICENSE'
65 echo 'You are installing a package with proprietary license.'
66 echo 'You must accept the license.'
67 footer
68 }
70 post_install()
71 {
72 newline
73 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
75 # correct .desktop file file
76 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
77 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
79 title 'NVIDIA LICENSE INFORMATION'
80 echo "For installing this package, you have to accept the $PACKAGE license."
81 echo "The license is stored in /usr/share/licenses/$PACKAGE "
82 echo -n "Would you like to read the license (y/N) : "; read anser
83 if [ "$anser" == 'y' ]; then
84 more /usr/share/licenses/"$PACKAGE"/LICENSE
85 echo
86 fi
87 separator
88 echo -n "Do you accept the license (y/N) : "; read anser
89 if [ "$anser" == 'N' ]; then
90 echo "You did not accept the license, Removing the pkg."
91 tazpkg remove "$PACKAGE"
92 fi
93 }
95 TAZBB_NO_INSTALL="because this is not hardware neutral"