Commit 4cde1aea authored by haggl's avatar haggl
Browse files

Add Vagrant config and build script for building with Arch

parent d7b42f77
Pipeline #430 canceled with stages
in 11 minutes
......@@ -16,3 +16,4 @@ web/site*
/debian/files
/debian/*.substvars
/debian/*.log
.vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
$provision = <<-SCRIPT
pacman -Sy --noconfirm archlinux-keyring
pacman -Su --noconfirm
pacman -S --noconfirm \
base-devel \
git \
qt5-tools \
vlc
SCRIPT
Vagrant.configure("2") do |config|
config.vm.define "builder" do |machine|
machine.vm.box = "archlinux/archlinux"
machine.vm.provider "libvirt" do |lv|
lv.cpus = 4
lv.memory = 4096
end
machine.vm.synced_folder ".", "/home/vagrant/qDaisy"
machine.vm.provision "shell", inline: $provision
machine.vm.provision "file", source: "build.sh", destination: "build.sh"
end
end
#!/bin/sh -e
get_appimage() {
spc=${1%/*}
app=${1#*/}
img=$app.AppImage
curl -Lo "$img" "https://github.com/$spc/$app/releases/download/continuous/$app-x86_64.AppImage"
chmod +x "$img"
"./$img" --appimage-extract
mv squashfs-root "$app"
}
exec_appimage() {
cd "$1"
shift
./AppRun --appdir ../qDaisy/AppDir "$@"
cd -
}
# Get AppImage build toolchain
[ -d linuxdeploy ] || get_appimage linuxdeploy/linuxdeploy
[ -d linuxdeploy-plugin-qt ] || get_appimage linuxdeploy/linuxdeploy-plugin-qt
# Compile and install libduck
[ -d libduck ] || git clone https://git.fnordkollektiv.de/cust/kom-in/libduck.git
cd libduck
./configure --prefix=/usr && make && sudo make install
cd -
# Compile qDaisy binary
cd qDaisy
./configure --prefix=/usr && make && make install DESTDIR=../AppDir
cd -
# Build appimage
exec_appimage linuxdeploy
exec_appimage linuxdeploy-plugin-qt
exec_appimage linuxdeploy --output appimage
mv linuxdeploy/qDaisy*.AppImage .
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment