summaryrefslogtreecommitdiff
path: root/repo/system/sbase.xibuild
diff options
context:
space:
mode:
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
+}