VirtualBox

source: vbox/trunk/src/VBox/Installer/solaris/makepackage.sh@ 7692

Last change on this file since 7692 was 7692, checked in by vboxsync, 17 years ago

Solaris installer: export to OSE

  • Property svn:eol-style set to LF
File size: 1.6 KB
Line 
1#!/bin/sh
2#
3# innotek VirtualBox Solaris package creation script.
4# Usage:
5# makespackage.sh $(PATH_TARGET)/install packagename $(BUILD_TARGET_ARCH)
6
7if [ -z "$3" ]; then
8 echo "Usage: $0 installdir packagename x86|amd64"
9 exit 1
10fi
11
12cd "$1"
13echo 'i pkginfo=./vbox.pkginfo' > prototype
14echo 'i postinstall=./postinstall.sh' >> prototype
15echo 'i preremove=./preremove.sh' >> prototype
16echo 'i space=./vbox.space' >> prototype
17echo 'e sed /etc/devlink.tab ? ? ?' >> prototype
18find . -print | /usr/sfw/bin/ggrep -v -E 'prototype|makepackage.sh|vbox.pkginfo|postinstall.sh|preremove.sh|ReadMe.txt|vbox.space' | pkgproto >> prototype
19/usr/bin/awk 'NF == 6 && $2 == "none" { $5 = "root"; $6 = "bin" } { print }' prototype > prototype2
20/usr/bin/awk 'NF == 6 && $2 == "none" { $3 = "opt/VirtualBox/"$3"="$3 } { print }' prototype2 > prototype
21
22# install the kernel module to the right place.
23if test "$3" = "x86"; then
24 /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/vboxdrv=vboxdrv" } { print }' prototype > prototype2
25else
26 /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/amd64/vboxdrv=vboxdrv" } { print }' prototype > prototype2
27fi
28
29/usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf" { $3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf" } { print }' prototype2 > prototype
30
31rm prototype2
32pkgmk -o -r .
33pkgtrans -s -o /var/spool/pkg `pwd`/$2 INNOvbox
34/usr/sfw/bin/gtar zcvf $2.tar.gz $2 autoresponse ReadMe.txt
35rm -rf /var/spool/pkg/INNOvbox
36
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette