Skip to content

Commit

Permalink
Ports: sl (SerenityOS#1802)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivoah committed Apr 15, 2020
1 parent e639c5b commit d09bea5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Ports/sl/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash ../.port_include.sh
port=sl
version=git
workdir=sl-master
files="https://github.com/mtoyoda/sl/archive/master.tar.gz sl-git.tar.gz"
depends="ncurses"

build() {
run ${CC} -I${SERENITY_ROOT}/Root/usr/local/include/ncurses -L${SERENITY_ROOT}/Root/usr/local/lib -o sl sl.c -lncurses -ltinfo
}

post_install() {
# Dirty hack that seems to be necessary to make ncurses play nice
mkdir -p ${SERENITY_ROOT}/Root/usr/local/share/terminfo/x
cp ${SERENITY_ROOT}/Root/usr/local/share/terminfo/78/xterm ${SERENITY_ROOT}/Root/usr/local/share/terminfo/x/
}
14 changes: 14 additions & 0 deletions Ports/sl/patches/serenity-changes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/Makefile b/Makefile
index c3005d2..e071fc9 100644
--- a/Makefile
+++ b/Makefile
@@ -18,3 +18,9 @@ clean:
rm -f sl

distclean: clean
+
+install: all
+ mkdir -p ${DESTDIR}/usr/bin
+ install sl ${DESTDIR}/usr/bin/sl
+ mkdir -p ${DESTDIR}/usr/share/man/man1
+ gzip -9 -c < sl.1 > ${DESTDIR}/usr/share/man/man1/sl.1.gz

0 comments on commit d09bea5

Please sign in to comment.