Compare commits

...

14 Commits

8 changed files with 34 additions and 20 deletions

20
build
View File

@ -1,14 +1,18 @@
#!/bin/sh
set -e
[ -d cache ] || mkdir cache
SPAWN="systemd-nspawn -M gentoolooqsbuilder -D gentoo --bind=$(realpath ./out):/out --bind=$(realpath scripts):/scripts --bind=$(realpath cache):/var/cache/distfiles"
SPAWN="bwrap --bind gentoo / --dev /dev --proc /proc --perms 1777 --tmpfs /dev/shm --ro-bind /etc/resolv.conf /etc/resolv.conf --bind $(realpath ./out) /out --bind $(realpath scripts) /scripts --bind $(realpath cache) /var/cache/distfiles "
export UNPRIVUSER=$(id -n -u 1000)
SETUPSCRIPT="/scripts/3-setup-gentoo.sh"
BUILDSCRIPT="/scripts/4-build-looqs.sh"
./scripts/1-create.sh
sudo ./scripts/2-create.sh
sudo ${SPAWN} /${SETUPSCRIPT}
sudo ${SPAWN} su - builder -c /${BUILDSCRIPT}
./scripts/5-bundle.sh
if [ "$1" != "skipsetup" ] ; then
su $UNPRIVUSER -c ./scripts/1-create.sh
./scripts/2-create.sh
${SPAWN} /scripts/3-setup-gentoo.sh
chown "$UNPRIVUSER" -R out
fi
${SPAWN} su - builder -c /scripts/4-build-looqs.sh
chown "$UNPRIVUSER" -R out
su $UNPRIVUSER -c "cd $(pwd); ./scripts/5-bundle.sh"

View File

@ -1,9 +1,9 @@
#!/bin/bash
set -e
# TODO: always download latest
wget https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/current-stage3-amd64-hardened-openrc/stage3-amd64-hardened-openrc-20220619T170540Z.tar.xz -O hardened.tar.xz
wget https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/current-stage3-amd64-hardened-openrc/stage3-amd64-hardened-openrc-20220619T170540Z.tar.xz.asc -O hardened.tar.xz.asc
LATEST=$( curl -L "https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/latest-stage3-amd64-hardened-openrc.txt" | tail -n 1 | awk '{print $1}' )
wget "https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/$LATEST" -O hardened.tar.xz
wget "https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/$LATEST.asc" -O hardened.tar.xz.asc
gpg --verify hardened.tar.xz.asc hardened.tar.xz

View File

@ -5,10 +5,13 @@ mkdir --parents /etc/portage/repos.conf
cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf
emerge-webrsync
export USE="X jpeg png icu -accessibility -debug -dbus cairo"
echo 'USE="X vulkan jpeg png icu cairo -accessibility -debug -dbus"' >> /etc/portage/make.conf
emerge -v --update --newuse --deep @world
emerge -v qtcore qtgui uchardet
emerge -v qtwidgets qtsql qtnetwork qtconcurrent
export USE="X jpeg png icu -accessibility -debug -dbus qt5 cairo minizip"
emerge -v qtsvg
export USE="minizip qt5"
emerge -v app-text/poppler
emerge -v dev-libs/quazip
emerge -v dev-vcs/git

View File

@ -23,6 +23,7 @@ make
cp cli/looqs /out/bin/
cp gui/looqs-gui /out/bin/
cp LICENSE* /out/
for lib in $( find /usr/lib64/ -mindepth 1 | grep libQt | grep .so ) ; do
cp -a "$lib" /out/lib/
@ -31,7 +32,7 @@ done
cp -a /usr/lib64/libcrypto* /out/lib/
cp -a /usr/lib64/qt5/plugins /out/lib/
for lib in $( ldd gui/looqs-gui | awk '{print $3}' | grep so | grep -vE "libGL|libm|libc|fontconfig|libgcc|freetype|libX11|libQt" ) ; do
for lib in $( ldd gui/looqs-gui | awk '{print $3}' | grep so | grep -vE "libGL|libm.so|libc|harfbuzz|fontconfig|libgcc|freetype|libX11|libQt" ) ; do
cp "$lib" /out/lib/
done

View File

@ -4,10 +4,18 @@ set -e
DIRNAME="looqs-${TAG}"
ARCHIVENAME="${DIRNAME}.tar.xz"
mv out ${DIRNAME}
rm -rf $DIRNAME*
cp -a out ${DIRNAME}
cp src/looqs-gui ${DIRNAME}
cp src/looqs ${DIRNAME}
cp src/README ${DIRNAME}
chmod 755 src/looqs-gui
chmod 755 src/looqs
patchelf --set-rpath '$ORIGIN/../lib/' ${DIRNAME}/bin/*
patchelf --set-rpath '$ORIGIN' ${DIRNAME}/lib/*.so*
patchelf --set-rpath '$ORIGIN/../../' $( find "${DIRNAME}/lib/plugins/" | grep so$ )
tar cfpvJ "${DIRNAME}".tar.xz "${DIRNAME}"
gpg -b --local-user "$SIGNING_KEY_EMAIL" "$ARCHIVENAME"
gpg --batch --no-tty -b --local-user "$SIGNING_KEY_EMAIL" "$ARCHIVENAME"

View File

@ -1,2 +1,2 @@
TAG="master"
TAG="v0.4"
SIGNING_KEY_EMAIL="repo@quitesimple.org"

View File

@ -2,6 +2,5 @@
SELF=$(readlink -f "$0")
HERE=${SELF%/*}
export LD_LIBRARY_PATH="/${HERE}/lib"
export QT_PLUGIN_PATH="/${HERE}/lib/plugins"
./bin/looqs

View File

@ -2,6 +2,5 @@
SELF=$(readlink -f "$0")
HERE=${SELF%/*}
export LD_LIBRARY_PATH="/${HERE}/lib"
export QT_PLUGIN_PATH="/${HERE}/lib/plugins"
"${HERE}/bin/looqs-gui"