Browse Source

$prefix -> $dir_prefix, new var: $dir_sysroot

master
mid-kid 9 years ago
parent
commit
a8c3bebd79
  1. 9
      astronaut/astronaut
  2. 5
      astronaut/hello.sat
  3. 2
      astronaut/template.sat
  4. 6
      satellites/astronaut.sat
  5. 4
      satellites/bin/ctrulib.sat
  6. 4
      satellites/bin/default_arm7.sat
  7. 7
      satellites/bin/devkitarm.sat
  8. 2
      satellites/bin/extrafiles/devkitarm/devkitarm.sh
  9. 4
      satellites/bin/libfat-nds.sat
  10. 4
      satellites/bin/libnds.sat
  11. 24
      satellites/bin/palemoon.sat
  12. 2
      satellites/bin/unetbootin.sat
  13. 4
      satellites/functions/compile/cmake.sh
  14. 2
      satellites/functions/compile/python.sh
  15. 2
      satellites/functions/compile/qt.sh
  16. 2
      satellites/markdown.sat
  17. 4
      satellites/vcs/ctr.sat
  18. 4
      satellites/vcs/ctrff.sat
  19. 2
      satellites/vcs/ctrtool.sat
  20. 2
      satellites/vcs/ctrulib-git.sat
  21. 4
      satellites/vcs/letsencrypt.sat
  22. 2
      satellites/vcs/makerom.sat
  23. 4
      satellites/vcs/neovim-git.sat
  24. 2
      satellites/webfs.sat

9
astronaut/astronaut

@ -4,7 +4,8 @@
dir_build="$PWD/build" # Temporary directory to build packages dir_build="$PWD/build" # Temporary directory to build packages
dir_source="$PWD/source" # Directory where the package sources will be placed dir_source="$PWD/source" # Directory where the package sources will be placed
dir_install="$PWD/install" # Directory where the package will be installed dir_install="$PWD/install" # Directory where the package will be installed
prefix="/usr" # Prefix directory dir_sysroot="/" # The root dir (Used for dirs like etc and var)
dir_prefix="$dir_sysroot/usr" # Prefix directory
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
enable_check=true # Run the test suite of packages enable_check=true # Run the test suite of packages
@ -30,6 +31,7 @@ Usage: $0 [-sbip <dir>] [-IcCd] <satellite>
-s Set source directory -s Set source directory
-i Set install directory -i Set install directory
-p Set prefix directory -p Set prefix directory
-r Set root directory
-I Nuke install directory before build -I Nuke install directory before build
-c/C Enable/Disable package checking -c/C Enable/Disable package checking
-d Only download package files -d Only download package files
@ -62,7 +64,10 @@ while getopts "h?s:b:i:p:IcCdv" opt; do
dir_install="$(realpath "$OPTARG")" dir_install="$(realpath "$OPTARG")"
;; ;;
p) p)
prefix="$(realpath "$OPTARG")" dir_prefix="$(realpath "$OPTARG")"
;;
r)
dir_sysroot="$(realpath "$OPTARG")"
;; ;;
I) I)
_nuke_dir_install=true _nuke_dir_install=true

5
astronaut/hello.sat

@ -17,7 +17,8 @@ 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
# - prefix # - dir_prefix
# - dir_sysroot
# "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
@ -60,7 +61,7 @@ extract "$name-$version.tar.gz" \
# Compilation instructions # Compilation instructions
cd "$name-$version" cd "$name-$version"
./configure --prefix="$prefix" ./configure --prefix="$dir_prefix"
make make
# Know if the user wants the package to be checked # Know if the user wants the package to be checked

2
astronaut/template.sat

@ -10,7 +10,7 @@ header_end
cd "$name-$version" cd "$name-$version"
./configure --prefix="$prefix" ./configure --prefix="$dir_prefix"
make make
do_check make check do_check make check
make DESTDIR="$dir_install" install make DESTDIR="$dir_install" install

6
satellites/astronaut.sat

@ -6,8 +6,8 @@ extrafile "freshnaut"
extrafile "xbps-astronaut" extrafile "xbps-astronaut"
header_end header_end
install -D "astronaut" "$dir_install/$prefix/bin/astronaut" install -D "astronaut" "$dir_install/$dir_prefix/bin/astronaut"
install -D "freshnaut" "$dir_install/$prefix/bin/freshnaut" install -D "freshnaut" "$dir_install/$dir_prefix/bin/freshnaut"
install -D "xbps-astronaut" "$dir_install/$prefix/bin/xbps-astronaut" install -D "xbps-astronaut" "$dir_install/$dir_prefix/bin/xbps-astronaut"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

4
satellites/bin/ctrulib.sat

@ -7,7 +7,7 @@ download "https://sourceforge.net/projects/devkitpro/files/$libname/$version/$li
"2dffb7826ae3d30a32c9ad773b133a07" "2dffb7826ae3d30a32c9ad773b133a07"
header_end header_end
mkdir -p "$dir_install/opt/devkitPRO/$libname" mkdir -p "$dir_install/$dir_sysroot/opt/devkitPRO/$libname"
extract "$libname-$version.tar.bz2" "$dir_install/opt/devkitPRO/$libname" extract "$libname-$version.tar.bz2" "$dir_install/$dir_sysroot/opt/devkitPRO/$libname"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

4
satellites/bin/default_arm7.sat

@ -7,7 +7,7 @@ download "https://sourceforge.net/projects/devkitpro/files/default arm7/$version
"20e3af0f65066cad9a2b948aa5cfd17f" "20e3af0f65066cad9a2b948aa5cfd17f"
header_end header_end
mkdir -p "$dir_install/opt/devkitPRO/$libname" mkdir -p "$dir_install/$dir_sysroot/opt/devkitPRO/$libname"
extract "$name-$version.tar.bz2" "$dir_install/opt/devkitPRO/$libname" extract "$name-$version.tar.bz2" "$dir_install/$dir_sysroot/opt/devkitPRO/$libname"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

7
satellites/bin/devkitarm.sat

@ -7,8 +7,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_sysroot/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_sysroot/opt/devkitPRO"
install -Dm644 devkitarm.sh "$dir_install/etc/profile.d/devkitarm.sh" sed -i -e "s@%SYSROOT%@$dir_sysroot@g" devkitarm.sh
install -Dm644 devkitarm.sh "$dir_install/$dir_sysroot/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=/opt/devkitPRO export DEVKITPRO="%SYSROOT%/opt/devkitPRO"
export DEVKITARM="$DEVKITPRO/devkitARM" export DEVKITARM="$DEVKITPRO/devkitARM"
export PATH="$DEVKITARM/bin:$PATH" export PATH="$DEVKITARM/bin:$PATH"

4
satellites/bin/libfat-nds.sat

@ -7,7 +7,7 @@ download "https://sourceforge.net/projects/devkitpro/files/libfat/$version/$name
"cc1712a56c8b0c133974936c69599f0e" "cc1712a56c8b0c133974936c69599f0e"
header_end header_end
mkdir -p "$dir_install/opt/devkitPRO/$libname" mkdir -p "$dir_install/$dir_sysroot/opt/devkitPRO/$libname"
extract "$name-$version.tar.bz2" "$dir_install/opt/devkitPRO/$libname" extract "$name-$version.tar.bz2" "$dir_install/$dir_sysroot/opt/devkitPRO/$libname"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

4
satellites/bin/libnds.sat

@ -6,7 +6,7 @@ download "https://sourceforge.net/projects/devkitpro/files/$name/$version/$name-
"5928642ff152cf692d8e7167d0e1332b" "5928642ff152cf692d8e7167d0e1332b"
header_end header_end
mkdir -p "$dir_install/opt/devkitPRO/$name" mkdir -p "$dir_install/$dir_sysroot/opt/devkitPRO/$name"
extract "$name-$version.tar.bz2" "$dir_install/opt/devkitPRO/$name" extract "$name-$version.tar.bz2" "$dir_install/$dir_sysroot/opt/devkitPRO/$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

24
satellites/bin/palemoon.sat

@ -7,18 +7,18 @@ download "https://linux.palemoon.org/files/$version/$name-$version.en-US.linux-x
extrafile "palemoon.desktop" extrafile "palemoon.desktop"
header_end header_end
mkdir -p "$dir_install/opt" "$dir_install/$prefix/bin" "$dir_install/$prefix/share/applications" \ mkdir -p "$dir_install/$dir_sysroot/opt" "$dir_install/$dir_prefix/bin" "$dir_install/$dir_prefix/share/applications" \
"$dir_install/$prefix/share/icons/hicolor/16x16/apps" \ "$dir_install/$dir_prefix/share/icons/hicolor/16x16/apps" \
"$dir_install/$prefix/share/icons/hicolor/32x32/apps" \ "$dir_install/$dir_prefix/share/icons/hicolor/32x32/apps" \
"$dir_install/$prefix/share/icons/hicolor/48x48/apps" \ "$dir_install/$dir_prefix/share/icons/hicolor/48x48/apps" \
"$dir_install/$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_sysroot/opt"
ln -s "/opt/$name/$name" "$dir_install/$prefix/bin/$name" ln -s "$dir_sysroot/opt/$name/$name" "$dir_install/$dir_prefix/bin/$name"
ln -s "/opt/$name/browser/chrome/icons/default/default16.png" "$dir_install/$prefix/share/icons/hicolor/16x16/apps/$name.png" 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 "/opt/$name/browser/chrome/icons/default/default32.png" "$dir_install/$prefix/share/icons/hicolor/32x32/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 "/opt/$name/browser/chrome/icons/default/default48.png" "$dir_install/$prefix/share/icons/hicolor/48x48/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 "/opt/$name/browser/icons/mozicon128.png" "$dir_install/$prefix/share/icons/hicolor/128x128/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/$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/$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:

4
satellites/functions/compile/cmake.sh

@ -1,6 +1,6 @@
compile_cmake_base() { compile_cmake_base() {
mkdir -p build; cd build mkdir -p build; cd build
cmake -DCMAKE_INSTALL_PREFIX="$prefix" -DCMAKE_BUILD_TYPE=Release $@ .. cmake -DCMAKE_INSTALL_PREFIX="$dir_prefix" -DCMAKE_BUILD_TYPE=Release $@ ..
make make
} }
@ -12,5 +12,5 @@ compile_cmake() {
compile_cmake_installbin() { compile_cmake_installbin() {
_func_file="$1"; shift _func_file="$1"; shift
compile_cmake_base $@ compile_cmake_base $@
install -D "$_func_file" "$dir_install/$prefix/bin/$_func_file" install -D "$_func_file" "$dir_install/$dir_prefix/bin/$_func_file"
} }

2
satellites/functions/compile/python.sh

@ -1,4 +1,4 @@
compile_python() { compile_python() {
_func_ver="$1"; shift _func_ver="$1"; shift
python$_func_ver setup.py install --prefix="$prefix" --root="$dir_install" $@ python$_func_ver setup.py install --prefix="$dir_prefix" --root="$dir_install" $@
} }

2
satellites/functions/compile/qt.sh

@ -1,6 +1,6 @@
compile_qt() { compile_qt() {
_func_ver="$1"; shift _func_ver="$1"; shift
qmake-qt$_func_ver PREFIX="$prefix" build_mode=release build_type=shared $@ qmake-qt$_func_ver PREFIX="$dir_prefix" build_mode=release build_type=shared $@
make make
make INSTALL_ROOT="$dir_install" install make INSTALL_ROOT="$dir_install" install
} }

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/$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:

4
satellites/vcs/ctr.sat

@ -7,7 +7,7 @@ header_end
getfile vcs; cd vcs getfile vcs; cd vcs
mkdir -p "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/include" "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/lib" mkdir -p "$dir_install/$dir_sysroot/opt/devkitPRO/devkitARM/arm-none-eabi/include" "$dir_install/$dir_sysroot/opt/devkitPRO/devkitARM/arm-none-eabi/lib"
make DEVKITARM="$dir_install/opt/devkitPRO/devkitARM" install make DEVKITARM="$dir_install/$dir_sysroot/opt/devkitPRO/devkitARM" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

4
satellites/vcs/ctrff.sat

@ -7,7 +7,7 @@ header_end
getfile vcs; cd vcs getfile vcs; cd vcs
mkdir -p "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/include" "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/lib" mkdir -p "$dir_install/$dir_sysroot/opt/devkitPRO/devkitARM/arm-none-eabi/include" "$dir_install/$dir_sysroot/opt/devkitPRO/devkitARM/arm-none-eabi/lib"
make DEVKITARM="$dir_install/opt/devkitPRO/devkitARM" install make DEVKITARM="$dir_install/$dir_sysroot/opt/devkitPRO/devkitARM" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/vcs/ctrtool.sat

@ -8,6 +8,6 @@ header_end
getfile vcs; cd vcs/ctrtool getfile vcs; cd vcs/ctrtool
make make
install -D ctrtool "$dir_install/$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/ctrulib-git.sat

@ -7,6 +7,6 @@ header_end
getfile vcs; cd vcs/libctru getfile vcs; cd vcs/libctru
make DEVKITPRO="$dir_install/opt/devkitPRO" install make DEVKITPRO="$dir_install/$dir_sysroot/opt/devkitPRO" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

4
satellites/vcs/letsencrypt.sat

@ -7,6 +7,8 @@ vcs_git "https://github.com/letsencrypt/$name"
header_end header_end
getfile vcs; cd vcs getfile vcs; cd vcs
compile_python 3.4 compile_python 2
cd acme
compile_python 2
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/vcs/makerom.sat

@ -8,6 +8,6 @@ header_end
getfile vcs; cd vcs/makerom getfile vcs; cd vcs/makerom
make make
install -D makerom "$dir_install/$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:

4
satellites/vcs/neovim-git.sat

@ -6,8 +6,8 @@ name=neovim
vcs_git "https://github.com/neovim/neovim" vcs_git "https://github.com/neovim/neovim"
header_end header_end
getfile vcs; cd vcs etfile vcs; cd vcs
make CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX='$prefix'" make CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX='$dir_prefix'"
make DESTDIR="$dir_install" install make DESTDIR="$dir_install" install
# 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/$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