wok-next view nvidia-96xx/receipt @ rev 20949
Fix homepages
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Sep 01 16:21:51 2018 +0300 (2018-09-01) |
parents | d43bf7aae921 |
children | f48456621a9d |
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/"
11 REPOLOGY="nvidia-legacy-96.43"
13 TARBALL="NVIDIA-Linux-x86-${VERSION}-pkg0.run"
14 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
16 RUN_OPTS="--extract-only"
17 TAZBB_NO_INSTALL="because this is not hardware neutral"
19 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
21 compile_rules() {
22 cd $src/usr/src/nv/
23 # Only use .unblocked_ioctl since 2.6.36
24 sed -i 's|\.ioctl|// &|' nv.c
25 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' || return 1
27 xz nvidia.ko
28 mkdir -p \
29 $install/usr/share/ \
30 $install/usr/lib/X11/ \
31 $install/usr/share/licenses/$PACKAGE/ \
32 $install/usr/share/doc/$PACKAGE/
34 # Compress and install module
35 install -Dm644 $src/usr/src/nv/nvidia.ko.xz \
36 $install/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
38 cp -a $src/LICENSE $install/usr/share/licenses/$PACKAGE/
39 cp -a $src/usr/bin $install/usr/
40 cp -a $src/nvidia-installer $install/usr/bin/
41 cp -a $src/usr/lib/*.so* $install/usr/lib/
42 cp -a $src/usr/lib/tls $install/usr/lib/
43 cp -a $src/usr/share/pixmaps $install/usr/share/
44 cp -a $src/usr/share/doc/* $install/usr/share/doc/$PACKAGE/
45 cp -a $src/usr/X11R6/lib/* $install/usr/lib/X11
47 # Links
48 for i in $(find $install -iname *.so*); do
49 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.$VERSION/so/})
50 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.$VERSION/so.1/})
51 done
52 }
54 genpkg_rules() {
55 copy @std
57 # exclude from files.list (for tazpkg's "find-depends")
58 cd $fs/usr/lib
59 for i in $(ls libGL.so*); do
60 mv -f $i ${i//./-.-}
61 done
63 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
64 PROVIDE="mesa"
65 TAGS="drivers graphic video"
66 }
68 pre_install() {
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 # Restore excluded from files.list (for tazpkg's "find-depends")
77 cd $1/usr/lib
78 for i in $(ls libGL.so*); do
79 mv -f $i ${i//-.-/.}
80 done
82 newline
83 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
85 # correct .desktop file file
86 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
87 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
89 title 'NVIDIA LICENSE INFORMATION'
90 echo "For installing this package, you have to accept the $PACKAGE license."
91 echo "The license is stored in /usr/share/licenses/$PACKAGE "
92 echo -n "Would you like to read the license (y/N) : "; read anser
93 if [ "$anser" == 'y' ]; then
94 more /usr/share/licenses/"$PACKAGE"/LICENSE
95 echo
96 fi
97 separator
98 echo -n "Do you accept the license (y/N) : "; read anser
99 if [ "$anser" == 'N' ]; then
100 echo "You did not accept the license, Removing the pkg."
101 tazpkg remove "$PACKAGE"
102 fi
103 }