oops i forgot to commit
This commit is contained in:
@@ -1,41 +1,50 @@
|
||||
# TODO when a new kf6 ver drops update also the single kapidox recipe (and breeze-icons and extra-cmake-modules and k3b)
|
||||
pkgname = "kf6"
|
||||
# TODO when a new kf6 ver drops update also the single kapidox recipe (and breeze-icons and extra-cmake-modules and k3b kirigami addons and plasma
|
||||
pkgname = "kf6" # libkccdb, pulseaudio-qt kde-connect
|
||||
pkgver = "6.20.0"
|
||||
Pkgver = pkgver[:4]
|
||||
source = f"https://download.kde.org/stable/frameworks/{Pkgver}/attica-{pkgver}.tar.xz"
|
||||
source = f"https://rocketleaguechatp.duckdns.org/pappalaugh.jpg"
|
||||
bbuilddir = f"/tmp/fempkg/build/{pkgname}/attica-{pkgver}"
|
||||
builddir = f"{bbuilddir}/kf6"
|
||||
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
|
||||
outputdir = "/home/gabry/lfs-repo/binpkg"
|
||||
manifestdir = "/home/gabry/lfs-repo/manifests"
|
||||
destdir = f"{fembuilddir}/DESTDIR"
|
||||
deps = ["gpgmepp", "aspell","extra-cmake-modules", "breeze-icons", "libcanberra", "libgcrypt", "libical", "lmdb", "qca", "libqrencode", "plasma-wayland-protocols", "shared-mime-info", "URI", "wget"]
|
||||
deps = ["gpgmepp", "aspell","extra-cmake-modules", "breeze-icons", "libcanberra", "libgcrypt",
|
||||
"libical", "lmdb", "qca", "libqrencode", "plasma-wayland-protocols",
|
||||
"shared-mime-info", "URI", "wget", "zxing-cpp"]
|
||||
|
||||
build = [
|
||||
# Extract
|
||||
f"mkdir /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/attica-{pkgver}.tar.xz && mkdir {builddir}",
|
||||
f"mkdir -p {builddir}",
|
||||
|
||||
# kf6 prefix + versioned symlink
|
||||
f"mkdir -p {destdir}/opt/kf6-{pkgver} && ln -sfn kf6-{pkgver} {destdir}/opt/kf6",
|
||||
f"mkdir -p {destdir}/opt/kf6/{{etc,share}}",
|
||||
|
||||
f"""mkdir -p {destdir}$KF6_PREFIX/etc/dbus-1 &&
|
||||
mkdir -p {destdir}$KF6_PREFIX/share/dbus-1 &&
|
||||
mkdir -p {destdir}$KF6_PREFIX/share/polkit-1""",
|
||||
|
||||
f"mkdir -p {destdir}/etc/dbus-1 {destdir}/usr/share/dbus-1 {destdir}/usr/share/polkit-1",
|
||||
|
||||
# 64-bit build
|
||||
f"cd {builddir} && export url=https://rocketleaguechatp.duckdns.org/kf6/ && wget -r -nH -nd -A '*.xz' -np $url || true",
|
||||
f"cd {builddir} && wget https://rocketleaguechatp.duckdns.org/frameworks-{pkgver}.md5",
|
||||
f"""cd {builddir} &&
|
||||
|
||||
f"""cd {builddir} && bash -e <<'EOF'
|
||||
mkdir -p {destdir}$KF6_PREFIX
|
||||
|
||||
while read -r line; do
|
||||
|
||||
# Get the file name, ignoring comments and blank lines
|
||||
if $(echo $line | grep -E -q '^ *$|^#' ); then continue; fi
|
||||
file=$(echo $line | cut -d" " -f2)
|
||||
|
||||
pkg=$(echo $file|sed 's|^.*/||') # Remove directory
|
||||
packagedir=$(echo $pkg|sed 's|\.tar.*||') # Package directory
|
||||
|
||||
name=$(echo $pkg|sed 's|-6.*$||') # Isolate package name
|
||||
pkg=$(echo $file|sed 's|^.*/||')
|
||||
packagedir=$(echo $pkg|sed 's|\\.tar.*||')
|
||||
name=$(echo $pkg|sed 's|-6.*$||')
|
||||
|
||||
tar -xf $file
|
||||
pushd $packagedir
|
||||
|
||||
# kapidox is a python module
|
||||
case $name in
|
||||
kapidox)
|
||||
pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD
|
||||
@@ -51,7 +60,7 @@ while read -r line; do
|
||||
esac
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cd build
|
||||
|
||||
cmake -D CMAKE_INSTALL_PREFIX=$KF6_PREFIX \\
|
||||
-D CMAKE_INSTALL_LIBEXECDIR=libexec \\
|
||||
@@ -60,33 +69,57 @@ while read -r line; do
|
||||
-D CMAKE_BUILD_TYPE=Release \\
|
||||
-D BUILD_TESTING=OFF \\
|
||||
-D BUILD_PYTHON_BINDINGS=OFF \\
|
||||
-D ENABLE_DOCS=OFF \\
|
||||
-W no-dev ..
|
||||
|
||||
make -j$(nproc)
|
||||
make DESTDIR={destdir} install
|
||||
|
||||
mkdir -p "{destdir}/usr/share/licenses/$name"
|
||||
|
||||
LICENSE_FILES=$(find . \\
|
||||
-regextype posix-extended \\
|
||||
-iregex '.*(LICEN[SC]E(|S)|COPYING|COPYRIGHT|LEGAL|NOTICE)(|\.txt|\.md)' \\
|
||||
-iregex '.*(LICEN[SC]E(|S)|COPYING|COPYRIGHT|LEGAL|NOTICE)(|\\.txt|\\.md)' \\
|
||||
-type f)
|
||||
|
||||
while read -r lf; do
|
||||
[ -z "$lf" ] && continue
|
||||
relpath=$(echo "$lf" | sed 's|^\./||')
|
||||
install -Dm644 "$lf" \\
|
||||
"{destdir}/usr/share/licenses/$name/$relpath"
|
||||
done <<< "$LICENSE_FILES"
|
||||
popd
|
||||
|
||||
rm -rf $packagedir
|
||||
/sbin/ldconfig
|
||||
while read -r lf; do
|
||||
[ -z "$lf" ] && continue
|
||||
relpath=$(echo "$lf" | sed 's|^\\./||')
|
||||
install -Dm644 "$lf" \\
|
||||
"{destdir}/usr/share/licenses/$name/$relpath"
|
||||
done <<< "$LICENSE_FILES"
|
||||
|
||||
popd
|
||||
rm -rf $packagedir
|
||||
/sbin/ldconfig
|
||||
|
||||
done < frameworks-{pkgver}.md5
|
||||
EOF
|
||||
""",
|
||||
|
||||
# Rename and link inside DESTDIR instead of system root
|
||||
f"cd {destdir}/opt && mv -v kf6 kf6-{pkgver} && ln -sfvn kf6-{pkgver} kf6",
|
||||
f"rm -rf {destdir}/opt/kf6/lib/systemd || true",
|
||||
# Move payloads safely (no globbing, no dotfile loss)
|
||||
f"""if [ -d {destdir}/opt/kf6/etc/dbus-1 ]; then
|
||||
cp -aT {destdir}/opt/kf6/etc/dbus-1 {destdir}/etc/dbus-1 &&
|
||||
rm -rf {destdir}/opt/kf6/etc/dbus-1
|
||||
fi""",
|
||||
|
||||
f"""if [ -d {destdir}/opt/kf6/share/dbus-1 ]; then
|
||||
cp -aT {destdir}/opt/kf6/share/dbus-1 {destdir}/usr/share/dbus-1 &&
|
||||
rm -rf {destdir}/opt/kf6/share/dbus-1
|
||||
fi""",
|
||||
|
||||
f"""if [ -d {destdir}/opt/kf6/share/polkit-1 ]; then
|
||||
cp -aT {destdir}/opt/kf6/share/polkit-1 {destdir}/usr/share/polkit-1 &&
|
||||
rm -rf {destdir}/opt/kf6/share/polkit-1
|
||||
fi""",
|
||||
|
||||
# Replace directories with symlinks (explicit + safe)
|
||||
f"""rm -rf {destdir}$KF6_PREFIX/etc/dbus-1 &&
|
||||
ln -sfn /etc/dbus-1 {destdir}$KF6_PREFIX/etc/dbus-1""",
|
||||
|
||||
f"""rm -rf {destdir}$KF6_PREFIX/share/dbus-1 &&
|
||||
ln -sfn /usr/share/dbus-1 {destdir}$KF6_PREFIX/share/dbus-1 &&
|
||||
ln -sfn /usr/share/polkit-1 {destdir}$KF6_PREFIX/share/polkit-1""",
|
||||
|
||||
# Make tarball + manifests
|
||||
f"mkdir -p {outputdir} && cd {destdir} && tar --transform 's|^\\.||' -I zstd -cf {outputdir}/{pkgname}-{pkgver}.tar.zst .",
|
||||
@@ -99,4 +132,4 @@ done < frameworks-{pkgver}.md5
|
||||
triggers = [
|
||||
f"cd /tmp && find /opt -maxdepth 1 -type d -name \"kf6-*\" ! -name \"kf6-{pkgver}\" -exec rm -rf {{}} +",
|
||||
f"/sbin/ldconfig"
|
||||
]
|
||||
]
|
||||
Reference in New Issue
Block a user