summaryrefslogtreecommitdiff
path: root/repo/system/sbase.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-03-02 16:24:16 +0000
committerdavidovski <david@davidovski.xyz>2022-03-02 16:24:16 +0000
commit6b3593e13e688d558be05846d1e2d9acf6e97c71 (patch)
tree6e0cdcd42b5d5aef366ac5d066da856e82c9a649 /repo/system/sbase.xibuild
parente8213fac46bfcb8068a883cb88b2bb1587f190f9 (diff)
added s6 init
Diffstat (limited to 'repo/system/sbase.xibuild')
-rw-r--r--repo/system/sbase.xibuild36
1 files changed, 36 insertions, 0 deletions
diff --git a/repo/system/sbase.xibuild b/repo/system/sbase.xibuild
new file mode 100644
index 0000000..03e8f86
--- /dev/null
+++ b/repo/system/sbase.xibuild
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+MAKEDEPS="make "
+DEPS="musl acl attr gmp"
+
+SOURCE=https://git.suckless.org/sbase
+
+DESC="sbase from suckless.org"
+
+prepare () {
+ # add uname -o since some packages need it
+
+ sed -i "39i case 'o':" uname.c
+ sed -i "40i sflag = 1;" uname.c
+ sed -i "41i break;" uname.c
+}
+
+build () {
+ make
+}
+
+package () {
+ make PREFIX=/usr DESTDIR=$PKG_DEST install
+
+ for p in tar sed find; do
+ rm $PKG_DEST/usr/bin/$p
+ rm $PKG_DEST/usr/share/man/man1/$p.1
+ done
+
+ # quick and dirty realpath replacement
+ realpath=$PKG_DEST/usr/bin/realpath
+
+ echo '#!/bin/bash' > $realpath
+ echo '[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"' >> $realpath
+ chmod +x $realpath
+}