13 changed files with 269 additions and 196 deletions
			
			
		@ -1,52 +0,0 @@ | 
				
			|||
name=go | 
				
			|||
version=1.7.4 | 
				
			|||
bootstrap_version=1.4.3 | 
				
			|||
update_url='https://golang.org/dl/' | 
				
			|||
 | 
				
			|||
define_option '!bootstrap: Bootstrap this program' | 
				
			|||
 | 
				
			|||
dlextract "https://storage.googleapis.com/golang/$name$version.src.tar.gz" \ | 
				
			|||
          '49c1076428a5d3b5ad7ac65233fcca2f' | 
				
			|||
 | 
				
			|||
if option bootstrap; then | 
				
			|||
    download "https://storage.googleapis.com/golang/$name$bootstrap_version.src.tar.gz" \ | 
				
			|||
             'dfb604511115dd402a77a553a5923a04' | 
				
			|||
fi | 
				
			|||
header_end | 
				
			|||
 | 
				
			|||
if option bootstrap; then | 
				
			|||
    mkdir bootstrap; cd bootstrap | 
				
			|||
    extract "$name$bootstrap_version.src.tar.gz" | 
				
			|||
 | 
				
			|||
    cd "$name/src" | 
				
			|||
    CGO_ENABLED=0 ./make.bash | 
				
			|||
 | 
				
			|||
    cd .. | 
				
			|||
    GOROOT_BOOTSTRAP="$PWD" | 
				
			|||
    cd ../.. | 
				
			|||
else | 
				
			|||
    GOROOT_BOOTSTRAP="$dir_sysroot/$dir_prefix/$dir_libdir/$name" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
cd "$name/src" | 
				
			|||
GOROOT_BOOTSTRAP="$GOROOT_BOOTSTRAP" \ | 
				
			|||
GOROOT_FINAL="$dir_sysroot/$dir_prefix/$dir_libdir/$name" \ | 
				
			|||
    ./make.bash | 
				
			|||
cd .. | 
				
			|||
 | 
				
			|||
rm -rf pkg/bootstrap pkg/obj | 
				
			|||
 | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_libdir/$name" | 
				
			|||
cp -at "$dir_install/$dir_prefix/$dir_libdir/$name" bin pkg src | 
				
			|||
 | 
				
			|||
# Create symlinks | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_bindir" | 
				
			|||
for x in bin/*; do | 
				
			|||
    ln -s "$dir_sysroot/$dir_prefix/$dir_libdir/$name/$x" "$dir_install/$dir_prefix/$dir_bindir/$(basename "$x")" | 
				
			|||
done | 
				
			|||
 | 
				
			|||
# Set global GOPATH for external libraries | 
				
			|||
echo "export GOPATH=\"$dir_sysroot/$dir_prefix/$dir_libdir/$name/site\"" > go.sh | 
				
			|||
install -Dm755 -t "$dir_install/$dir_sysconfdir/profile.d" go.sh | 
				
			|||
 | 
				
			|||
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: | 
				
			|||
@ -1,115 +0,0 @@ | 
				
			|||
# NOTE: This package uses a prebuilt BIOS image, that can only be properly built with OpenWatcom. | 
				
			|||
 | 
				
			|||
import 'vcs/svn' | 
				
			|||
 | 
				
			|||
name=VirtualBox | 
				
			|||
version=5.1.10 | 
				
			|||
update_url='https://www.virtualbox.org/wiki/Downloads' | 
				
			|||
 | 
				
			|||
define_option 'pulseaudio: Add pulseaudio support' | 
				
			|||
define_option 'pam: Use PAM for authentication' | 
				
			|||
define_option 'docs: Build documentation (requires texlive)' | 
				
			|||
 | 
				
			|||
dlextract "http://download.virtualbox.org/virtualbox/$version/$name-$version.tar.bz2" \ | 
				
			|||
          '889d90a7d8119a6bcc699be258ca4a96' | 
				
			|||
dlfile 'https://git.archlinux.org/svntogit/community.git/plain/trunk/003-ogl-include-path.patch?h=packages/virtualbox&id=580e187e0eeb4952f8a5dd7f284962b714a88b34' \ | 
				
			|||
       '9e49bbaa2192b141c27ee43cef8cbab7' | 
				
			|||
 | 
				
			|||
# VirtualBox requires this specific revision of kBuild to build. | 
				
			|||
vcs_svn 'http://svn.netlabs.org/repos/kbuild/trunk' 2823 | 
				
			|||
header_end | 
				
			|||
 | 
				
			|||
# Remove prebuilt binaries | 
				
			|||
rm -rf trunk/kBuild/bin "$name-$version/kBuild" "$name-$version/tools" | 
				
			|||
 | 
				
			|||
# Build kBuild | 
				
			|||
( cd trunk | 
				
			|||
    kBuild/env.sh --full make -f bootstrap.gmk | 
				
			|||
    mv kBuild "../$name-$version" | 
				
			|||
) | 
				
			|||
 | 
				
			|||
# Build VirtualBox | 
				
			|||
cd "$name-$version" | 
				
			|||
 | 
				
			|||
# Build with system X libraries | 
				
			|||
sed -i -e "/^+\t\/usr\/include/s/usr/$(safe_sed "$dir_prefix")/" ../003-ogl-include-path.patch | 
				
			|||
patch -p1 -i ../003-ogl-include-path.patch | 
				
			|||
 | 
				
			|||
# Qt5 requires -std=c++11 | 
				
			|||
sed -i -e '/^CXX_FLAGS=/cCXX_FLAGS="-std=c++11"' configure | 
				
			|||
 | 
				
			|||
cat > LocalConfig.kmk << EOF | 
				
			|||
VBOX_GCC_OPT := $CXXFLAGS | 
				
			|||
 | 
				
			|||
VBOX_WITH_ORIGIN := | 
				
			|||
VBOX_PATH_APP_PRIVATE := /$dir_prefix/$dir_datadir/$name | 
				
			|||
VBOX_PATH_APP_PRIVATE_ARCH := /$dir_prefix/$dir_libdir/$name | 
				
			|||
VBOX_PATH_SHARED_LIBS := \$(VBOX_PATH_APP_PRIVATE_ARCH) | 
				
			|||
VBOX_WITH_RUNPATH := \$(VBOX_PATH_APP_PRIVATE_ARCH) | 
				
			|||
VBOX_PATH_APP_DOCS := /$dir_prefix/$dir_docdir/$name | 
				
			|||
VBOX_PATH_PACKAGE_DOCS := \$(VBOX_PATH_APP_DOCS) | 
				
			|||
 | 
				
			|||
VBOX_WITH_TESTCASES := | 
				
			|||
VBOX_WITH_TESTSUITE := | 
				
			|||
VBOX_WITH_VALIDATIONKIT := | 
				
			|||
VBOX_GCC_WERR := | 
				
			|||
VBOX_GCC_WARN := | 
				
			|||
 | 
				
			|||
VBOX_USE_SYSTEM_XORG_HEADERS := 1 | 
				
			|||
VBOX_NO_LINUX_RUN_INSTALLER := 1 | 
				
			|||
 | 
				
			|||
$(option pam || echo VBOX_WITH_PAM :=) | 
				
			|||
EOF | 
				
			|||
 | 
				
			|||
./configure \ | 
				
			|||
    --with-makeself=/bin/true \ | 
				
			|||
    --disable-kmods \ | 
				
			|||
    --disable-java \ | 
				
			|||
    --disable-extpack \ | 
				
			|||
    $(option pulseaudio || echo --disable-pulse) \ | 
				
			|||
    $(option docs || echo --disable-docs) | 
				
			|||
source ./env.sh | 
				
			|||
kmk LOCALCFG=./LocalConfig.kmk | 
				
			|||
 | 
				
			|||
# Install VirtualBox | 
				
			|||
cd "out/$BUILD_PLATFORM.$BUILD_PLATFORM_ARCH/release/bin" | 
				
			|||
 | 
				
			|||
rm -f *.debug | 
				
			|||
 | 
				
			|||
# binaries | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_bindir" | 
				
			|||
for i in VBoxHeadless VBoxManage VBoxSDL VirtualBox VBoxBalloonCtrl VBoxBugReport VBoxDTrace vboxwebsrv; do | 
				
			|||
    ln -sf "$dir_sysroot/$dir_prefix/$dir_libdir/$name/VBox.sh" "$dir_install/$dir_prefix/$dir_bindir/$i" | 
				
			|||
    ln -sf "$dir_sysroot/$dir_prefix/$dir_libdir/$name/VBox.sh" "$dir_install/$dir_prefix/$dir_bindir/$(echo $i | tr '[:upper:]' '[:lower:]')" | 
				
			|||
done | 
				
			|||
chmod 4511 VBoxHeadless VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT VBoxSDL VBoxVolInfo VirtualBox | 
				
			|||
 | 
				
			|||
# icons | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/pixmaps" | 
				
			|||
mv VBox.png "$dir_install/$dir_prefix/$dir_datadir/pixmaps" | 
				
			|||
 | 
				
			|||
for i in icons/*; do | 
				
			|||
    mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/$(basename $i)/mimetypes" | 
				
			|||
    mv $i/* "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/$(basename $i)/mimetypes" | 
				
			|||
done | 
				
			|||
rm -rf icons | 
				
			|||
 | 
				
			|||
# desktop | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/applications" "$dir_install/$dir_prefix/$dir_datadir/mime/packages" | 
				
			|||
mv virtualbox.desktop "$dir_install/$dir_prefix/$dir_datadir/applications" | 
				
			|||
mv virtualbox.xml "$dir_install/$dir_prefix/$dir_datadir/mime/packages" | 
				
			|||
 | 
				
			|||
# install configuration | 
				
			|||
mkdir -p "$dir_install/$dir_sysconfdir/vbox" | 
				
			|||
echo "INSTALL_DIR='$dir_sysroot/$dir_prefix/$dir_libdir/$name'" > "$dir_install/$dir_sysconfdir/vbox/vbox.cfg" | 
				
			|||
 | 
				
			|||
# Fix the kernel source directory | 
				
			|||
mkdir vboxhost | 
				
			|||
mv src/* vboxhost | 
				
			|||
mv vboxhost src | 
				
			|||
 | 
				
			|||
# Move the directory | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_libdir/$name" | 
				
			|||
cp -a * "$dir_install/$dir_prefix/$dir_libdir/$name" | 
				
			|||
 | 
				
			|||
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: | 
				
			|||
@ -1,3 +0,0 @@ | 
				
			|||
export DEVKITPRO='%DEVKITPRO%' | 
				
			|||
export DEVKITARM="$DEVKITPRO/devkitARM" | 
				
			|||
export PATH="$PATH:$DEVKITARM/bin" | 
				
			|||
@ -0,0 +1,8 @@ | 
				
			|||
misc_debian_patch() { | 
				
			|||
    egrep -v '^#' debian/patches/series | xargs -I% patch -p1 -i debian/patches/% | 
				
			|||
} | 
				
			|||
 | 
				
			|||
misc_debian_patch_exclude() { | 
				
			|||
    fgrep -vx "$1" debian/patches/series > debian/patches/series.new | 
				
			|||
    mv debian/patches/series.new debian/patches/series | 
				
			|||
} | 
				
			|||
@ -0,0 +1,56 @@ | 
				
			|||
name=go | 
				
			|||
majver=1.8 | 
				
			|||
version=$majver.1 | 
				
			|||
bootstrap_version=1.4.3 | 
				
			|||
update_url='https://golang.org/dl/' | 
				
			|||
 | 
				
			|||
define_option '!bootstrap: Bootstrap this program' | 
				
			|||
 | 
				
			|||
dlextract "https://storage.googleapis.com/golang/$name$version.src.tar.gz" \ | 
				
			|||
          '409dd21e7347dd1ea9efe64a700073cc' | 
				
			|||
 | 
				
			|||
if option bootstrap; then | 
				
			|||
    download "https://storage.googleapis.com/golang/$name$bootstrap_version.src.tar.gz" \ | 
				
			|||
             'dfb604511115dd402a77a553a5923a04' | 
				
			|||
fi | 
				
			|||
header_end | 
				
			|||
 | 
				
			|||
if option bootstrap; then | 
				
			|||
    mkdir bootstrap; cd bootstrap | 
				
			|||
    extract "$name$bootstrap_version.src.tar.gz" | 
				
			|||
 | 
				
			|||
    cd "$name/src" | 
				
			|||
    CGO_ENABLED=0 ./make.bash | 
				
			|||
 | 
				
			|||
    cd .. | 
				
			|||
    export GOROOT_BOOTSTRAP="$PWD" | 
				
			|||
    cd ../.. | 
				
			|||
else | 
				
			|||
    export GOROOT_BOOTSTRAP="$GOROOT" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
cd "$name" | 
				
			|||
export GOROOT="$PWD" | 
				
			|||
 | 
				
			|||
( cd src | 
				
			|||
    GOROOT_FINAL="/$dir_prefix/$dir_libdir/go/$name$majver" \ | 
				
			|||
    ./make.bash | 
				
			|||
    ../bin/go install -buildmode=shared -linkshared std | 
				
			|||
) | 
				
			|||
 | 
				
			|||
# Clean up a bit | 
				
			|||
rm -rf pkg/bootstrap pkg/obj | 
				
			|||
find src -type f \( ! -name "*.go" -a ! -name "*.c" -a ! -name "*.s" -a ! -name "*.S" -a ! -name "*.h" \) -delete | 
				
			|||
find src -type d -empty -delete | 
				
			|||
 | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_libdir/go/$name$majver" | 
				
			|||
cp -at "$dir_install/$dir_prefix/$dir_libdir/go/$name$majver" bin pkg src | 
				
			|||
 | 
				
			|||
# Set global GOPATH for external libraries | 
				
			|||
cat > go.sh << EOF | 
				
			|||
export GOROOT="/$dir_prefix/$dir_libdir/go/$name$majver" | 
				
			|||
export PATH="\$PATH:\$GOROOT/bin" | 
				
			|||
EOF | 
				
			|||
install -Dm755 -t "$dir_install/$dir_prefix/$dir_sysconfdir/profile.d" go.sh | 
				
			|||
 | 
				
			|||
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: | 
				
			|||
@ -1,10 +1,10 @@ | 
				
			|||
name=acpica | 
				
			|||
version=20161117 | 
				
			|||
version=20170303 | 
				
			|||
update_url='https://acpica.org/downloads' | 
				
			|||
update_names="/files/$name-unix-$version.tar.gz" | 
				
			|||
 | 
				
			|||
dlextract "https://acpica.org/sites/$name/files/$name-unix-$version.tar.gz" \ | 
				
			|||
          'a08919942050b56955580bfa67855ce9' | 
				
			|||
          '704c7d0ba7ee826ea489995c4837ebd2' | 
				
			|||
header_end | 
				
			|||
 | 
				
			|||
cd "$name-unix-$version" | 
				
			|||
@ -0,0 +1,38 @@ | 
				
			|||
import 'misc/debian' | 
				
			|||
 | 
				
			|||
name=kBuild | 
				
			|||
deb_name=kbuild | 
				
			|||
real_version=2814 | 
				
			|||
orig_version=0.1.9998svn$real_version+dfsg | 
				
			|||
version=$orig_version-2 | 
				
			|||
update_url="http://http.debian.net/debian/pool/main/k/$deb_name/" | 
				
			|||
 | 
				
			|||
define_option '!bootstrap: Bootstrap this program' | 
				
			|||
 | 
				
			|||
dlextract "http://http.debian.net/debian/pool/main/k/$deb_name/${deb_name}_$orig_version.orig.tar.gz" \ | 
				
			|||
          '30f6102dc004235f276a5c2d9cfbe781' | 
				
			|||
download "http://http.debian.net/debian/pool/main/k/$deb_name/${deb_name}_$version.debian.tar.xz" \ | 
				
			|||
         'ce194754401fed5a7f992f07b7304b31' | 
				
			|||
header_end | 
				
			|||
 | 
				
			|||
cd "$deb_name-$real_version" | 
				
			|||
 | 
				
			|||
extract "${deb_name}_$version.debian.tar.xz" | 
				
			|||
misc_debian_patch | 
				
			|||
 | 
				
			|||
option bootstrap kBuild/env.sh --full make -f bootstrap.gmk | 
				
			|||
kBuild/env.sh kmk rebuild | 
				
			|||
kBuild/env.sh kmk install \ | 
				
			|||
    NIX_INSTALL_DIR="/$dir_prefix" \ | 
				
			|||
    MY_INST_BIN="\$(MY_INST_ROOT)$dir_bindir/" \ | 
				
			|||
    MY_INST_DATA="\$(MY_INST_ROOT)$dir_datadir/$name/" \ | 
				
			|||
    MY_INST_DOC="\$(MY_INST_ROOT)$dir_docdir/$name/" | 
				
			|||
 | 
				
			|||
cp -aT out/*/release/dist "$dir_install" | 
				
			|||
install -Dm644 -t "$dir_install/$dir_prefix/$dir_mandir/man1" debian/manpages/kmk.1 | 
				
			|||
for x in $(ls out/*/release/dist/usr/bin/* | fgrep -vx 'kmk'); do | 
				
			|||
    bin="$(basename "$x")" | 
				
			|||
    ln -sf kmk.1 "$dir_install/$dir_prefix/$dir_mandir/man1/$bin.1" | 
				
			|||
done | 
				
			|||
 | 
				
			|||
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: | 
				
			|||
@ -1,17 +1,25 @@ | 
				
			|||
# TODO (probably never): Separate all libraries in different packages. | 
				
			|||
 | 
				
			|||
name=syncthing | 
				
			|||
version=0.14.13 | 
				
			|||
version=0.14.26 | 
				
			|||
update_url="https://github.com/$name/$name/releases" | 
				
			|||
 | 
				
			|||
dlextract "https://github.com/$name/$name/releases/download/v$version/$name-source-v$version.tar.gz" \ | 
				
			|||
          '116ad104dc286d930a0e260efd6aed03' | 
				
			|||
          'ba64e5d7100a3de07c328f3458dbaed4' | 
				
			|||
extrafile 'syncthing-browser.desktop' | 
				
			|||
header_end | 
				
			|||
 | 
				
			|||
# Set up a GOPATH for all the included libraries | 
				
			|||
mkdir -p "src/github.com/$name/" | 
				
			|||
mv "$name" "src/github.com/$name" | 
				
			|||
mv -T "$name" "src/github.com/$name/$name" | 
				
			|||
export GOPATH="$PWD" | 
				
			|||
 | 
				
			|||
cd "src/github.com/$name/$name" | 
				
			|||
 | 
				
			|||
GOPATH="$PWD/../../../../:$GOPATH" go run build.go -no-upgrade | 
				
			|||
# Do shared linking against the go libraries | 
				
			|||
sed -i -e 's/"install", "-v", "-ldflags"/"install", "-linkshared", "-v", "-ldflags"/' build.go | 
				
			|||
 | 
				
			|||
go run build.go -no-upgrade | 
				
			|||
 | 
				
			|||
# Install program | 
				
			|||
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" bin/syncthing | 
				
			|||
@ -0,0 +1,146 @@ | 
				
			|||
# NOTE: This package uses a prebuilt BIOS image, that can only be properly built with OpenWatcom. | 
				
			|||
 | 
				
			|||
import 'vcs/svn' | 
				
			|||
import 'misc/debian' | 
				
			|||
 | 
				
			|||
name=VirtualBox | 
				
			|||
deb_name=virtualbox | 
				
			|||
orig_version=5.1.18 | 
				
			|||
version=$orig_version-dfsg-1 | 
				
			|||
update_url="http://http.debian.net/debian/pool/contrib/v/$deb_name/" | 
				
			|||
 | 
				
			|||
define_option 'pulseaudio: Add pulseaudio support' | 
				
			|||
define_option 'pam: Use PAM for authentication' | 
				
			|||
define_option 'docs: Build documentation (requires texlive)' | 
				
			|||
 | 
				
			|||
dlfile "http://download.virtualbox.org/virtualbox/$orig_version/$name-$orig_version.tar.bz2" \ | 
				
			|||
       '1a7db64cd69ba6d39574fb333e031251' | 
				
			|||
dlextract "http://http.debian.net/debian/pool/contrib/v/$deb_name/${deb_name}_$version.debian.tar.xz" \ | 
				
			|||
          'b1b603b64426a6595fd52e930070a751' | 
				
			|||
header_end | 
				
			|||
 | 
				
			|||
# Unpack and sanitize the source tarball | 
				
			|||
( cd debian | 
				
			|||
    # We don't need to repack the sources. | 
				
			|||
    sed -i -e '/^tar.*-cJf/,+2d' get-orig-source.sh | 
				
			|||
 | 
				
			|||
    ./get-orig-source.sh --upstream-version $orig_version | 
				
			|||
) | 
				
			|||
 | 
				
			|||
mv debian "$name-$orig_version" | 
				
			|||
cd "$name-$orig_version" | 
				
			|||
 | 
				
			|||
# Exclude some patches | 
				
			|||
misc_debian_patch_exclude 01-build-arch.patch  # Debian-exclusive patch that uses dpkg-architecture. | 
				
			|||
misc_debian_patch_exclude 04-vboxdrv-references.patch  # Debian-specific error messages. | 
				
			|||
misc_debian_patch_exclude 12-make-module.patch  # Debian uses amd64 instead of x86_64. | 
				
			|||
misc_debian_patch_exclude 13-modules-mismatch.patch  # Debian-specific error messages. | 
				
			|||
 | 
				
			|||
# Replace /usr/include with whatever we're using | 
				
			|||
sed -i -e "/^+\t\/usr\/include/s/usr\/include/$(safe_sed "$dir_prefix/$dir_includedir")/" debian/patches/18-system-xorg.patch | 
				
			|||
 | 
				
			|||
# Apply debian patches | 
				
			|||
misc_debian_patch | 
				
			|||
 | 
				
			|||
# Fix path to sysconfdir in some scripts | 
				
			|||
sed -i -e "s/\/etc\/vbox\//$(safe_sed "/$dir_prefix/$dir_sysconfdir/vbox/")/g" \ | 
				
			|||
    src/VBox/Installer/linux/VBox.sh \ | 
				
			|||
    src/VBox/Installer/linux/vboxdrv.sh \ | 
				
			|||
    src/VBox/Installer/linux/*-service.sh \ | 
				
			|||
    src/VBox/HostDrivers/*/linux/Makefile | 
				
			|||
 | 
				
			|||
# Make vboxdrv.sh find the proper kernel sources | 
				
			|||
sed -i -e 's/\${INSTALL_DIR}\/src\/vboxhost/\${INSTALL_DIR}\/src/' \ | 
				
			|||
       -e '/^elif test -x \/usr\/lib\/virtualbox\/VirtualBox/,+2d' src/VBox/Installer/linux/vboxdrv.sh | 
				
			|||
 | 
				
			|||
# Make sure VBox.sh finds the proper INSTALL_DIR | 
				
			|||
sed -i -e '/^if test -f \/usr\/lib\/virtualbox\/VirtualBox/,+2d' \ | 
				
			|||
       -e 's/^elif test -f "${MY_DIR}/if test -f "${MY_DIR}/' src/VBox/Installer/linux/VBox.sh | 
				
			|||
 | 
				
			|||
# Qt5 requires -std=c++11 | 
				
			|||
sed -i -e 's/^CXX_FLAGS="\(.*\)"/CXX_FLAGS="\1 -std=c++11"/' configure | 
				
			|||
 | 
				
			|||
# Copy debian's configuration, barring a few things | 
				
			|||
egrep -vf - debian/LocalConfig.kmk > LocalConfig.kmk << 'EOF' | 
				
			|||
^VBOX_JAVA_HOME | 
				
			|||
^VBOX_PATH_DOCBOOK_DTD | 
				
			|||
EOF | 
				
			|||
 | 
				
			|||
# Append our configuration | 
				
			|||
cat >> LocalConfig.kmk << EOF | 
				
			|||
VBOX_PATH_APP_PRIVATE_ARCH := /$dir_prefix/$dir_libdir/$name | 
				
			|||
VBOX_PATH_SHARED_LIBS := \$(VBOX_PATH_APP_PRIVATE_ARCH) | 
				
			|||
VBOX_WITH_RUNPATH := \$(VBOX_PATH_APP_PRIVATE_ARCH) | 
				
			|||
VBOX_PATH_APP_PRIVATE := /$dir_prefix/$dir_datadir/$name | 
				
			|||
VBOX_PATH_APP_DOCS = /$dir_prefix/$dir_docdir/$name | 
				
			|||
 | 
				
			|||
VBOX_GCC_OPT := $CXXFLAGS | 
				
			|||
VBOX_USE_SYSTEM_XORG_HEADERS := 1 | 
				
			|||
VBOX_NO_LEGACY_XORG_X11 := 1 | 
				
			|||
VBOX_WITH_REGISTRATION_REQUEST := | 
				
			|||
VBOX_WITH_UPDATE_REQUEST := | 
				
			|||
VBOX_WITH_EXTPACK_VBOXDTRACE := | 
				
			|||
VBOX_WITHOUT_ADDITIONS := 1 | 
				
			|||
 | 
				
			|||
$(option pam || echo VBOX_WITH_PAM :=) | 
				
			|||
EOF | 
				
			|||
 | 
				
			|||
./configure \ | 
				
			|||
    --ose \ | 
				
			|||
    --disable-kmods \ | 
				
			|||
    --with-makeself=/bin/true \ | 
				
			|||
    --disable-java \ | 
				
			|||
    $(option pulseaudio || echo --disable-pulse) \ | 
				
			|||
    $(option docs || echo --disable-docs) | 
				
			|||
source ./env.sh | 
				
			|||
kmk LOCALCFG=./LocalConfig.kmk | 
				
			|||
 | 
				
			|||
# Install VirtualBox | 
				
			|||
 | 
				
			|||
# manpages (by debian) | 
				
			|||
install -Dm644 -t "$dir_install/$dir_prefix/$dir_mandir/man1" \ | 
				
			|||
    debian/manpages/VirtualBox.1 \ | 
				
			|||
    debian/manpages/VBoxManage.1 \ | 
				
			|||
    debian/manpages/VBoxSDL.1 \ | 
				
			|||
    debian/manpages/VBoxHeadless.1 \ | 
				
			|||
    debian/manpages/VBoxBalloonCtrl.1 \ | 
				
			|||
    debian/manpages/vboxwebsrv.1 | 
				
			|||
 | 
				
			|||
cd "out/$BUILD_PLATFORM.$BUILD_PLATFORM_ARCH/release/bin" | 
				
			|||
 | 
				
			|||
rm -f *.debug | 
				
			|||
 | 
				
			|||
# Apply suid to VirtualBox | 
				
			|||
chmod 4711 VirtualBox VBoxSDL VBoxHeadless | 
				
			|||
 | 
				
			|||
# binaries | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_bindir" | 
				
			|||
for i in VirtualBox VBoxManage VBoxSDL VBoxHeadless VBoxAutostart VBoxBalloonCtrl VBoxBugReport VBoxDTrace vboxwebsrv; do | 
				
			|||
    ln -sf "/$dir_prefix/$dir_libdir/$name/VBox.sh" "$dir_install/$dir_prefix/$dir_bindir/$i" | 
				
			|||
    ln -sf "/$dir_prefix/$dir_libdir/$name/VBox.sh" "$dir_install/$dir_prefix/$dir_bindir/$(echo $i | tr '[:upper:]' '[:lower:]')" | 
				
			|||
done | 
				
			|||
 | 
				
			|||
# icons | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/pixmaps" | 
				
			|||
mv VBox.png "$dir_install/$dir_prefix/$dir_datadir/pixmaps" | 
				
			|||
 | 
				
			|||
for i in icons/*; do | 
				
			|||
    mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/$(basename $i)/mimetypes" | 
				
			|||
    mv $i/* "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/$(basename $i)/mimetypes" | 
				
			|||
done | 
				
			|||
rm -rf icons | 
				
			|||
 | 
				
			|||
# desktop | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/applications" "$dir_install/$dir_prefix/$dir_datadir/mime/packages" | 
				
			|||
mv virtualbox.desktop "$dir_install/$dir_prefix/$dir_datadir/applications" | 
				
			|||
mv virtualbox.xml "$dir_install/$dir_prefix/$dir_datadir/mime/packages" | 
				
			|||
 | 
				
			|||
# install configuration | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_sysconfdir/vbox" | 
				
			|||
echo "INSTALL_DIR='/$dir_prefix/$dir_libdir/$name'" > "$dir_install/$dir_prefix/$dir_sysconfdir/vbox/vbox.cfg" | 
				
			|||
 | 
				
			|||
# Move the directory | 
				
			|||
mkdir -p "$dir_install/$dir_prefix/$dir_libdir/$name" | 
				
			|||
cp -a * "$dir_install/$dir_prefix/$dir_libdir/$name" | 
				
			|||
 | 
				
			|||
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: | 
				
			|||
					Loading…
					
					
				
		Reference in new issue