From d5fd012b325ec36d7421a9d7c827bd4689735110 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 22 Jan 2024 09:04:46 +0100 Subject: [PATCH 1/7] [rkvm] fixes --- ap/rkvm/SlackBuild | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ap/rkvm/SlackBuild b/ap/rkvm/SlackBuild index 4bd9f350..8e54a597 100755 --- a/ap/rkvm/SlackBuild +++ b/ap/rkvm/SlackBuild @@ -4,7 +4,7 @@ #GITHUB_REPO=leonardolang/rkvm GITHUB_REPO=htrefil/rkvm VERSION=${VERSION:-latest} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=gwh TMP=/tmp/$TAG @@ -32,7 +32,7 @@ git pull --all cp -R $REPOSITORY $TMP/ cd $TMP/$PRGNAM -[ "x$VERSION" == "xlatest" ] && VERSION=$(git tag --sort=-taggerdate | head -n1) +[ "x$VERSION" == "xlatest" ] && VERSION=$(git describe --tags --abbrev=0) [ "x$VERSION" == "x" ] && VERSION=trunk [ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" || git checkout $VERSION @@ -41,11 +41,11 @@ cargo build --release mkdir -p $PKG$PREFIX/bin find target/release/ -type f -executable -maxdepth 1 -exec cp {} $PKG$PREFIX/bin/ \; chmod 755 $PKG$PREFIX/bin/* -(cd $PKG$PREFIX/bin/ - for i in *; do - mv $i rkvm-$i; - done -) +# (cd $PKG$PREFIX/bin/ +# for i in *; do +# mv $i rkvm-$i; +# done +# ) # move doc/ to the appropriate location mkdir -p $PKG$PREFIX/doc/$PRGNAM From 030f0352e6b30f5cdace1c6c6702cbcdcd3840eb Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 22 Jan 2024 09:05:01 +0100 Subject: [PATCH 2/7] add 2 games --- y/SummertimeSaga/SlackBuild | 56 +++++++++++++++++++++++++++++++++++++ y/What-a-Legend/SlackBuild | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100755 y/SummertimeSaga/SlackBuild create mode 100755 y/What-a-Legend/SlackBuild diff --git a/y/SummertimeSaga/SlackBuild b/y/SummertimeSaga/SlackBuild new file mode 100755 index 00000000..3635df98 --- /dev/null +++ b/y/SummertimeSaga/SlackBuild @@ -0,0 +1,56 @@ +#!/bin/bash + +CWD=$(pwd) +TAG=${TAG:-gwh} +OUTPUT=${OUTPUT:-/tmp} +TMP=/tmp/$TAG + +PRGNAM=$(basename $CWD) +VERSION=${VERSION:-$(echo $PRGNAM-*.zip | grep -o "[0-9-]*" | sed 's|^-||' | sed 's|-$||' | tr - .)} +ORIG_VERSION=$(echo $VERSION | tr . -) +ARCH=${ARCH:-$(uname -m)} +BUILD=${BUILD:-1} + +PKG=$TMP/pkg-$PRGNAM + +rm -rf $PKG + +mkdir -p $TMP +cd $TMP + +mkdir -p $PKG/usr/games/ $PKG/opt/ +cd $PKG/opt/ +[ ! -e $CWD/$PRGNAM-$ORIG_VERSION-pc.zip ] && exit 1 +unzip $CWD/$PRGNAM-$ORIG_VERSION-pc.zip +mv $PRGNAM-$ORIG_VERSION-pc $PRGNAM + +cd $PKG/usr/games/ +ln -s ../../opt/$PRGNAM/$PRGNAM.sh + +mkdir -p $PKG/install + +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +${PRGNAM}: ${PRGNAM} (NSFW game) +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: https://summertimesaga.com +${PRGNAM}: +EOF + +cd $PKG +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz diff --git a/y/What-a-Legend/SlackBuild b/y/What-a-Legend/SlackBuild new file mode 100755 index 00000000..6f3531b4 --- /dev/null +++ b/y/What-a-Legend/SlackBuild @@ -0,0 +1,55 @@ +#!/bin/bash + +CWD=$(pwd) +TAG=${TAG:-gwh} +OUTPUT=${OUTPUT:-/tmp} +TMP=/tmp/$TAG + +PRGNAM=$(basename $CWD) +VERSION=${VERSION:-$(echo $PRGNAM-*.zip | grep -o "[0-9.]*" | head -n1)} +ARCH=${ARCH:-$(uname -m)} +BUILD=${BUILD:-1} + +PKG=$TMP/pkg-$PRGNAM + +rm -rf $PKG + +mkdir -p $TMP +cd $TMP + +mkdir -p $PKG/usr/games/ $PKG/opt/ +cd $PKG/opt/ +[ ! -e $CWD/$PRGNAM-$VERSION-pc.zip ] && exit 1 +unzip $CWD/$PRGNAM-$VERSION-pc.zip +mv $PRGNAM-$VERSION-pc $PRGNAM + +cd $PKG/usr/games/ +ln -s ../../opt/$PRGNAM/$PRGNAM.sh + +mkdir -p $PKG/install + +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +${PRGNAM}: ${PRGNAM} (NSFW game) +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: https://whatalegendgame.com +${PRGNAM}: +EOF + +cd $PKG +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz From 23e06d9d499f886c43d53fe6493e996cca6e2d15 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 22 Jan 2024 15:06:01 +0100 Subject: [PATCH 3/7] Add AnotherChance and My_Dystopian_Robot_Girlfriend --- y/AnotherChance/SlackBuild | 55 ++++++++++++++++ y/My_Dystopian_Robot_Girlfriend/SlackBuild | 73 ++++++++++++++++++++++ y/SummertimeSaga/SlackBuild | 4 +- y/What-a-Legend/SlackBuild | 4 +- 4 files changed, 132 insertions(+), 4 deletions(-) create mode 100755 y/AnotherChance/SlackBuild create mode 100755 y/My_Dystopian_Robot_Girlfriend/SlackBuild diff --git a/y/AnotherChance/SlackBuild b/y/AnotherChance/SlackBuild new file mode 100755 index 00000000..9d223728 --- /dev/null +++ b/y/AnotherChance/SlackBuild @@ -0,0 +1,55 @@ +#!/bin/bash + +CWD=$(pwd) +TAG=${TAG:-gwh} +OUTPUT=${OUTPUT:-/tmp} +TMP=/tmp/$TAG + +PRGNAM=$(basename $CWD) +VERSION=${VERSION:-v$(echo $PRGNAM-*.zip | grep -o "[0-9.]*" | head -n1)} +ARCH=${ARCH:-$(uname -m)} +BUILD=${BUILD:-1} + +PKG=$TMP/pkg-$PRGNAM + +rm -rf $PKG + +mkdir -p $TMP +cd $TMP + +mkdir -p $PKG/usr/games/ $PKG/opt/ +cd $PKG/opt/ +[ ! -e $CWD/$PRGNAM-$VERSION-pc.zip ] && exit 1 +unzip $CWD/$PRGNAM-$VERSION-pc.zip +mv $PRGNAM-$VERSION-pc $PRGNAM + +cd $PKG/usr/games/ +ln -s ../../opt/$PRGNAM/$PRGNAM.sh + +mkdir -p $PKG/install + +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +${PRGNAM}: ${PRGNAM} (NSFW game) +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: (You need to download the game and put the file $PRGNAM-vX.x.x-pc.zip +${PRGNAM}: and put it next to this script) +${PRGNAM}: +${PRGNAM}: https://linktr.ee/timewizardstudios +${PRGNAM}: +EOF + +cd $PKG +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz diff --git a/y/My_Dystopian_Robot_Girlfriend/SlackBuild b/y/My_Dystopian_Robot_Girlfriend/SlackBuild new file mode 100755 index 00000000..cb0ff052 --- /dev/null +++ b/y/My_Dystopian_Robot_Girlfriend/SlackBuild @@ -0,0 +1,73 @@ +#!/bin/bash + +CWD=$(pwd) +TAG=${TAG:-gwh} +OUTPUT=${OUTPUT:-/tmp} +TMP=/tmp/$TAG + +PRGNAM=$(basename $CWD) +VERSION=${VERSION:-$(echo MDRG*.zip | grep -o "[0-9.]*" | head -n1)} +ARCH=${ARCH:-$(uname -m)} +BUILD=${BUILD:-11} + +PKG=$TMP/pkg-$PRGNAM + +[ ! -e $CWD/MDRG$VERSION\ -\ Linux.zip ] && exit 1 + +rm -rf $PKG + +mkdir -p $TMP +cd $TMP + +mkdir -p $PKG/opt/ +unzip -d $PKG/opt/ $CWD/MDRG$VERSION\ -\ Linux.zip +mv $PKG/opt/MDRG$VERSION\ -\ Linux $PKG/opt/$PRGNAM + +chmod +x $PKG/opt/$PRGNAM/My\ Dystopian\ Robot\ Girlfriend.x86_64 +mkdir -p $PKG/opt/$PRGNAM/My\ Dystopian\ Robot\ Girlfriend_Data/Saves/ +mkdir -p $PKG/opt/$PRGNAM/My\ Dystopian\ Robot\ Girlfriend_Data/Mods/ + +mkdir -p $PKG/usr/games/ +cat < $PKG/usr/games/$PRGNAM +#!/bin/bash + +cd /opt/$PRGNAM/ +./My\ Dystopian\ Robot\ Girlfriend.x86_64 +EOF +chmod +x $PKG/usr/games/$PRGNAM + +mkdir -p $PKG/install + +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +${PRGNAM}: ${PRGNAM} (NSFW game) +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: (You need to download the game and put the file MDRGx.x.x\ -\ Linux.zip +${PRGNAM}: and put it next to this script) +${PRGNAM}: +${PRGNAM}: https://incontinentcell.itch.io/factorial-omega +EOF + +cd $PKG || exit 1 +chown -R root:root * + +chown -R root:games $PKG/opt/$PRGNAM/ +chmod -R g+w $PKG/opt/$PRGNAM/ +chmod g+w $PKG/opt/My_Dystopian_Robot_Girlfriend/ \ + $PKG/opt/My_Dystopian_Robot_Girlfriend/My\ Dystopian\ Robot\ Girlfriend_Data/Saves/ \ + $PKG/opt/My_Dystopian_Robot_Girlfriend/My\ Dystopian\ Robot\ Girlfriend_Data/Mods/ + +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz diff --git a/y/SummertimeSaga/SlackBuild b/y/SummertimeSaga/SlackBuild index 3635df98..794216c1 100755 --- a/y/SummertimeSaga/SlackBuild +++ b/y/SummertimeSaga/SlackBuild @@ -44,8 +44,8 @@ ${PRGNAM}: ${PRGNAM}: ${PRGNAM}: ${PRGNAM}: -${PRGNAM}: -${PRGNAM}: +${PRGNAM}: (You need to download the game and put the file $PRGNAM-X-x-x-pc.zip +${PRGNAM}: and put it next to this script) ${PRGNAM}: ${PRGNAM}: https://summertimesaga.com ${PRGNAM}: diff --git a/y/What-a-Legend/SlackBuild b/y/What-a-Legend/SlackBuild index 6f3531b4..ddaba094 100755 --- a/y/What-a-Legend/SlackBuild +++ b/y/What-a-Legend/SlackBuild @@ -43,8 +43,8 @@ ${PRGNAM}: ${PRGNAM}: ${PRGNAM}: ${PRGNAM}: -${PRGNAM}: -${PRGNAM}: +${PRGNAM}: (You need to download the game and put the file $PRGNAM-X.x.x-pc.zip +${PRGNAM}: and put it next to this script) ${PRGNAM}: ${PRGNAM}: https://whatalegendgame.com ${PRGNAM}: From 3be1f3a1f018321101107155ff3ba82216098078 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 22 Jan 2024 15:17:06 +0100 Subject: [PATCH 4/7] Add BacktotheBooty --- y/BacktotheBooty/SlackBuild | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 y/BacktotheBooty/SlackBuild diff --git a/y/BacktotheBooty/SlackBuild b/y/BacktotheBooty/SlackBuild new file mode 100755 index 00000000..aeabe35a --- /dev/null +++ b/y/BacktotheBooty/SlackBuild @@ -0,0 +1,55 @@ +#!/bin/bash + +CWD=$(pwd) +TAG=${TAG:-gwh} +OUTPUT=${OUTPUT:-/tmp} +TMP=/tmp/$TAG + +PRGNAM=$(basename $CWD) +VERSION=${VERSION:-$(echo $PRGNAM-*.zip | grep -o "[0-9.]*" | head -n1)} +ARCH=${ARCH:-$(uname -m)} +BUILD=${BUILD:-1} + +PKG=$TMP/pkg-$PRGNAM + +rm -rf $PKG + +mkdir -p $TMP +cd $TMP + +mkdir -p $PKG/usr/games/ $PKG/opt/ +cd $PKG/opt/ +[ ! -e $CWD/$PRGNAM-$VERSION-pc.zip ] && exit 1 +unzip $CWD/$PRGNAM-$VERSION-pc.zip +mv $PRGNAM-$VERSION-pc $PRGNAM + +cd $PKG/usr/games/ +ln -s ../../opt/$PRGNAM/$PRGNAM.sh + +mkdir -p $PKG/install + +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +${PRGNAM}: ${PRGNAM} (NSFW game) +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: +${PRGNAM}: (You need to download the game and put the file $PRGNAM-X.x.x-pc.zip +${PRGNAM}: and put it next to this script) +${PRGNAM}: +${PRGNAM}: https://dark-coffee-ink.itch.io/back-to-the-booty-a-porn-parody-game +${PRGNAM}: +EOF + +cd $PKG +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz From c8c6ac73220a536d967c2a06407756e1b79cce50 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sat, 27 Jan 2024 10:43:00 +0100 Subject: [PATCH 5/7] add wmenu --- wayland/wmenu/SlackBuild | 78 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 wayland/wmenu/SlackBuild diff --git a/wayland/wmenu/SlackBuild b/wayland/wmenu/SlackBuild new file mode 100755 index 00000000..5c9adf0d --- /dev/null +++ b/wayland/wmenu/SlackBuild @@ -0,0 +1,78 @@ +#!/bin/bash + +# variables +VERSION=${VERSION:-"latest"} +BUILD=1 + +TAG=gwh +OUTPUT=/tmp +TMP=/tmp/$TAG +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +PKG=$TMP/pkg-$PRGNAM + +ARCH=$(uname -m) + +REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM +PREFIX=/usr + +# nettoyage préalable +rm -fr $PKG $TMP/$PRGNAM + +mkdir -p $PKG + +# mise en place +[ ! -e $REPOSITORY ] && git clone https://git.sr.ht/~adnano/wmenu $REPOSITORY +cd $REPOSITORY +git pull + +cp -R $REPOSITORY $TMP/ +cd $TMP/$PRGNAM/ + +[ "x$VERSION" == "xlatest" ] && VERSION=$(git tag --sort=-taggerdate | head -n1) +[ "x$VERSION" == "x" ] && VERSION=trunk +[ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" || git checkout $VERSION + +meson setup --prefix /usr --mandir /usr/man/ build/ +ninja -C build/ +cd build/ +meson install --destdir=$PKG +cd ../ + +mkdir -p $PKG$PREFIX/doc/$PRGNAM +cp *.md $PKG$PREFIX/doc/$PRGNAM/ + +# correction +cd $PKG +chown -R root:root * +[ -d $PKG$PREFIX/man ] && find $PKG$PREFIX/man -name "*.?" -type f -exec gzip -9 {} \; + +# embaumement +mkdir -p $PKG/install + +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +$PRGNAM: $PRGNAM (launcher/menu for Wayland compositors) +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: https://git.sr.ht/~adnano/wmenu +EOF + +# empaquetage +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz From 3f9f4abe94dc4b9f7387886440edb24416fe031c Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sun, 4 Feb 2024 10:45:38 +0100 Subject: [PATCH 6/7] s/gitea/forgejo/g Signed-off-by: Gwenhael Le Moine --- n/forgejo-bin/SlackBuild | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/n/forgejo-bin/SlackBuild b/n/forgejo-bin/SlackBuild index 8def8eb3..8749bf16 100755 --- a/n/forgejo-bin/SlackBuild +++ b/n/forgejo-bin/SlackBuild @@ -5,7 +5,7 @@ CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=${VERSION:-$(curl -q https://codeberg.org/forgejo/forgejo/releases.rss | grep title | head -n2 | tail -n1 | sed 's|||g' | sed 's|||g' | xargs)} ARCH=${ARCH:-$(uname -m)} -BUILD=${BUILD:-5} +BUILD=${BUILD:-6} TAG=${TAG:-gwh} TMP=${TMP:-/tmp/$TAG} @@ -17,13 +17,13 @@ REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM} mkdir -p $REPOSITORY -GITEA_WORK_DIR=/var/lib/gitea +FORGEJO_WORK_DIR=/var/lib/forgejo -# Check if the gitea user and group exist. If not, then bail. -if [ "$(id -g gitea 2> /dev/null)" != "817" -o "$(id -u gitea 2> /dev/null)" != "817" ]; then - echo " You must have an 'gitea' user and group to run this script." - echo " # groupadd -g 817 gitea" - echo " # useradd -d /var/lib/gitea -g gitea -s /bin/bash -u 817 gitea --system " +# Check if the forgejo user and group exist. If not, then bail. +if [ "$(id -g forgejo 2> /dev/null)" != "817" -o "$(id -u forgejo 2> /dev/null)" != "817" ]; then + echo " You must have an 'forgejo' user and group to run this script." + echo " # groupadd -g 817 forgejo" + echo " # useradd -d /var/lib/forgejo -g forgejo -s /bin/bash -u 817 forgejo --system " exit 1 fi @@ -41,20 +41,20 @@ xz -d $REPOSITORY/forgejo-${VERSION}-linux-${SRC_ARCH}.xz rm -fr $PKG mkdir -p $PKG$PREFIX/bin -cp $REPOSITORY/forgejo-${VERSION}-linux-${SRC_ARCH} $PKG$PREFIX/bin/gitea -chmod +x $PKG$PREFIX/bin/gitea +cp $REPOSITORY/forgejo-${VERSION}-linux-${SRC_ARCH} $PKG$PREFIX/bin/forgejo +chmod +x $PKG$PREFIX/bin/forgejo -mkdir -p $PKG/etc/gitea/ -cp $CWD/app.ini $PKG/etc/gitea/app.ini.new -chown -R gitea:gitea $PKG/etc/gitea -chmod 770 $PKG/etc/gitea +mkdir -p $PKG/etc/forgejo/ +cp $CWD/app.ini $PKG/etc/forgejo/app.ini.new +chown -R forgejo:forgejo $PKG/etc/forgejo +chmod 770 $PKG/etc/forgejo -mkdir -p $PKG${GITEA_WORK_DIR}/{custom,data/gitea-repositories,indexers,public,log,.ssh} -chown -R gitea:gitea $PKG/var/lib/gitea -chmod 750 $PKG${GITEA_WORK_DIR}/{data,indexers,log} +mkdir -p $PKG${FORGEJO_WORK_DIR}/{custom,data/forgejo-repositories,indexers,public,log,.ssh} +chown -R forgejo:forgejo $PKG/var/lib/forgejo +chmod 750 $PKG${FORGEJO_WORK_DIR}/{data,indexers,log} -mkdir -p $PKG/var/log/gitea -chown -R gitea:gitea $PKG/var/log/gitea +mkdir -p $PKG/var/log/forgejo +chown -R forgejo:forgejo $PKG/var/log/forgejo ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -70,24 +70,24 @@ cat < $PKG/etc/rc.d/rc.$PRGNAM NAME="Forgejo Daemon" # Command to run -CMD="/usr/bin/gitea" +CMD="/usr/bin/forgejo" # user used to run the daemon -USERNAME=gitea +USERNAME=forgejo # Process name of daemon, for killing it. PROCESSNAME=\$CMD # Option to run with deamon -OPTIONS=" --config /etc/gitea/app.ini" +OPTIONS=" --config /etc/forgejo/app.ini" -PIDFILE=/var/lib/gitea/gitea.pid +PIDFILE=/var/lib/forgejo/forgejo.pid func_stop() { [ -e \$PIDFILE ] && kill \$(cat \$PIDFILE) rm \$PIDFILE - if [ ! "\$(pgrep gitea)" ]; then + if [ ! "\$(pgrep forgejo)" ]; then echo "Error!" else echo "Stopped!" @@ -101,7 +101,7 @@ func_start() { sleep 2 - if [ "\$(pgrep gitea)" ]; then + if [ "\$(pgrep forgejo)" ]; then echo "Started!" else echo "Error!" @@ -109,7 +109,7 @@ func_start() { } func_status() { - if [ "\$(pgrep gitea)" ]; then + if [ "\$(pgrep forgejo)" ]; then echo "Running!" else echo "NOT running!" @@ -158,7 +158,7 @@ $PRGNAM: $PRGNAM: Forgejo is a self-hosted lightweight software forge. $PRGNAM: Easy to install and low maintenance, it just does the job. $PRGNAM: -$PRGNAM: edit /etc/gitea/app.ini +$PRGNAM: edit /etc/forgejo/app.ini $PRGNAM: see https://forgejo.org/docs/latest/admin/config-cheat-sheet/ $PRGNAM: $PRGNAM: From ca258c186248420c6d25af57e83be38185b71b05 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sun, 4 Feb 2024 11:25:03 +0100 Subject: [PATCH 7/7] Finalize migration from gitea to forgejo --- n/forgejo-bin/SlackBuild | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/n/forgejo-bin/SlackBuild b/n/forgejo-bin/SlackBuild index 8749bf16..20a99c1f 100755 --- a/n/forgejo-bin/SlackBuild +++ b/n/forgejo-bin/SlackBuild @@ -75,45 +75,26 @@ CMD="/usr/bin/forgejo" # user used to run the daemon USERNAME=forgejo -# Process name of daemon, for killing it. -PROCESSNAME=\$CMD - # Option to run with deamon OPTIONS=" --config /etc/forgejo/app.ini" -PIDFILE=/var/lib/forgejo/forgejo.pid +func_status() { + pgrep -u \$USERNAME forgejo && echo Running || echo Stopped +} func_stop() { - [ -e \$PIDFILE ] && kill \$(cat \$PIDFILE) - rm \$PIDFILE + pkill -u \$USERNAME forgejo - if [ ! "\$(pgrep forgejo)" ]; then - echo "Error!" - else - echo "Stopped!" - fi + func_status } func_start() { echo -n "Starting \$NAME ... " su - \$USERNAME -c "\$CMD \$OPTIONS" & - echo \$\$ > \$PIDFILE sleep 2 - if [ "\$(pgrep forgejo)" ]; then - echo "Started!" - else - echo "Error!" - fi -} - -func_status() { - if [ "\$(pgrep forgejo)" ]; then - echo "Running!" - else - echo "NOT running!" - fi + func_status }