-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#! /bin/bash | ||
|
||
# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh | ||
# TESTING=1 | ||
|
||
PKG=qemu | ||
VERSION=7.2.0 | ||
BUILD=0 | ||
|
||
# URL=https://download.qemu.org/qemu-$VERSION.tar.xz | ||
URL=https://beehive.molgen.mpg.de/7630d6a9eba7ab2bcb9979d6d24c2697/qemu-7.2.0.tar.xz | ||
|
||
PREFIX=/pkg/$PKG-$VERSION-$BUILD | ||
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi | ||
|
||
set -xe | ||
umask 022 | ||
|
||
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.$USER.build.tmp | ||
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) | ||
mkdir -p $BUILD_TMPDIR/home | ||
export TMPDIR=$BUILD_TMPDIR | ||
export HOME=$BUILD_TMPDIR/home | ||
|
||
exec </dev/null | ||
|
||
mkdir -p $PREFIX | ||
cat >$PREFIX/profile <<-EOF | ||
PATH=$PREFIX/bin:\$PATH | ||
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi | ||
EOF | ||
. $PREFIX/profile | ||
|
||
|
||
# temporary install the sphinx-rtd-theme (it is a downgrader and not found in pkg-python) | ||
PYTHONLIBVER=$(python -V | tr P p | tr -d ' ' | cut -d. -f-2) | ||
export PYTHONPATH=$HOME/tmp_python/lib/$PYTHONLIBVER/site-packages | ||
pip3 install --prefix=$HOME/tmp_python sphinx-rtd-theme 'docutils<0.18' --no-deps --ignore-installed | ||
|
||
BUILDDIR=$PREFIX/build | ||
|
||
mkdir -p $BUILDDIR | ||
cd $BUILDDIR | ||
|
||
AUDIODRIVERS=${AUDIODRIVERS:-alsa,oss,pa} | ||
|
||
test -e qemu-${VERSION}.tar.xz || wget --no-verbose $URL | ||
test -d qemu-$VERSION || tar -xf qemu-${VERSION}.tar.xz | ||
cd qemu-$VERSION | ||
|
||
./configure --prefix=${PREFIX} \ | ||
--enable-system \ | ||
--enable-jemalloc \ | ||
--audio-drv-list=${AUDIODRIVERS} \ | ||
--enable-virtiofsd | ||
|
||
make -j $(($(nproc)*4/5+1)) V=1 | ||
make install | ||
|
||
|
||
|
||
exit |