forked from FemboyOS/fempkg_recipes
add mvisor (oops)
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
pkgname = "mvisor"
|
||||
pkgver = "8f9f37d" # hi from alerk
|
||||
source = f"https://github.com/tenclass/mvisor/archive/refs/heads/master.zip"
|
||||
builddir = f"/tmp/fempkg/build/{pkgname}/{pkgname}-master"
|
||||
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
|
||||
outputdir = "/home/gabry/lfs-repo/binpkg"
|
||||
manifestdir = "/home/gabry/lfs-repo/manifests"
|
||||
destdir = f"{fembuilddir}/DESTDIR"
|
||||
|
||||
deps = ["acpica", "virglrenderer", "sdl2", "yaml-cpp", "pixman"]
|
||||
|
||||
build = [
|
||||
# extract
|
||||
f"mkdir -p {fembuilddir} && cd {fembuilddir} && unzip /var/lib/fempkg/pkgs/master.zip",
|
||||
|
||||
# patch meson.build to not fail and for copy
|
||||
f"cd {builddir} && wget https://rocketleaguechatp.duckdns.org/mvisor.patch && patch -p1 <mvisor.patch",
|
||||
|
||||
# compile
|
||||
f"cd {builddir} && mkdir build && cd build && meson setup .. -Dsdl=true -Dvgpu=true && ninja",
|
||||
f"cd {builddir}/build && DESTDIR={destdir} ninja install",
|
||||
f"cd {builddir} && mkdir -p {destdir}/usr/local/share/mvisor && cp share config {destdir}/usr/local/share/mvisor -r",
|
||||
|
||||
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
||||
f"install -v -m644 {builddir}/LICENSE {destdir}/usr/share/licenses/{pkgname}/LICENSE",
|
||||
|
||||
# Make tarball + manifests
|
||||
f"mkdir -p {outputdir} && cd {destdir} && tar --transform 's|^\\.||' -I zstd -cf {outputdir}/{pkgname}-{pkgver}.tar.zst .",
|
||||
f"mkdir -p {manifestdir} && tar -tf {outputdir}/{pkgname}-{pkgver}.tar.zst | grep -v '/$' > {manifestdir}/{pkgname}.txt",
|
||||
|
||||
# cleanup
|
||||
f"rm -rf {fembuilddir}",
|
||||
|
||||
# tell user how to use mvisor cuz p
|
||||
f"echo",
|
||||
f"echo Howdy! Welcome to MVisor, a nice alternative to QEMU.",
|
||||
f"echo You must be new to MVisor, right? Don't worry! there is a sample.yaml in /usr/local/share/mvisor/config ready to be modified to your needs.",
|
||||
f"echo To launch MVisor, fire up a terminal and type",
|
||||
f"echo unset DISPLAY && echo mvisor -c /path/to/your/config -vnc :0",
|
||||
f"echo To view the VM display, you must use a VNC Viewer, like TigerVNC, which is available through jar.",
|
||||
f"echo There is more on the official GitHub repo https://github.com/tenclass/mvisor",
|
||||
f"echo Have fun!"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user