add script build-glibc-debian
authorSadoon Albader <sadoon@soulserv.xyz>
Fri, 25 Aug 2023 15:44:28 +0000 (18:44 +0300)
committerSadoon Albader <sadoon@soulserv.xyz>
Fri, 25 Aug 2023 15:44:28 +0000 (18:44 +0300)
build-glibc-debian [new file with mode: 0644]

diff --git a/build-glibc-debian b/build-glibc-debian
new file mode 100644 (file)
index 0000000..141dc2e
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+echo "SCRIPT IS STILL WIP, DO NOT RUN"
+
+BASEDIR=~/.local/src/bookworm-sffs/
+BUILDDIR=~/.local/src/bookworm-sffs/src/
+REPODIR=~/.local/src/bookworm-sffs/repo/pool/
+JOBS=1
+CHROOT=bookworm-ppc64el-sbuild
+OPTS=
+RELEASE=bookworm
+
+# To be changed to the full list
+LIST=(glibc)
+
+
+for pkg in $LIST
+do
+        mkdir -p $BUILDDIR/${pkg:0:1}
+done
+
+cd $BUILDDIR
+
+for pkg in $LIST
+do
+        cd $BUILDDIR/${pkg:0:1}/
+        mkdir -p $pkg && cd $BUILDDIR/${pkg:0:1}/$pkg
+        apt source $pkg
+
+        if sbuild -d $RELEASE -c $CHROOT $OPTS -j$JOBS *.dsc; then
+                echo Build successful
+                echo $pkg >> $BASEDIR/success
+                mkdir -p $REPODIR/${pkg:0:1}/$pkg/
+                mv *.deb $REPODIR/${pkg:0:1}/$pkg/
+        else
+                echo Build failed
+                echo $pkg >> $BASEDIR/failed
+        fi
+done