wok view nvidia-96xx/receipt @ rev 18611
Up slitaz-tools(959)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Nov 17 16:13:43 2015 +0200 (2015-11-17) |
parents | |
children | 9e01bc6321ea |
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 echo ""
65 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
66 echo "================================================================================"
67 echo "You are installing a package with proprietary license."
68 echo "You must accept the license."
69 echo "================================================================================"
70 echo ""
71 }
73 post_install()
74 {
75 echo "Processing post-install commands..."
76 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
78 # correct .desktop file file
79 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
80 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
82 echo ""
83 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
84 echo "================================================================================"
85 echo "For installing this package, you have to accept the $PACKAGE license."
86 echo "The license is stored in /usr/share/licenses/$PACKAGE "
87 echo -n "Would you like to read the license (y/N) : "; read anser
88 if [ "$anser" = "y" ]; then
89 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
90 echo ""
91 fi
92 echo "================================================================================"
93 echo -n "Do you accept the license (y/N) : "; read anser
94 if [ "$anser" = "N" ]; then
95 echo "You did not accept the license, Removing the pkg."
96 tazpkg remove "$PACKAGE"
97 fi
99 }
101 post_remove()
102 {
103 echo "Processing post-remove commands..."
104 depmod -a
105 }
107 TAZBB_NO_INSTALL="because this is not hardware neutral"