This commit is contained in:
Noah Rosamilia 2020-04-15 02:46:11 -04:00 committed by GitHub
parent e639c5bc25
commit d09bea5beb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

16
Ports/sl/package.sh Executable file
View file

@ -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/
}

View file

@ -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