From 0cdf0867d94e184c18a4c51c67d042441dc14cd0 Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Mon, 23 Apr 2018 10:54:37 +0200 Subject: [PATCH 1/3] Add ncdu recipe --- recipes/ncdu/recipe.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 recipes/ncdu/recipe.sh diff --git a/recipes/ncdu/recipe.sh b/recipes/ncdu/recipe.sh new file mode 100644 index 000000000..577518de3 --- /dev/null +++ b/recipes/ncdu/recipe.sh @@ -0,0 +1,33 @@ +VERSION=1.13 +TAR=https://dev.yorhel.nl/download/ncdu-$VERSION.tar.gz +BUILD_DEPENDS=(ncurses) +DEPENDS=(terminfo) + +function recipe_version { + echo "$VERSION" + skip=1 +} +function recipe_update { + echo "skipping update" + skip=1 +} +function recipe_build { + sysroot="$PWD/../sysroot" + export LDFLAGS="-L$sysroot/lib" + export CPPFLAGS="-I$sysroot/include -I$sysroot/include/ncurses" + ./configure \ + --build x86_64-pc-linux-gnu \ + --host "$HOST" + make + skip=1 +} +function recipe_test { + echo "skipping test" + skip=1 +} +function recipe_stage { + dest="$(realpath "$1")" + echo "$dest" + make DESTDIR="$dest" install + skip=1 +} From 6c3bbeb4d2e22a39d9e10f29944b718c782cb337 Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Mon, 23 Apr 2018 11:16:21 +0200 Subject: [PATCH 2/3] Change installation location --- recipes/ncdu/recipe.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/ncdu/recipe.sh b/recipes/ncdu/recipe.sh index 577518de3..d2be33c72 100644 --- a/recipes/ncdu/recipe.sh +++ b/recipes/ncdu/recipe.sh @@ -27,7 +27,13 @@ function recipe_test { } function recipe_stage { dest="$(realpath "$1")" - echo "$dest" make DESTDIR="$dest" install + cd "$dest/usr/local/bin/" + find . -type f -exec install -D "{}" "$dest/usr/bin/{}" \; + cd - + cd "$dest/usr/local/share/" + find . -type f -exec install -D "{}" "$dest/share/{}" \; + cd - + rm -r "$dest/usr/local/" skip=1 } From 16decabc799d48c714ccc46d9322e03501f1b31a Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Mon, 23 Apr 2018 11:41:41 +0200 Subject: [PATCH 3/3] Add recipe_clean function --- recipes/ncdu/recipe.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/ncdu/recipe.sh b/recipes/ncdu/recipe.sh index d2be33c72..46131850c 100644 --- a/recipes/ncdu/recipe.sh +++ b/recipes/ncdu/recipe.sh @@ -25,6 +25,10 @@ function recipe_test { echo "skipping test" skip=1 } +function recipe_clean { + make clean + skip=1 +} function recipe_stage { dest="$(realpath "$1")" make DESTDIR="$dest" install