mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-04 02:37:15 +08:00
Update and fix pkgbuild
This commit is contained in:
parent
1cbb126940
commit
4be54a8441
@ -5,50 +5,50 @@
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=virtualbox
|
||||
pkgver=4.0.0
|
||||
_build=69151
|
||||
pkgver=4.0.6
|
||||
_build=71344
|
||||
pkgrel=1
|
||||
pkgdesc="Powerful x86 virtualization (Personal Use Binaries Edition)."
|
||||
pkgdesc='Oracle VM VirtualBox Binary Edition'
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://virtualbox.org"
|
||||
license=('custom:PUEL')
|
||||
depends=('libidl2' 'libxcursor' 'libxinerama' 'libxslt' 'curl' 'gcc' 'make' 'kernel26-headers')
|
||||
optdepends=("qt: for GUI support"
|
||||
"sdl: for VBoxSDL and GUI support"
|
||||
"mesa: for OpenGL support"
|
||||
"libgl: for shared OpenGL support"
|
||||
"libxt: for shared clipboard support"
|
||||
"alsa-lib: for ALSA support"
|
||||
"pulseaudio: for PulseAudio support")
|
||||
url='http://virtualbox.org'
|
||||
license=('GPL2')
|
||||
depends=('libidl2' 'libxcursor' 'libxinerama' 'libxslt' 'curl' 'gcc' 'make' 'kernel26-headers' 'python2')
|
||||
optdepends=('virtualbox-ext-oracle: for Oracle extensions'
|
||||
'qt: for GUI support'
|
||||
'sdl: for VBoxSDL and GUI support'
|
||||
'mesa: for OpenGL support'
|
||||
'libgl: for shared OpenGL support'
|
||||
'libxt: for shared clipboard support'
|
||||
'alsa-lib: for ALSA support'
|
||||
'pulseaudio: for PulseAudio support')
|
||||
provides=("virtualbox=${pkgver}")
|
||||
conflicts=('virtualbox-ose' 'virtualbox-modules' 'virtualbox_bin')
|
||||
replaces=('virtualbox_bin')
|
||||
conflicts=('virtualbox' 'virtualbox-ose' 'virtualbox-modules')
|
||||
backup=('etc/vbox/vbox.cfg')
|
||||
install='virtualbox.install'
|
||||
_filearch='x86'
|
||||
[ "$CARCH" = "x86_64" ] && _filearch='amd64'
|
||||
source=("VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run::http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run"
|
||||
_sarch='x86'
|
||||
[ "${CARCH}" = 'x86_64' ] && _sarch='amd64'
|
||||
|
||||
source=("VirtualBox-${pkgver}-${_build}-Linux_${_sarch}.run::http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_build}-Linux_${_sarch}.run"
|
||||
'10-vboxdrv.rules'
|
||||
'vboxdrv')
|
||||
md5sums=('b69839d355c5c532988380f81e7c51a4'
|
||||
md5sums=('2a382c44557d06fa7337b045902baaa0'
|
||||
'98859bfca9ef2ebf2ea43eb9123316fc'
|
||||
'8b3b5fb34d5e8594ee873d7947f3d09b')
|
||||
[ "$CARCH" = "x86_64" ] && md5sums[0]='7a82f89abea6757231c02b42b5db90a3'
|
||||
|
||||
[ "${CARCH}" = 'x86_64' ] && md5sums[0]='133cfbb8dc11da780b24f1ef5ef06697'
|
||||
|
||||
build() {
|
||||
# Check and unpack the run package via sh(1)
|
||||
sh "VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run" --check
|
||||
echo yes | sh "VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run" --target "$srcdir" \
|
||||
sh "VirtualBox-${pkgver}-${_build}-Linux_${_sarch}.run" --check
|
||||
echo yes | sh "VirtualBox-${pkgver}-${_build}-Linux_${_sarch}.run" --target "${srcdir}" \
|
||||
--nox11 --noexec &> /dev/null
|
||||
|
||||
# Unpack bundled files
|
||||
install -d "$pkgdir/opt/VirtualBox"
|
||||
cd "$pkgdir/opt/VirtualBox"
|
||||
tar -xjf "$srcdir/VirtualBox.tar.bz2"
|
||||
|
||||
install -d "$pkgdir/usr/"{bin,share/applications,share/pixmaps}
|
||||
install -d "${pkgdir}/opt/VirtualBox"
|
||||
cd "${pkgdir}/opt/VirtualBox"
|
||||
tar -xjf "${srcdir}/VirtualBox.tar.bz2"
|
||||
|
||||
# Hardened build: Mark binaries suid root, create symlinks for working around
|
||||
# unsupported $ORIGIN/.. in VBoxC.so and make sure the
|
||||
@ -64,45 +64,61 @@ build() {
|
||||
|
||||
# Replace VirtualBox built-in Qt by system Qt libraries (disabled as of
|
||||
# 2010-03-26, 3.1.6-1)
|
||||
#for _lib in libQt{Core,Gui,Network,OpenGL}; do
|
||||
# rm "${_lib}VBox.so.4"
|
||||
# ln -s "/usr/lib/${_lib}.so.4" "${_lib}VBox.so.4"
|
||||
#done
|
||||
for _lib in libQt{Core,Gui,Network,OpenGL}; do
|
||||
rm "${_lib}VBox.so.4"
|
||||
ln -s "/usr/lib/${_lib}.so.4" "${_lib}VBox.so.4"
|
||||
done
|
||||
|
||||
# Install the SDK (disabled, since the extension expects an UCS4-compiled
|
||||
# python, while Arch Linux has an UCS2-compiled python)
|
||||
#cd "$pkgdir/opt/VirtualBox/sdk/installer"
|
||||
#VBOX_INSTALL_PATH="/opt/VirtualBox" python vboxapisetup.py install --root "${pkgdir}"
|
||||
#rm -Rf build
|
||||
#cd "$pkgdir/opt/VirtualBox"
|
||||
rm -Rf sdk vboxshell.py VBoxPython*
|
||||
# Patch "vboxshell.py" to use Python 2.x instead of Python 3
|
||||
sed -i 's#/usr/bin/python#\02#' "${pkgdir}/opt/VirtualBox/vboxshell.py"
|
||||
|
||||
# Install the SDK
|
||||
cd "${pkgdir}/opt/VirtualBox/sdk/installer"
|
||||
VBOX_INSTALL_PATH="/opt/VirtualBox" python2 vboxapisetup.py install --root "${pkgdir}"
|
||||
rm -Rf build
|
||||
cd "${pkgdir}/opt/VirtualBox"
|
||||
|
||||
# Install rc.d script for module compilation
|
||||
install -Dm0755 "$srcdir/vboxdrv" "$pkgdir/etc/rc.d/vboxdrv"
|
||||
install -Dm0755 "${srcdir}/vboxdrv" "${pkgdir}/etc/rc.d/vboxdrv"
|
||||
|
||||
# Replace init script stuff
|
||||
sed -i -e 's,sudo /etc/init.d/vboxdrv setup,/etc/rc.d/vboxdrv setup,g' \
|
||||
"$pkgdir/opt/VirtualBox/VBox.sh"
|
||||
"${pkgdir}/opt/VirtualBox/VBox.sh"
|
||||
sed -i -e 's,sudo /etc/init.d/vboxdrv restart,modprobe vboxdrv,g' \
|
||||
"$pkgdir/opt/VirtualBox/VBox.sh"
|
||||
"${pkgdir}/opt/VirtualBox/VBox.sh"
|
||||
|
||||
# Install udev rules
|
||||
install -Dm0644 "$srcdir/10-vboxdrv.rules" "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules"
|
||||
install -Dm0644 "${srcdir}/10-vboxdrv.rules" "${pkgdir}/lib/udev/rules.d/10-vboxdrv.rules"
|
||||
|
||||
# Symlink the launchers
|
||||
install -d "${pkgdir}/usr/bin"
|
||||
for _bin in VirtualBox VBox{Headless,Manage,SDL,SVC,Tunctl,NetAdpCtl} rdesktop-vrdp; do
|
||||
ln -s "/opt/VirtualBox/${_bin}" "$pkgdir/usr/bin/${_bin}"
|
||||
ln -s "/opt/VirtualBox/${_bin}" "${pkgdir}/usr/bin/${_bin}"
|
||||
done
|
||||
|
||||
# Symlink the desktop icon and ".desktop" files
|
||||
ln -s "/opt/VirtualBox/VBox.png" "$pkgdir/usr/share/pixmaps/VBox.png"
|
||||
ln -s "/opt/VirtualBox/virtualbox.desktop" "$pkgdir/usr/share/applications/VirtualBox.desktop"
|
||||
install -d "${pkgdir}/usr/"{share/applications,share/pixmaps}
|
||||
ln -s "/opt/VirtualBox/VBox.png" "${pkgdir}/usr/share/pixmaps/VBox.png"
|
||||
ln -s "/opt/VirtualBox/virtualbox.desktop" "${pkgdir}/usr/share/applications/VirtualBox.desktop"
|
||||
|
||||
# Symlink mime info
|
||||
install -d "${pkgdir}/usr/share/mime/packages"
|
||||
ln -s "/opt/VirtualBox/virtualbox.xml" "${pkgdir}/usr/share/mime/packages/virtualbox.xml"
|
||||
|
||||
# Symlink doc
|
||||
install -d "${pkgdir}/usr/share/doc/${pkgname}"
|
||||
ln -s "/opt/VirtualBox/VirtualBox.chm" "${pkgdir}/usr/share/doc/$pkgname/VirtualBox.chm"
|
||||
|
||||
# Symlink the license
|
||||
install -d "$pkgdir/usr/share/licenses/$pkgname"
|
||||
ln -s "/opt/VirtualBox/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/PUEL"
|
||||
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
ln -s /opt/VirtualBox/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
|
||||
# Setup configuration
|
||||
install -d "$pkgdir/etc/vbox"
|
||||
echo 'INSTALL_DIR="/opt/VirtualBox"' > "$pkgdir/etc/vbox/vbox.cfg"
|
||||
install -d "${pkgdir}/etc/vbox"
|
||||
echo 'INSTALL_DIR="/opt/VirtualBox"' > "${pkgdir}/etc/vbox/vbox.cfg"
|
||||
|
||||
# Create the directory below if it doesn't exist
|
||||
install -d "${pkgdir}/var/run/VirtualBox"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 ft=sh et:
|
||||
|
Loading…
Reference in New Issue
Block a user