From e25c78acd793b7eadc64d539452879c160e1ef24 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sun, 29 May 2016 16:31:24 +0200 Subject: [PATCH] Changing the rules for dir_* variables This makes it less readable and clean, but it's necessary for retarded programs misinterpreting double slashes at the beginning. --- astronaut/astronaut.sat | 12 ++++++------ astronaut/hello.sat | 8 +++++++- astronaut/template.sat | 2 +- satellites/3dsfat16tool.sat | 2 +- satellites/bin/palemoon.sat | 22 +++++++++++----------- satellites/bin/unetbootin.sat | 2 +- satellites/ctrtool.sat | 2 +- satellites/libconfig.sat | 2 +- satellites/lua.sat | 2 +- satellites/makerom.sat | 2 +- satellites/markdown.sat | 2 +- satellites/padxorer.sat | 2 +- satellites/vcs/bannertool.sat | 4 ++-- satellites/vcs/ctrtool-git.sat | 2 +- satellites/vcs/makerom-git.sat | 2 +- satellites/webfs.sat | 2 +- 16 files changed, 38 insertions(+), 32 deletions(-) diff --git a/astronaut/astronaut.sat b/astronaut/astronaut.sat index 1d81a10..12d00cd 100644 --- a/astronaut/astronaut.sat +++ b/astronaut/astronaut.sat @@ -9,11 +9,11 @@ extrafile "pacman-astronaut" extrafile "astronautpkg" header_end -install -D "astronaut" "$dir_install/$dir_prefix/bin/astronaut" -install -D "astrohelp" "$dir_install/$dir_prefix/bin/astrohelp" -install -D "freshnaut" "$dir_install/$dir_prefix/bin/freshnaut" -install -D "xbps-astronaut" "$dir_install/$dir_prefix/bin/xbps-astronaut" -install -D "pacman-astronaut" "$dir_install/$dir_prefix/bin/pacman-astronaut" -install -D "astronautpkg" "$dir_install/$dir_prefix/bin/astronautpkg" +install -D "astronaut" "$dir_install$dir_prefix/bin/astronaut" +install -D "astrohelp" "$dir_install$dir_prefix/bin/astrohelp" +install -D "freshnaut" "$dir_install$dir_prefix/bin/freshnaut" +install -D "xbps-astronaut" "$dir_install$dir_prefix/bin/xbps-astronaut" +install -D "pacman-astronaut" "$dir_install$dir_prefix/bin/pacman-astronaut" +install -D "astronautpkg" "$dir_install$dir_prefix/bin/astronautpkg" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/astronaut/hello.sat b/astronaut/hello.sat index 490ec51..abc72ea 100644 --- a/astronaut/hello.sat +++ b/astronaut/hello.sat @@ -36,6 +36,12 @@ vcs_compile=true # Set this to true if it's a vcs package, and we've just downl # - vcs_compile # - options +# General info about the usage of these variables: +# - When chaining any of the dir_* variables, do not separate them by a '/'. +# - There's actually just very 2 possible valid chaining combinations for these: Either $dir_sysroot$dir_prefix, +# or $dir_install$dir_prefix +# - Also do not add a '/' at the beginning if you're starting with a dir_* variable. + # Get them files. # URL [REQUIRED], MD5sum, Custom command download "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \ @@ -87,7 +93,7 @@ option test echo "Test option enabled" # Bangs ("!") negate the operation. make DESTDIR="$dir_install" install -rm "$dir_install/$dir_prefix/share/info/dir" # This file collides with some other packages. +rm "$dir_install$dir_prefix/share/info/dir" # This file collides with some other packages. # Call the function we imported. For more info see the top of the file, and functions/say_hello.sh say_hello diff --git a/astronaut/template.sat b/astronaut/template.sat index 996797a..496e370 100644 --- a/astronaut/template.sat +++ b/astronaut/template.sat @@ -14,6 +14,6 @@ cd "$name-$version" make option !no_check make check make DESTDIR="$dir_install" install -rm "$dir_install/$dir_prefix/share/info/dir" # This file collides with some other packages. +rm "$dir_install$dir_prefix/share/info/dir" # This file collides with some other packages. # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/3dsfat16tool.sat b/satellites/3dsfat16tool.sat index 504a752..c15db38 100644 --- a/satellites/3dsfat16tool.sat +++ b/satellites/3dsfat16tool.sat @@ -8,6 +8,6 @@ header_end cd "$name-$version" cc -O3 "$name.c" -o "$name" -install -Dm755 "$name" "$dir_install/$dir_prefix/bin/$name" +install -Dm755 "$name" "$dir_install$dir_prefix/bin/$name" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/bin/palemoon.sat b/satellites/bin/palemoon.sat index 66b729c..d589622 100644 --- a/satellites/bin/palemoon.sat +++ b/satellites/bin/palemoon.sat @@ -7,18 +7,18 @@ download "http://linux.palemoon.org/files/$version/$name-$version.en-US.linux-x8 extrafile "palemoon.desktop" header_end -mkdir -p "$dir_install/opt" "$dir_install/$dir_prefix/bin" "$dir_install/$dir_prefix/share/applications" \ - "$dir_install/$dir_prefix/share/icons/hicolor/16x16/apps" \ - "$dir_install/$dir_prefix/share/icons/hicolor/32x32/apps" \ - "$dir_install/$dir_prefix/share/icons/hicolor/48x48/apps" \ - "$dir_install/$dir_prefix/share/icons/hicolor/128x128/apps" \ +mkdir -p "$dir_install/opt" "$dir_install$dir_prefix/bin" "$dir_install$dir_prefix/share/applications" \ + "$dir_install$dir_prefix/share/icons/hicolor/16x16/apps" \ + "$dir_install$dir_prefix/share/icons/hicolor/32x32/apps" \ + "$dir_install$dir_prefix/share/icons/hicolor/48x48/apps" \ + "$dir_install$dir_prefix/share/icons/hicolor/128x128/apps" \ extract "$name-$version.en-US.linux-x86_64.tar.bz2" "$dir_install/opt" -ln -s "$dir_sysroot/opt/$name/$name" "$dir_install/$dir_prefix/bin/$name" -ln -s "$dir_sysroot/opt/$name/browser/chrome/icons/default/default16.png" "$dir_install/$dir_prefix/share/icons/hicolor/16x16/apps/$name.png" -ln -s "$dir_sysroot/opt/$name/browser/chrome/icons/default/default32.png" "$dir_install/$dir_prefix/share/icons/hicolor/32x32/apps/$name.png" -ln -s "$dir_sysroot/opt/$name/browser/chrome/icons/default/default48.png" "$dir_install/$dir_prefix/share/icons/hicolor/48x48/apps/$name.png" -ln -s "$dir_sysroot/opt/$name/browser/icons/mozicon128.png" "$dir_install/$dir_prefix/share/icons/hicolor/128x128/apps/$name.png" -cp "palemoon.desktop" "$dir_install/$dir_prefix/share/applications/palemoon.desktop" +ln -s "$dir_sysroot/opt/$name/$name" "$dir_install$dir_prefix/bin/$name" +ln -s "$dir_sysroot/opt/$name/browser/chrome/icons/default/default16.png" "$dir_install$dir_prefix/share/icons/hicolor/16x16/apps/$name.png" +ln -s "$dir_sysroot/opt/$name/browser/chrome/icons/default/default32.png" "$dir_install$dir_prefix/share/icons/hicolor/32x32/apps/$name.png" +ln -s "$dir_sysroot/opt/$name/browser/chrome/icons/default/default48.png" "$dir_install$dir_prefix/share/icons/hicolor/48x48/apps/$name.png" +ln -s "$dir_sysroot/opt/$name/browser/icons/mozicon128.png" "$dir_install$dir_prefix/share/icons/hicolor/128x128/apps/$name.png" +cp "palemoon.desktop" "$dir_install$dir_prefix/share/applications/palemoon.desktop" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/bin/unetbootin.sat b/satellites/bin/unetbootin.sat index f633486..8ec4f11 100644 --- a/satellites/bin/unetbootin.sat +++ b/satellites/bin/unetbootin.sat @@ -6,6 +6,6 @@ dlfile "https://launchpad.net/$name/trunk/$version/+download/$name-linux64-$vers "d5d1cddc144fc64d8291c33ebd4f457b" header_end -install -D $name-linux64-$version.bin "$dir_install/$dir_prefix/bin/$name" +install -D $name-linux64-$version.bin "$dir_install$dir_prefix/bin/$name" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/ctrtool.sat b/satellites/ctrtool.sat index d2881c5..534f277 100644 --- a/satellites/ctrtool.sat +++ b/satellites/ctrtool.sat @@ -9,6 +9,6 @@ header_end cd "$name-$version/ctrtool" make -install -D ctrtool "$dir_install/$dir_prefix/bin/ctrtool" +install -D ctrtool "$dir_install$dir_prefix/bin/ctrtool" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/libconfig.sat b/satellites/libconfig.sat index 0eaf210..5dc0fd4 100644 --- a/satellites/libconfig.sat +++ b/satellites/libconfig.sat @@ -10,6 +10,6 @@ header_end cd "$name-$version" compile_configure -rm "$dir_install/$dir_prefix/share/info/dir" +rm "$dir_install$dir_prefix/share/info/dir" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/lua.sat b/satellites/lua.sat index 2e00afa..4809af2 100644 --- a/satellites/lua.sat +++ b/satellites/lua.sat @@ -9,6 +9,6 @@ header_end cd "$name-$version" make MYLIBS="-lncurses" MYCFLAGS="$CFLAGS" linux option !no_check make test -make INSTALL_TOP="$dir_install/$dir_prefix" install +make INSTALL_TOP="$dir_install$dir_prefix" install # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/makerom.sat b/satellites/makerom.sat index b0bc194..4b69390 100644 --- a/satellites/makerom.sat +++ b/satellites/makerom.sat @@ -9,6 +9,6 @@ header_end cd "$name-$version/makerom" make -install -D makerom "$dir_install/$dir_prefix/bin/makerom" +install -D makerom "$dir_install$dir_prefix/bin/makerom" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/markdown.sat b/satellites/markdown.sat index a25042b..2c3d81c 100644 --- a/satellites/markdown.sat +++ b/satellites/markdown.sat @@ -9,6 +9,6 @@ header_end # TODO: Support other formats, such as zip, with the extract command. extract "${name}_$version.zip" "" \ "unzip -qd {dst} {src}" -install -D "${name}_$version/$name.pl" "$dir_install/$dir_prefix/bin/markdown" +install -D "${name}_$version/$name.pl" "$dir_install$dir_prefix/bin/markdown" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/padxorer.sat b/satellites/padxorer.sat index 61c0d44..22d6317 100644 --- a/satellites/padxorer.sat +++ b/satellites/padxorer.sat @@ -7,6 +7,6 @@ dlfile "http://pastebin.com/raw/$paste" \ header_end cc -x c -O3 "$paste" -o "$name" -install -Dm755 "$name" "$dir_install/$dir_prefix/bin/$name" +install -Dm755 "$name" "$dir_install$dir_prefix/bin/$name" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/vcs/bannertool.sat b/satellites/vcs/bannertool.sat index f184135..7d1337c 100644 --- a/satellites/vcs/bannertool.sat +++ b/satellites/vcs/bannertool.sat @@ -8,8 +8,8 @@ header_end cd "$name" # Fix retarded build system -sed -i -e "s@/usr/local@'$dir_install/$dir_prefix'@g" buildtools/make_base -mkdir -p "$dir_install/$dir_prefix/bin" +sed -i -e "s@/usr/local@'$dir_install$dir_prefix'@g" buildtools/make_base +mkdir -p "$dir_install$dir_prefix/bin" make make install diff --git a/satellites/vcs/ctrtool-git.sat b/satellites/vcs/ctrtool-git.sat index e2678bb..5671332 100644 --- a/satellites/vcs/ctrtool-git.sat +++ b/satellites/vcs/ctrtool-git.sat @@ -7,6 +7,6 @@ header_end cd "$name/ctrtool" make -install -D ctrtool "$dir_install/$dir_prefix/bin/ctrtool" +install -D ctrtool "$dir_install$dir_prefix/bin/ctrtool" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/vcs/makerom-git.sat b/satellites/vcs/makerom-git.sat index e4eb3db..80cbdac 100644 --- a/satellites/vcs/makerom-git.sat +++ b/satellites/vcs/makerom-git.sat @@ -7,6 +7,6 @@ header_end cd "$name/makerom" make -install -D makerom "$dir_install/$dir_prefix/bin/makerom" +install -D makerom "$dir_install$dir_prefix/bin/makerom" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/webfs.sat b/satellites/webfs.sat index 3e3a853..03d5506 100644 --- a/satellites/webfs.sat +++ b/satellites/webfs.sat @@ -14,6 +14,6 @@ sed -i -e "s/echo -e/echo/g" mk/Autoconf.mk sed -i -e "s@/etc/mime.types@/dev/null@g" GNUmakefile make -install -D "${name}d" "$dir_install/$dir_prefix/bin/${name}d" +install -D "${name}d" "$dir_install$dir_prefix/bin/${name}d" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: