talimat~ 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Description: VirtualBox is a powerfull 32 and 64 bits virtualization product
  2. # URL: http://virtualbox.org
  3. # Packager: tnut at nutyx dot org
  4. buildrelease=102546
  5. name=virtualbox-cli
  6. version=5.0.4
  7. release=2
  8. [ "`uname -m`" == "i686" ] && _ARCH=x86
  9. [ "`uname -m`" == "x86_64" ] && _ARCH=amd64
  10. source=(http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}-${buildrelease}-Linux_${_ARCH}.run)
  11. build() {
  12. sh VirtualBox-${version}-${buildrelease}-Linux_${_ARCH}.run --target vb --keep --noexec
  13. cd vb
  14. tar xfj VirtualBox.tar.bz2
  15. cd src/vboxhost/
  16. KERNELRELEASE=`uname -r`
  17. KERN_DIR=/usr/src/linux-${KERNELRELEASE%.*} make
  18. mkdir -p $PKG/lib/modules/${KERNELRELEASE}/kernel/drivers/zzzz
  19. for i in *.ko
  20. do
  21. install -D -m0644 $i \
  22. $PKG/lib/modules/${KERNELRELEASE}/kernel/drivers/zzzz/$i
  23. done
  24. mkdir -p $PKG/etc/sysconfig/modules.d
  25. cat > $PKG/etc/sysconfig/modules.d/virtualbox.conf << "EOF"
  26. vboxdrv
  27. vboxnetadp
  28. vboxnetflt
  29. vboxpci
  30. EOF
  31. # post-install autogen
  32. cat > $PKGMK_ROOT/$name.post-install << "EOF"
  33. . lib/lsb/init-functions
  34. log_success_msg "update modules population"
  35. EOF
  36. echo "depmod $KERNELRELEASE" >> $PKGMK_ROOT/$name.post-install
  37. cat >> $PKGMK_ROOT/$name.post-install << "EOF"
  38. log_warning_msg "${WARNING}Check the file /etc/modprobe.d/virtualbox.conf ${NORMAL}"
  39. log_warning_msg "${WARNING}Reboot if you want the modules being automatically loaded${NORMAL}"
  40. EOF
  41. }