wok annotate nvidia-96xx/receipt @ rev 25057

linux-libre: fix linux-libre-3.18.129-gnu-slitaz.config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jun 06 11:05:30 2022 +0000 (2022-06-06)
parents 02c70d036ea0
children 8ea0030e77cb
rev   line source
psychomaniak@18171 1 # SliTaz package receipt.
psychomaniak@18171 2
psychomaniak@18171 3 PACKAGE="nvidia-96xx"
psychomaniak@18171 4 VERSION="96.43.23"
psychomaniak@18171 5 CATEGORY="network"
psychomaniak@18171 6 MAINTAINER="psychomaniak@xakep.ru"
psychomaniak@18171 7 LICENSE="other"
psychomaniak@18171 8 SHORT_DESC="NVIDIA-legacy drivers (from Geforce MX200 to 7950) (non-free)"
psychomaniak@18171 9 WEB_SITE="http://www.nvidia.com/"
psychomaniak@18171 10 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0"
psychomaniak@18171 11 TARBALL="${SOURCE}.run"
psychomaniak@18171 12 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
psychomaniak@18171 13 RUN_OPTS="--extract-only"
psychomaniak@18171 14 TAGS="drivers graphic video"
psychomaniak@18852 15 PROVIDE="mesa"
psychomaniak@18171 16
psychomaniak@18171 17 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
psychomaniak@18171 18 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
psychomaniak@18171 19
pascal@24083 20 current_version()
pascal@24083 21 {
pascal@24083 22 wget -O - http://download.nvidia.com/XFree86/Linux-x86 2>/dev/null | \
pascal@24083 23 sed '/href=.96/!d;s|.*>96|96|;s|/.*||' | sort -Vr | sed q
pascal@24083 24 }
pascal@24083 25
psychomaniak@18171 26 # Rules to configure and make the package.
psychomaniak@18171 27 compile_rules()
psychomaniak@18171 28 {
psychomaniak@18171 29 cd $src/usr/src/nv/
psychomaniak@18171 30 # Only use .unblocked_ioctl since 2.6.36
psychomaniak@18171 31 sed -i 's|\.ioctl|// &|' nv.c
psychomaniak@18171 32 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' &&
psychomaniak@18171 33 xz nvidia.ko
psychomaniak@18171 34 }
al@18741 35
psychomaniak@18171 36 # Rules to gen a SliTaz package suitable for Tazpkg.
psychomaniak@18171 37 genpkg_rules()
psychomaniak@18171 38 {
psychomaniak@18171 39 EXTRAVERSION=_${kvers}
psychomaniak@18171 40
psychomaniak@18171 41 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE
psychomaniak@18171 42 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/video
al@18741 43 mkdir -p $fs/usr/share/doc/$PACKAGE
al@18741 44
psychomaniak@18171 45 # Compress and install module
psychomaniak@18171 46 cp $src/usr/src/nv/nvidia.ko.xz \
psychomaniak@18171 47 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
psychomaniak@18171 48
psychomaniak@18171 49 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
psychomaniak@18171 50 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
psychomaniak@18171 51
psychomaniak@18171 52 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
psychomaniak@18171 53 cp -a $src/usr/bin $fs/usr
psychomaniak@18171 54 cp -a $src/nvidia-installer $fs/usr/bin
psychomaniak@18171 55 cp -a $src/usr/lib/*.so* $fs/usr/lib/
psychomaniak@18171 56 cp -a $src/usr/lib/tls $fs/usr/lib/
psychomaniak@18171 57 cp -a $src/usr/share/pixmaps $fs/usr/share
psychomaniak@18171 58 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
psychomaniak@18171 59 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
psychomaniak@18171 60
psychomaniak@18171 61 # Links
al@18741 62 for i in $(find $fs -iname *.so*); do
al@18741 63 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so/})
al@18741 64 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so.1/})
psychomaniak@18171 65 done
psychomaniak@18852 66
psychomaniak@18852 67 # exclude from files.list (for tazpkg's "find-depends")
psychomaniak@18852 68 cd $fs/usr/lib
psychomaniak@18852 69 for i in $(ls libGL.so*) ; do mv -f $i ${i//./-.-} ; done
psychomaniak@18171 70 }
psychomaniak@18171 71
psychomaniak@18171 72 pre_install()
psychomaniak@18171 73 {
al@18741 74 title 'PROPRIETARY LICENSE'
al@18741 75 echo 'You are installing a package with proprietary license.'
al@18741 76 echo 'You must accept the license.'
al@18741 77 footer
psychomaniak@18171 78 }
psychomaniak@18171 79
psychomaniak@18171 80 post_install()
psychomaniak@18171 81 {
psychomaniak@18852 82 # Restore excluded from files.list (for tazpkg's "find-depends")
psychomaniak@18852 83 cd $1/usr/lib
psychomaniak@18852 84 for i in $(ls libGL.so*) ; do mv -f $i ${i//-.-/.} ; done
psychomaniak@18852 85
al@18741 86 newline
psychomaniak@18171 87 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
psychomaniak@18171 88
psychomaniak@18171 89 # correct .desktop file file
pascal@18730 90 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
pascal@18730 91 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
psychomaniak@18171 92
al@18741 93 title 'NVIDIA LICENSE INFORMATION'
psychomaniak@18171 94 echo "For installing this package, you have to accept the $PACKAGE license."
al@18741 95 echo "The license is stored in /usr/share/licenses/$PACKAGE "
psychomaniak@18171 96 echo -n "Would you like to read the license (y/N) : "; read anser
pascal@20892 97 if [ "$anser" = 'y' ]; then
al@18741 98 more /usr/share/licenses/"$PACKAGE"/LICENSE
al@18741 99 echo
psychomaniak@18171 100 fi
al@18741 101 separator
psychomaniak@18171 102 echo -n "Do you accept the license (y/N) : "; read anser
pascal@20892 103 if [ "$anser" = 'N' ]; then
al@18741 104 echo "You did not accept the license, Removing the pkg."
al@18741 105 tazpkg remove "$PACKAGE"
psychomaniak@18171 106 fi
psychomaniak@18171 107 }
psychomaniak@18171 108
psychomaniak@18171 109 TAZBB_NO_INSTALL="because this is not hardware neutral"