Browse Source

Add dir_preprefix

Reverted the separator for dir_* variables change, due to it's stupidity
master
mid-kid 9 years ago
parent
commit
e3f777af18
  1. 24
      astronaut/astronaut
  2. 12
      astronaut/astronaut.sat
  3. 11
      astronaut/hello.sat
  4. 2
      astronaut/template.sat
  5. 2
      satellites/3dsfat16tool.sat
  6. 1
      satellites/astronaut.sat
  7. 19
      satellites/astronaut.sat
  8. 8
      satellites/bin/devkitarm.sat
  9. 2
      satellites/bin/extrafiles/devkitarm/devkitarm.sh
  10. 24
      satellites/bin/palemoon.sat
  11. 2
      satellites/bin/unetbootin.sat
  12. 2
      satellites/ctrtool.sat
  13. 2
      satellites/libconfig.sat
  14. 2
      satellites/lua.sat
  15. 2
      satellites/makerom.sat
  16. 2
      satellites/markdown.sat
  17. 2
      satellites/padxorer.sat
  18. 4
      satellites/vcs/bannertool.sat
  19. 2
      satellites/vcs/ctrtool-git.sat
  20. 2
      satellites/vcs/makerom-git.sat
  21. 2
      satellites/webfs.sat

24
astronaut/astronaut

@ -4,8 +4,9 @@
dir_build="/tmp/astronaut/build" # Temporary directory to build packages dir_build="/tmp/astronaut/build" # Temporary directory to build packages
dir_source="/tmp/astronaut/source" # Directory where the package sources will be placed dir_source="/tmp/astronaut/source" # Directory where the package sources will be placed
dir_install="/tmp/astronaut/install" # Directory where the package will be installed dir_install="/tmp/astronaut/install" # Directory where the package will be installed
dir_sysroot="" # The root dir (The directory programs will look in and symlinks will point to) dir_sysroot="" # The directory to look for libraries for the target system
dir_prefix="/usr" # Prefix directory dir_preprefix="/" # Upper prefix directory (for /etc, /opt and such. Don't ask me why people decided to put them in a different dir. It's pretty retarded.)
dir_prefix="/usr" # Prefix directory (for /bin, /lib, /share and such)
cmd_download="curl -# -L -o {dst} {src}" # Command to execute to download files cmd_download="curl -# -L -o {dst} {src}" # Command to execute to download files
cmd_extract="tar -x -C {dst} -f {src}" # Command to execute to extract files cmd_extract="tar -x -C {dst} -f {src}" # Command to execute to extract files
unset dir_satellites # Directory where the satellite files are placed. unset dir_satellites # Directory where the satellite files are placed.
@ -29,9 +30,10 @@ Usage: $0 [-sbipr <dir>] [-Id] [-o <options>] <satellite>
-b Set build directory [WARNING: Will be deleted before build] -b Set build directory [WARNING: Will be deleted before build]
-s Set source directory -s Set source directory
-i Set install directory -i Set install directory
-p Set prefix directory
-r Set root directory -r Set root directory
-I Nuke install directory before build -e Set pre-prefix directory
-p Set prefix directory
-I Nuke install directory before build [WARNING: You will not be prompted]
-d Only download package files -d Only download package files
-v Only build vcs package if any updates have been made to it -v Only build vcs package if any updates have been made to it
-o Set package options (comma-separated)" -o Set package options (comma-separated)"
@ -47,7 +49,7 @@ _exiterr() {
} }
# Gather info # Gather info
while getopts "h?s:b:i:p:r:IcCdvo:" opt; do while getopts "h?s:b:i:r:e:p:IcCdvo:" opt; do
case "$opt" in case "$opt" in
h|\?) h|\?)
_show_help _show_help
@ -62,12 +64,15 @@ while getopts "h?s:b:i:p:r:IcCdvo:" opt; do
i) i)
dir_install="$OPTARG" dir_install="$OPTARG"
;; ;;
p)
dir_prefix="$OPTARG"
;;
r) r)
dir_sysroot="$OPTARG" dir_sysroot="$OPTARG"
;; ;;
e)
dir_preprefix="$OPTARG"
;;
p)
dir_prefix="$OPTARG"
;;
I) I)
_nuke_dir_install=true _nuke_dir_install=true
;; ;;
@ -91,6 +96,9 @@ if [ ! "$1" ]; then
exit 1 exit 1
fi fi
# Modify some variables
dir_prefix="$dir_preprefix/$dir_prefix"
# Tools for the astronaut # Tools for the astronaut
_mksum() { _mksum() {
echo "$(md5sum "$@" 2> /dev/null | cut -d' ' -f1)" echo "$(md5sum "$@" 2> /dev/null | cut -d' ' -f1)"

12
astronaut/astronaut.sat

@ -9,11 +9,11 @@ extrafile "pacman-astronaut"
extrafile "astronautpkg" extrafile "astronautpkg"
header_end header_end
install -D "astronaut" "$dir_install$dir_prefix/bin/astronaut" install -D "astronaut" "$dir_install/$dir_prefix/bin/astronaut"
install -D "astrohelp" "$dir_install$dir_prefix/bin/astrohelp" install -D "astrohelp" "$dir_install/$dir_prefix/bin/astrohelp"
install -D "freshnaut" "$dir_install$dir_prefix/bin/freshnaut" install -D "freshnaut" "$dir_install/$dir_prefix/bin/freshnaut"
install -D "xbps-astronaut" "$dir_install$dir_prefix/bin/xbps-astronaut" install -D "xbps-astronaut" "$dir_install/$dir_prefix/bin/xbps-astronaut"
install -D "pacman-astronaut" "$dir_install$dir_prefix/bin/pacman-astronaut" install -D "pacman-astronaut" "$dir_install/$dir_prefix/bin/pacman-astronaut"
install -D "astronautpkg" "$dir_install$dir_prefix/bin/astronautpkg" install -D "astronautpkg" "$dir_install/$dir_prefix/bin/astronautpkg"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

11
astronaut/hello.sat

@ -27,8 +27,9 @@ vcs_compile=true # Set this to true if it's a vcs package, and we've just downl
# - dir_source (This is handled by the commands detailed below. You should have no use for it.) # - dir_source (This is handled by the commands detailed below. You should have no use for it.)
# "Look, but don't touch"-variables: # "Look, but don't touch"-variables:
# - dir_install # - dir_install
# - dir_prefix
# - dir_sysroot # - dir_sysroot
# - dir_preprefix
# - dir_prefix
# "You'll only make your own life more difficult if you use them wrong, so I don't care what you do"-variables: # "You'll only make your own life more difficult if you use them wrong, so I don't care what you do"-variables:
# (Only use these to change the behaviour of some commands over the whole script.) # (Only use these to change the behaviour of some commands over the whole script.)
# - cmd_download # - cmd_download
@ -36,12 +37,6 @@ vcs_compile=true # Set this to true if it's a vcs package, and we've just downl
# - vcs_compile # - vcs_compile
# - options # - 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. # Get them files.
# URL [REQUIRED], MD5sum, Custom command # URL [REQUIRED], MD5sum, Custom command
download "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \ download "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
@ -93,7 +88,7 @@ option test echo "Test option enabled"
# Bangs ("!") negate the operation. # Bangs ("!") negate the operation.
make DESTDIR="$dir_install" install 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 # Call the function we imported. For more info see the top of the file, and functions/say_hello.sh
say_hello say_hello

2
astronaut/template.sat

@ -14,6 +14,6 @@ cd "$name-$version"
make make
option !no_check make check option !no_check make check
make DESTDIR="$dir_install" install 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/3dsfat16tool.sat

@ -8,6 +8,6 @@ header_end
cd "$name-$version" cd "$name-$version"
cc -O3 "$name.c" -o "$name" 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

1
satellites/astronaut.sat

@ -1 +0,0 @@
../astronaut/astronaut.sat

19
satellites/astronaut.sat

@ -0,0 +1,19 @@
name=astronaut
version=$(date +%Y%m%d)
extrafile "astronaut"
extrafile "astrohelp"
extrafile "freshnaut"
extrafile "xbps-astronaut"
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"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

8
satellites/bin/devkitarm.sat

@ -8,9 +8,9 @@ download "https://sourceforge.net/projects/devkitpro/files/$name/${name}_$versio
extrafile "devkitarm.sh" extrafile "devkitarm.sh"
header_end header_end
mkdir -p "$dir_install/opt/devkitPRO" mkdir -p "$dir_install/$dir_preprefix/opt/devkitPRO"
extract "${name}_$version-x86_64-linux.tar.bz2" "$dir_install/opt/devkitPRO" extract "${name}_$version-x86_64-linux.tar.bz2" "$dir_install/$dir_preprefix/opt/devkitPRO"
sed -i -e "s@%SYSROOT%@$dir_sysroot@g" devkitarm.sh sed -i -e "s@%PREFIX%@$dir_preprefix@g" devkitarm.sh
install -Dm644 devkitarm.sh "$dir_install/etc/profile.d/devkitarm.sh" install -Dm644 devkitarm.sh "$dir_install/$dir_preprefix/etc/profile.d/devkitarm.sh"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/bin/extrafiles/devkitarm/devkitarm.sh

@ -1,3 +1,3 @@
export DEVKITPRO="%SYSROOT%/opt/devkitPRO" export DEVKITPRO="%PREFIX%/opt/devkitPRO"
export DEVKITARM="$DEVKITPRO/devkitARM" export DEVKITARM="$DEVKITPRO/devkitARM"
export PATH="$DEVKITARM/bin:$PATH" export PATH="$DEVKITARM/bin:$PATH"

24
satellites/bin/palemoon.sat

@ -7,18 +7,18 @@ download "http://linux.palemoon.org/files/$version/$name-$version.en-US.linux-x8
extrafile "palemoon.desktop" extrafile "palemoon.desktop"
header_end header_end
mkdir -p "$dir_install/opt" "$dir_install$dir_prefix/bin" "$dir_install$dir_prefix/share/applications" \ mkdir -p "$dir_install/$dir_preprefix/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/16x16/apps" \
"$dir_install$dir_prefix/share/icons/hicolor/32x32/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/48x48/apps" \
"$dir_install$dir_prefix/share/icons/hicolor/128x128/apps" \ "$dir_install/$dir_prefix/share/icons/hicolor/128x128/apps" \
extract "$name-$version.en-US.linux-x86_64.tar.bz2" "$dir_install/opt" extract "$name-$version.en-US.linux-x86_64.tar.bz2" "$dir_install/$dir_preprefix/opt"
ln -s "$dir_sysroot/opt/$name/$name" "$dir_install$dir_prefix/bin/$name" ln -s "$dir_preprefix/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_preprefix/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_preprefix/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_preprefix/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" ln -s "$dir_preprefix/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" cp "palemoon.desktop" "$dir_install/$dir_prefix/share/applications/palemoon.desktop"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/bin/unetbootin.sat

@ -6,6 +6,6 @@ dlfile "https://launchpad.net/$name/trunk/$version/+download/$name-linux64-$vers
"d5d1cddc144fc64d8291c33ebd4f457b" "d5d1cddc144fc64d8291c33ebd4f457b"
header_end 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/ctrtool.sat

@ -9,6 +9,6 @@ header_end
cd "$name-$version/ctrtool" cd "$name-$version/ctrtool"
make 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/libconfig.sat

@ -10,6 +10,6 @@ header_end
cd "$name-$version" cd "$name-$version"
compile_configure 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/lua.sat

@ -9,6 +9,6 @@ header_end
cd "$name-$version" cd "$name-$version"
make MYLIBS="-lncurses" MYCFLAGS="$CFLAGS" linux make MYLIBS="-lncurses" MYCFLAGS="$CFLAGS" linux
option !no_check make test 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/makerom.sat

@ -9,6 +9,6 @@ header_end
cd "$name-$version/makerom" cd "$name-$version/makerom"
make 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/markdown.sat

@ -9,6 +9,6 @@ header_end
# TODO: Support other formats, such as zip, with the extract command. # TODO: Support other formats, such as zip, with the extract command.
extract "${name}_$version.zip" "" \ extract "${name}_$version.zip" "" \
"unzip -qd {dst} {src}" "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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/padxorer.sat

@ -7,6 +7,6 @@ dlfile "http://pastebin.com/raw/$paste" \
header_end header_end
cc -x c -O3 "$paste" -o "$name" 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

4
satellites/vcs/bannertool.sat

@ -8,8 +8,8 @@ header_end
cd "$name" cd "$name"
# Fix retarded build system # Fix retarded build system
sed -i -e "s@/usr/local@'$dir_install$dir_prefix'@g" buildtools/make_base sed -i -e "s@/usr/local@'$dir_install/$dir_prefix'@g" buildtools/make_base
mkdir -p "$dir_install$dir_prefix/bin" mkdir -p "$dir_install/$dir_prefix/bin"
make make
make install make install

2
satellites/vcs/ctrtool-git.sat

@ -7,6 +7,6 @@ header_end
cd "$name/ctrtool" cd "$name/ctrtool"
make 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/vcs/makerom-git.sat

@ -7,6 +7,6 @@ header_end
cd "$name/makerom" cd "$name/makerom"
make 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
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 sed -i -e "s@/etc/mime.types@/dev/null@g" GNUmakefile
make 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: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

Loading…
Cancel
Save