From c89a46ad0bcd342da3dbdcf4706f924d94d827fc Mon Sep 17 00:00:00 2001 From: DTB Date: Sat, 25 Nov 2023 12:54:18 -0700 Subject: [PATCH] improvements and more stuffs --- soft/android-udev-rules | 5 ++--- soft/audacious-theme-sailor-moon-gang | 6 +++--- soft/bar | 3 +-- soft/bspwm | 3 +-- soft/cmatrix | 1 - soft/git-filter-repo | 3 +-- soft/macchanger | 14 ++++++++++++++ soft/nmap | 19 +++++++++++++++++++ soft/rofi | 20 ++++++++++++++++++++ soft/scrot | 17 +++++++++++++++++ soft/soft | 27 +++++++++++++++++++++------ soft/unrar | 11 +++++++++++ soft/unscii-16-full-ttf | 7 +++++++ soft/wiringpi | 16 ++++++++++++++++ soft/xdo | 8 ++++++++ 15 files changed, 141 insertions(+), 19 deletions(-) create mode 100644 soft/macchanger create mode 100644 soft/nmap create mode 100644 soft/rofi create mode 100644 soft/scrot create mode 100644 soft/unrar create mode 100644 soft/unscii-16-full-ttf create mode 100644 soft/wiringpi create mode 100644 soft/xdo diff --git a/soft/android-udev-rules b/soft/android-udev-rules index fe1292c..7f2ad0e 100644 --- a/soft/android-udev-rules +++ b/soft/android-udev-rules @@ -3,13 +3,12 @@ NAME=android-udev-rules VERSION=nightly UPSTREAM=https://github.com/M0Rf30/android-udev-rules.git -UPSTREAM_TYPE=git . soft # rather than requiring user to be in `adbusers`, just use group wheel -sed -i .orig -e s.adbusers.wheel.g "$PREFIX"/src/android-udev-rules/51-android.rules +sed -i .orig -e s.adbusers.wheel.g "$SRC"/51-android.rules mkdir -p /etc/udev/rules.d -cp "$PREFIX"/src/android-udev-rules/51-android.rules /etc/udev/rules.d/51-android.rules +cp "$SRC"/51-android.rules /etc/udev/rules.d/51-android.rules chmod a+r /etc/udev/rules.d/51-android.rules soft_advise '#' udevadm control --reload-rules diff --git a/soft/audacious-theme-sailor-moon-gang b/soft/audacious-theme-sailor-moon-gang index e2ffd7b..c6d1981 100644 --- a/soft/audacious-theme-sailor-moon-gang +++ b/soft/audacious-theme-sailor-moon-gang @@ -6,6 +6,6 @@ UPSTREAM=https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Ga UPSTREAM_TYPE=https . soft -mkdir -p "$PREFIX/share/audacious/Skins" -ln -s "$PREFIX/src/$NAME/Sailor_Moon_Gang.wsz" \ - "$PREFIX/share/audacious/Skins/Sailor_Moon_Gang.wsz" +mkdir -p "$SHARE/audacious/Skins" +ln -s "$SRC"/Sailor_Moon_Gang.wsz \ + "$SHARE/audacious/Skins/Sailor_Moon_Gang.wsz" diff --git a/soft/bar b/soft/bar index 89ca9bf..8e0b191 100644 --- a/soft/bar +++ b/soft/bar @@ -3,7 +3,6 @@ NAME=bar VERSION=nightly UPSTREAM=https://github.com/LemonBoy/bar.git -UPSTREAM_TYPE=git . soft -$GMAKE -C "$PREFIX/src/$NAME" PREFIX="$PREFIX" install +$GMAKE -C "$SRC" PREFIX="$PREFIX" install diff --git a/soft/bspwm b/soft/bspwm index 1ff346c..35cc3c1 100644 --- a/soft/bspwm +++ b/soft/bspwm @@ -3,7 +3,6 @@ NAME=bspwm VERSION=nightly UPSTREAM=https://github.com/baskerville/bspwm.git -UPSTREAM_TYPE=git . soft # depends on @@ -15,4 +14,4 @@ UPSTREAM_TYPE=git # xcb-util-keysyms-devel # xcb-util-wm-devel -$GMAKE -C "$PREFIX/src/NAME" install +$GMAKE -C "$SRC" install diff --git a/soft/cmatrix b/soft/cmatrix index 6523703..7e5a072 100644 --- a/soft/cmatrix +++ b/soft/cmatrix @@ -3,7 +3,6 @@ NAME=cmatrix VERSION=nightly UPSTREAM=https://github.com/abishekvashok/cmatrix.git -UPSTREAM_TYPE=git . soft # depends on: diff --git a/soft/git-filter-repo b/soft/git-filter-repo index d316908..cc5e37d 100644 --- a/soft/git-filter-repo +++ b/soft/git-filter-repo @@ -3,6 +3,5 @@ NAME=git-filter-repo VERSION=nightly UPSTREAM=https://github.com/newren/git-filter-repo.git -UPSTREAM_TYPE=git -ln -s "$PREFIX/src/$NAME/git-filter-repo" "$PREFIX/bin/git-filter-repo" +ln -s "$SRC/git-filter-repo" "$BIN/git-filter-repo" diff --git a/soft/macchanger b/soft/macchanger new file mode 100644 index 0000000..780ab10 --- /dev/null +++ b/soft/macchanger @@ -0,0 +1,14 @@ +#!/bin/sh + +NAME=macchanger +VERSION=nightly +UPSTREAM=https://github.com/alobbs/macchanger.git +. soft + +# depends on +# texinfo + +sh -c 'cd "$SRC"; ./autogen.sh --prefix="$PREFIX"' +# https://github.com/alobbs/macchanger/issues/14 +sed -i .orig -e 's/caddr_t/void */' "$SRC"/src/netinfo.c +$GMAKE -C "$SRC" install diff --git a/soft/nmap b/soft/nmap new file mode 100644 index 0000000..361e677 --- /dev/null +++ b/soft/nmap @@ -0,0 +1,19 @@ +#!/bin/sh + +NAME=nmap +VERSION=7.80 +UPSTREAM=https://nmap.org/dist/nmap-7.80.tar.bz2 +UPSTREAM_TYPE=custom +get_upstream(){ + curl "$UPSTREAM" | bzip2 -cd | tar x -C "$PREFIX/src" + mv "$PREFIX/src/nmap-7.80" "$SRC" +} +. soft + +# nmap 7.80 is the last Free nmap release +# depends on linux-headers +# had to # ln -s /bin/gmake "$PREFIX"/make +# with clang 16.0.6 aarch75-chimera-linux-musl, cannot compile (4 errors?) + +sh -c 'cd "$SRC"; ./configure --prefix="$PREFIX"' +$GMAKE -C "$SRC" diff --git a/soft/rofi b/soft/rofi new file mode 100644 index 0000000..bfaa1a7 --- /dev/null +++ b/soft/rofi @@ -0,0 +1,20 @@ +#!/bin/sh + +NAME=rofi +VERSION=nightly +UPSTREAM=https://davatorium/rofi.git + +# depends on +# bison +# cairo-devel +# flex +# gdk-pixbuf-devel +# glib-devel +# libxkbcommon-devel +# pango-devel +# pkgconf +# meson +# startup-notification-devel +# xcb-util-cursor-devel +sh -c 'cd "$SRC"; meson setup build' +ninja -C "$SRC"/build install diff --git a/soft/scrot b/soft/scrot new file mode 100644 index 0000000..a9e0550 --- /dev/null +++ b/soft/scrot @@ -0,0 +1,17 @@ +#!/bin/sh + +NAME=scrot +VERSION=nightly +UPSTREAM=https://github.com/resurrecting-open-source-projects/scrot.git +. soft + +# depends on +# autoconf +# autoconf-archive +# imlib2-devel +# libxcomposite-devel +# libxfixes-devel + +sh -c 'cd "$SRC"; ./autogen.sh' +sh -c 'cd "$SRC"; ./configure MAKE="$MAKE" PREFIX="$PREFIX"' +$MAKE -C "$SRC" install diff --git a/soft/soft b/soft/soft index eb66b3d..4485b46 100644 --- a/soft/soft +++ b/soft/soft @@ -5,13 +5,28 @@ set -e GMAKE=gmake PREFIX=/usr/local +BIN="$PREFIX/bin" +SHARE="$PREFIX"/share +FONTS="$SHARE"/fonts +SRC="$PREFIX/src/$NAME" + case "$UPSTREAM_TYPE" in -https) mkdir -p "$PREFIX/src/$NAME" - curl -O "$UPSTREAM" --output-dir "$PREFIX/src/$NAME" ;; -git) git pull "$UPSTREAM" "$PREFIX/src/$NAME" ;; -*) ! printf '%s: %s: %s: Unknown upstream type\n' \ - soft "$NAME" "$UPSTREAM_TYPE" >&2 ;; -esac +custom) ;; +*) get_upstream(){ + case "$UPSTREAM_TYPE" in + custom) ;; + http*) mkdir -p "$SRC" + curl -O "$UPSTREAM" --output-dir "$SRC" ;; + git) git pull "$UPSTREAM" "$SRC" ;; + *) case "$UPSTREAM" in + git:*) UPSTREAM_TYPE=git; get_upstream ;; + *.git) UPSTREAM_TYPE=git; get_upstream ;; + *) ! printf '%s: %s: %s: Unknown upstream type\n'\ + soft "$NAME" "$UPSTREAM_TYPE" >&2 ;; + esac + esac + } ;; +esac; get_upstream soft_advise(){ printf "\ diff --git a/soft/unrar b/soft/unrar new file mode 100644 index 0000000..886cda3 --- /dev/null +++ b/soft/unrar @@ -0,0 +1,11 @@ +#!/bin/sh + +NAME=unrar +VERSION=nightly +UPSTREAM=https://github.com/pmachapman/unrar.git +. soft + +# depends on +# g++ +$MAKE -C "$SRC" +ln -s "$SRC/$NAME" "$BIN/$NAME" diff --git a/soft/unscii-16-full-ttf b/soft/unscii-16-full-ttf new file mode 100644 index 0000000..cf8c00c --- /dev/null +++ b/soft/unscii-16-full-ttf @@ -0,0 +1,7 @@ +NAME=unscii-16-full-ttf +VERSION=nightly +UPSTREAM=http://viznut.fi/unscii/unscii-16-full.ttf +UPSTREAM_TYPE=http +. soft + +ln -s "$SRC"/unscii-16-full.ttf "$FONTS"/unscii-16-full.ttf diff --git a/soft/wiringpi b/soft/wiringpi new file mode 100644 index 0000000..d81f59f --- /dev/null +++ b/soft/wiringpi @@ -0,0 +1,16 @@ +#!/bin/sh + +NAME=wiringpi +VERSION=nightly +UPSTREAM=https://github.com/WiringPi/WiringPi.git +. soft + +# I tried final_official_2.50 but it wouldn't build +# (ld: error: duplicate symbol: comDat) +# depends on +# sudo + +git -C "$SRC" checkout 2.61-1 +sed -i .orig -e /^sudo/d "$SRC"/build +sed -i .orig -e s/root\.root/root\:root/ "$SRC"/gpio +sh -c 'cd "SRC"; sudo=sudo ./build' diff --git a/soft/xdo b/soft/xdo new file mode 100644 index 0000000..f98b268 --- /dev/null +++ b/soft/xdo @@ -0,0 +1,8 @@ +#!/bin/sh + +NAME=xdo +VERSION=nightly +UPSTREAM=https://github.com/baskerville/xdo.git +. soft + +$GMAKE -C "$SRC" install