diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-05-28 18:55:49 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-28 20:06:47 +0200 |
commit | b7d315319d600cf1a49333082da87b32c5815eeb (patch) | |
tree | afbf71d334df25f5a21582f37f5b76efa0424bf3 /Ports | |
parent | 674be46afd74fd006bb007d1127b171cecb9097d (diff) | |
download | serenity-b7d315319d600cf1a49333082da87b32c5815eeb.zip |
Ports: Add links
Doesn't actually run yet. in_term's read() fails with EFAULT for reasons that
are presently beyond me, points to a bug in Serenity.
Diffstat (limited to 'Ports')
-rwxr-xr-x | Ports/.port_include.sh | 17 | ||||
-rwxr-xr-x | Ports/links/links.sh | 16 |
2 files changed, 33 insertions, 0 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index e020422a18..06bc87fb28 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -41,6 +41,23 @@ function run_fetch_git() { fi } +function run_fetch_web() { + if [ -d "$PORT_DIR" ]; then + run_command_nocd rm -rf "$PORT_DIR" + fi + file=$(basename "$1") + run_command_nocd curl "$1" -o "$file" + mkdir "$PORT_DIR" + + # may need to make strip-components configurable, as I bet some sick person + # out there has an archive that isn't in a directory :shrug: + run_command_nocd tar xavf "$file" -C "$PORT_DIR" --strip-components=1 +} + +function run_export_env() { + export $1="$2" +} + function run_replace_in_file() { run_command perl -p -i -e "$1" $2 } diff --git a/Ports/links/links.sh b/Ports/links/links.sh new file mode 100755 index 0000000000..29a74aac6f --- /dev/null +++ b/Ports/links/links.sh @@ -0,0 +1,16 @@ +#!/bin/sh +PORT_DIR=links +function fetch() { + run_fetch_web "http://links.twibright.com/download/links-2.19.tar.bz2" +} +function configure() { + run_export_env CC i686-pc-serenity-gcc + run_configure_autotools +} +function build() { + run_make +} +function install() { + run_make_install DESTDIR="$SERENITY_ROOT"/Root +} +source ../.port_include.sh |