diff --git a/astronaut/astronaut b/astronaut/astronaut index 0b9f636..62be10b 100755 --- a/astronaut/astronaut +++ b/astronaut/astronaut @@ -63,6 +63,7 @@ _download_only=false _vcs_only=false vcs_compile=false unset _user_options # Options specified in the command line get the highest priority +unset _sat_options # Options defined by the satellite #_nuke_dir_install (This can be set from wrappers) # Should be specified in the satellite @@ -211,10 +212,9 @@ option() { local negate=false local variable=false case "$check" in - *=*) + =*) local variable=true - local default="$(echo "$check" | cut -d '=' -f 2)" - local check="$(echo "$check" | cut -d '=' -f 1)" + local check="$(echo "$check" | cut -c 2-)" ;; !*) local negate=true @@ -223,34 +223,44 @@ option() { esac local enabled=false + local found=false local opt local IFS=',' for option in $options; do local option_negate=false + local option_variable=false case "$option" in *=*) local value="$(echo "$option" | cut -d '=' -f 2)" local option="$(echo "$option" | cut -d '=' -f 1)" + local option_variable=true ;; !*) local option="$(echo "$option" | cut -c 2-)" local option_negate=true + ;; esac if [ "$option" = "$check" ]; then + if [ "$variable" = true -a "$option_variable" = false ]; then + _msg 'Tip: Define the option as option=value.' + _exiterr "Satellite requested a variable option, but there was no value for option: '$option'." + fi + [ "$option_negate" = true ] && local enabled=false || local enabled=true + local found=true break fi done + if [ "$found" = false ]; then + _msg 'Tip: Make sure to define every option you use in the satellite.' + _exiterr "Option '$check' was nowhere to be found." + fi + if [ "$variable" = true ]; then - if [ "$enabled" = true ]; then - echo "$value" - return - else - echo "$default" - return - fi + echo "$value" + return fi if [ "$negate" = true ]; then @@ -267,6 +277,11 @@ option() { fi } +define_option() { + local option="$(echo "$1" | cut -d ':' -f 1)" + options="$options,$option" +} + import() { . "$(dirname "$_satellite")/functions/$1.sh" } @@ -311,7 +326,7 @@ fi _satellite="$(realpath "$_satellite")" -# Build the definitive options list +# Build the definitive options list (not including the options defined in the satellite) options="$_user_options$(package_options "$_satname"),$options" # Create the directories diff --git a/astronaut/astronaut.sat b/astronaut/astronaut.sat index 319c3ad..2c3e24d 100644 --- a/astronaut/astronaut.sat +++ b/astronaut/astronaut.sat @@ -1,29 +1,34 @@ name=astronaut version=$(date +%Y%m%d) -extrafile "astronaut" +define_option '!helpers: Enable installation of helper scripts' +define_option '!xbps: Enable installation of the xbps-astronaut wrapper' +define_option '!pacman: Enable installation of the pacman-astronaut wrapper' +define_option '!pkgtools: Enable installation of the astronautpkg wrapper' + +extrafile 'astronaut' if option helpers; then - extrafile "astrohelp" - extrafile "freshnaut" + extrafile 'astrohelp' + extrafile 'freshnaut' fi -option xbps extrafile "xbps-astronaut" -option pacman extrafile "pacman-astronaut" -option pkgtools extrafile "astronautpkg" +option xbps extrafile 'xbps-astronaut' +option pacman extrafile 'pacman-astronaut' +option pkgtools extrafile 'astronautpkg' header_end -install -D "astronaut" "$dir_install/$dir_prefix/bin/astronaut" +install -D 'astronaut' "$dir_install/$dir_prefix/bin/astronaut" # Optional helper tools if option helpers; then - install -D "astrohelp" "$dir_install/$dir_prefix/bin/astrohelp" - install -D "freshnaut" "$dir_install/$dir_prefix/bin/freshnaut" + install -D 'astrohelp' "$dir_install/$dir_prefix/bin/astrohelp" + install -D 'freshnaut' "$dir_install/$dir_prefix/bin/freshnaut" fi # Wrappers for specific package managers -option xbps install -D "xbps-astronaut" "$dir_install/$dir_prefix/bin/xbps-astronaut" -option pacman install -D "pacman-astronaut" "$dir_install/$dir_prefix/bin/pacman-astronaut" -option pkgtools install -D "astronautpkg" "$dir_install/$dir_prefix/bin/astronautpkg" +option xbps install -D 'xbps-astronaut' "$dir_install/$dir_prefix/bin/xbps-astronaut" +option pacman install -D 'pacman-astronaut' "$dir_install/$dir_prefix/bin/pacman-astronaut" +option pkgtools install -D 'astronautpkg' "$dir_install/$dir_prefix/bin/astronautpkg" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/astronaut/examples/functions/say_hello.sh b/astronaut/examples/functions/say_hello.sh index 82ede6d..179d33f 100644 --- a/astronaut/examples/functions/say_hello.sh +++ b/astronaut/examples/functions/say_hello.sh @@ -2,6 +2,6 @@ # You define a function here, and it becomes available in any script that imports it. say_hello() { - local tmp="Hello, there!" + local tmp='Hello, there!' echo "Function ran! $tmp" } diff --git a/astronaut/examples/hello.sat b/astronaut/examples/hello.sat index 4cd9131..e7f1574 100644 --- a/astronaut/examples/hello.sat +++ b/astronaut/examples/hello.sat @@ -16,9 +16,15 @@ update_names="$name-$version.tar.gz" # Specify what the lines containing the ve # as another program will look for any different versions on the same page. # You may not need to set this, in which case the program will try to guess it from the download commands. -vcs_compile=true # Set this to true if it's a vcs package, and we've just downloaded an update for it. This is meant to be used in functions/header_end hooks, and has to be set before header_end is called (or by a header_end hook). +vcs_compile=true # Set this to true if it's a vcs package, and we've just downloaded an update for it. This is meant to be used in functions, and has to be set before header_end is called. -# Please note that setting the above info from an imported script is supported, as long as it's done in the header. +# Define options used in this satellite. +define_option '!check: Enable the testsuite.' # Due to the '!' at the start, check is false by default. +define_option 'test=Default value' # It is also allowed to provide no description +# You should define every option used in your satellite. +# See lower for info on how to use these options. + +# Please note that setting the above info in an imported script is supported, as long as it's done in the header. # Astronaut will generally prefix internal variables with "_". There are, however, a few exceptions. # Some of those you can touch, some not. @@ -61,35 +67,33 @@ header_end # End of the header. # - dlfile # - extrafile # - import +# - define_option # getfile and extract are technically allowed, but not encouraged. # Basically, do not use anything that touches dir_build or dir_install or does anything other than fetching the required files. # The same rule above applies for imported commands. # Name [REQUIRED], Destination, Custom command extract "$name-$version.tar.gz" \ - "." \ - "tar xvfC {src} {dst}" + '.' \ + 'tar xvfC {src} {dst}' # Copy some file you downloaded over to the build directory. #getfile "Waffles.txt" # Compilation instructions cd "$name-$version" -./configure --prefix="$dir_prefix" +./configure --prefix="/$dir_prefix" make # Know if the user wants the package to be checked # Check if an option is disabled -if option !no_check; then +if option check; then make check fi # Abbreviation of the above -option test echo "Test option enabled" +#option check make check # Bangs ("!") negate the operation. -#option !test echo "Test option disabled" - -# Options with arguments. -echo "Value of option test2 = $(option "test2=default value")" +#option !check echo "The package wasn't checked" make DESTDIR="$dir_install" install rm "$dir_install/$dir_prefix/share/info/dir" # This file collides with some other packages. @@ -97,8 +101,11 @@ rm "$dir_install/$dir_prefix/share/info/dir" # This file collides with some oth # Call the function we imported. For more info see the top of the file, and functions/say_hello.sh say_hello +# Options with values. +echo "Value of option test = $(option =test)" + # Misc functions: #safe_sed 'oh/i/hope\i\canuse%&thisinsed' -# Escapes all the necessary characters to be able to use it in a regular sed command +# Escapes all the necessary characters to be able to use an arbitrary string in a regular sed command # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/astronaut/examples/template.sat b/astronaut/template.sat similarity index 80% rename from astronaut/examples/template.sat rename to astronaut/template.sat index 37f4d65..65b1b67 100644 --- a/astronaut/examples/template.sat +++ b/astronaut/template.sat @@ -4,15 +4,17 @@ name=hello version=2.10 update_url="https://ftp.gnu.org/gnu/$name/" +define_option '!check: Enable the testsuite.' + dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \ "6cd0ffea3884a4e79330338dcc2987d6" header_end cd "$name-$version" -./configure --prefix="$dir_prefix" +./configure --prefix="/$dir_prefix" make -option !no_check make check +option check make check make DESTDIR="$dir_install" install rm -f "$dir_install/$dir_prefix/share/info/dir" # This file collides with some other packages. diff --git a/satellites/3dsfat16tool.sat b/graveyard/unmaintained_satellites/3dsfat16tool.sat similarity index 87% rename from satellites/3dsfat16tool.sat rename to graveyard/unmaintained_satellites/3dsfat16tool.sat index 504a752..c20467b 100644 --- a/satellites/3dsfat16tool.sat +++ b/graveyard/unmaintained_satellites/3dsfat16tool.sat @@ -3,7 +3,8 @@ version=3.2 update_url="https://github.com/d0k3/$name/releases" update_names="v$version.tar.gz" -dlextract "https://github.com/d0k3/$name/archive/v$version.tar.gz" +dlextract "https://github.com/d0k3/$name/archive/v$version.tar.gz" \ + 'c4a2a0d4e8eed7b882ea090ccdb2e929' header_end cd "$name-$version" diff --git a/satellites/bin/ctrulib.sat b/graveyard/unmaintained_satellites/bin/ctrulib.sat similarity index 100% rename from satellites/bin/ctrulib.sat rename to graveyard/unmaintained_satellites/bin/ctrulib.sat diff --git a/satellites/bin/default_arm7.sat b/graveyard/unmaintained_satellites/bin/default_arm7.sat similarity index 100% rename from satellites/bin/default_arm7.sat rename to graveyard/unmaintained_satellites/bin/default_arm7.sat diff --git a/satellites/bin/devkitarm.sat b/graveyard/unmaintained_satellites/bin/devkitarm.sat similarity index 100% rename from satellites/bin/devkitarm.sat rename to graveyard/unmaintained_satellites/bin/devkitarm.sat diff --git a/satellites/bin/extrafiles/devkitarm/devkitarm.sh b/graveyard/unmaintained_satellites/bin/extrafiles/devkitarm/devkitarm.sh similarity index 100% rename from satellites/bin/extrafiles/devkitarm/devkitarm.sh rename to graveyard/unmaintained_satellites/bin/extrafiles/devkitarm/devkitarm.sh diff --git a/satellites/bin/extrafiles/palemoon/palemoon.desktop b/graveyard/unmaintained_satellites/bin/extrafiles/palemoon/palemoon.desktop similarity index 100% rename from satellites/bin/extrafiles/palemoon/palemoon.desktop rename to graveyard/unmaintained_satellites/bin/extrafiles/palemoon/palemoon.desktop diff --git a/satellites/bin/libfat-nds.sat b/graveyard/unmaintained_satellites/bin/libfat-nds.sat similarity index 100% rename from satellites/bin/libfat-nds.sat rename to graveyard/unmaintained_satellites/bin/libfat-nds.sat diff --git a/satellites/bin/libnds.sat b/graveyard/unmaintained_satellites/bin/libnds.sat similarity index 100% rename from satellites/bin/libnds.sat rename to graveyard/unmaintained_satellites/bin/libnds.sat diff --git a/satellites/bin/palemoon.sat b/graveyard/unmaintained_satellites/bin/palemoon.sat similarity index 100% rename from satellites/bin/palemoon.sat rename to graveyard/unmaintained_satellites/bin/palemoon.sat diff --git a/satellites/bin/unetbootin.sat b/graveyard/unmaintained_satellites/bin/unetbootin.sat similarity index 100% rename from satellites/bin/unetbootin.sat rename to graveyard/unmaintained_satellites/bin/unetbootin.sat diff --git a/satellites/broadcom-wl.sat b/graveyard/unmaintained_satellites/broadcom-wl.sat similarity index 51% rename from satellites/broadcom-wl.sat rename to graveyard/unmaintained_satellites/broadcom-wl.sat index f4778f5..dd8ab69 100644 --- a/satellites/broadcom-wl.sat +++ b/graveyard/unmaintained_satellites/broadcom-wl.sat @@ -2,21 +2,28 @@ name=broadcom-wl version=6_30_223_271 update_url="https://aur.archlinux.org/packages/$name-dkms/" +define_option "kver=$(uname -r): The kernel version we're building for." + dlextract "http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-$version.tar.gz" \ - "115903050c41d466161784d4c843f4f9" + '115903050c41d466161784d4c843f4f9' dlfile "https://aur.archlinux.org/cgit/aur.git/plain/$name-dkms.conf?h=$name-dkms" \ - "b6e8ae4cf217bf68dcf08599bf43fce4" + 'b6e8ae4cf217bf68dcf08599bf43fce4' dlfile "https://aur.archlinux.org/cgit/aur.git/plain/001-null-pointer-fix.patch?h=$name-dkms" \ - "fabbf528164f5e3a9dcf46f46a678f86" + 'fabbf528164f5e3a9dcf46f46a678f86' dlfile "https://aur.archlinux.org/cgit/aur.git/plain/002-rdtscl.patch?h=$name-dkms" \ - "76c168a0271cb57d2539a10877979fbd" + '76c168a0271cb57d2539a10877979fbd' +dlfile "https://aur.archlinux.org/cgit/aur.git/plain/003-linux47.patch?h=$name-dkms" \ + 'c5074307a37698b11780237beb8f52b2' header_end -sed -i -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" src/wl/sys/wl_linux.c +kver="$(option =kver)" + +sed -i -e '/BRCM_WLAN_IFNAME/s:eth:wlan:' src/wl/sys/wl_linux.c patch -p1 -i 001-null-pointer-fix.patch patch -p1 -i 002-rdtscl.patch -make KBUILD_DIR="$dir_sysroot/lib/modules/$(uname -r)/build" -install -Dm 644 "wl.ko" "$dir_install/lib/modules/$(uname -r)/kernel/drivers/net/wireless/wl.ko" +patch -p1 -i 003-linux47.patch +make KBUILD_DIR="$dir_sysroot/lib/modules/$kver/build" +install -Dm 644 "wl.ko" "$dir_install/lib/modules/$kver/kernel/drivers/net/wireless/wl.ko" install -Dm 644 "$name-dkms.conf" "$dir_install/etc/modprobe.d/$name.conf" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/ctrtool.sat b/graveyard/unmaintained_satellites/ctrtool.sat similarity index 88% rename from satellites/ctrtool.sat rename to graveyard/unmaintained_satellites/ctrtool.sat index d2881c5..52e186d 100644 --- a/satellites/ctrtool.sat +++ b/graveyard/unmaintained_satellites/ctrtool.sat @@ -4,7 +4,7 @@ update_url="https://github.com/profi200/$name/releases" update_names="archive/$version.tar.gz" dlextract "https://github.com/profi200/$name/archive/$version.tar.gz" \ - "ff68864fade3dd822850180076a08357" + 'ff68864fade3dd822850180076a08357' header_end cd "$name-$version/ctrtool" diff --git a/satellites/heimdall.sat b/graveyard/unmaintained_satellites/heimdall.sat similarity index 81% rename from satellites/heimdall.sat rename to graveyard/unmaintained_satellites/heimdall.sat index a374340..7abccf8 100644 --- a/satellites/heimdall.sat +++ b/graveyard/unmaintained_satellites/heimdall.sat @@ -1,11 +1,11 @@ -import "compile/configure" +import 'compile/configure' name=Heimdall version=1.4.1 update_url="https://github.com/Benjamin-Dobell/$name/releases" dlextract "https://github.com/Benjamin-Dobell/$name/archive/v$version.tar.gz" \ - "22c911e9042f5ed8fd90cbeeb9589015" + '22c911e9042f5ed8fd90cbeeb9589015' header_end cd "$name-$version/libpit" diff --git a/satellites/include-what-you-use.sat b/graveyard/unmaintained_satellites/include-what-you-use.sat similarity index 83% rename from satellites/include-what-you-use.sat rename to graveyard/unmaintained_satellites/include-what-you-use.sat index 0d6ab10..cd1ece6 100644 --- a/satellites/include-what-you-use.sat +++ b/graveyard/unmaintained_satellites/include-what-you-use.sat @@ -1,11 +1,11 @@ -import "compile/cmake" +import 'compile/cmake' name=include-what-you-use version=0.6 update_url="http://include-what-you-use.org/downloads/" dlextract "http://include-what-you-use.org/downloads/$name-$version.src.tar.gz" \ - "e4dffc7c2396f0e3f2b7499c077325b5" + 'e4dffc7c2396f0e3f2b7499c077325b5' header_end cd "$name" diff --git a/satellites/libconfig.sat b/graveyard/unmaintained_satellites/libconfig.sat similarity index 100% rename from satellites/libconfig.sat rename to graveyard/unmaintained_satellites/libconfig.sat diff --git a/satellites/makerom.sat b/graveyard/unmaintained_satellites/makerom.sat similarity index 100% rename from satellites/makerom.sat rename to graveyard/unmaintained_satellites/makerom.sat diff --git a/satellites/markdown.sat b/graveyard/unmaintained_satellites/markdown.sat similarity index 100% rename from satellites/markdown.sat rename to graveyard/unmaintained_satellites/markdown.sat diff --git a/satellites/minitube.sat b/graveyard/unmaintained_satellites/minitube.sat similarity index 100% rename from satellites/minitube.sat rename to graveyard/unmaintained_satellites/minitube.sat diff --git a/satellites/padxorer.sat b/graveyard/unmaintained_satellites/padxorer.sat similarity index 100% rename from satellites/padxorer.sat rename to graveyard/unmaintained_satellites/padxorer.sat diff --git a/satellites/pdnsd.sat b/graveyard/unmaintained_satellites/pdnsd.sat similarity index 100% rename from satellites/pdnsd.sat rename to graveyard/unmaintained_satellites/pdnsd.sat diff --git a/satellites/python3.5-crc16.sat b/graveyard/unmaintained_satellites/python3.5-crc16.sat similarity index 100% rename from satellites/python3.5-crc16.sat rename to graveyard/unmaintained_satellites/python3.5-crc16.sat diff --git a/satellites/python3.5-websocket-client.sat b/graveyard/unmaintained_satellites/python3.5-websocket-client.sat similarity index 100% rename from satellites/python3.5-websocket-client.sat rename to graveyard/unmaintained_satellites/python3.5-websocket-client.sat diff --git a/satellites/pyyaml.sat b/graveyard/unmaintained_satellites/pyyaml.sat similarity index 100% rename from satellites/pyyaml.sat rename to graveyard/unmaintained_satellites/pyyaml.sat diff --git a/satellites/qwbfsmanager.sat b/graveyard/unmaintained_satellites/qwbfsmanager.sat similarity index 100% rename from satellites/qwbfsmanager.sat rename to graveyard/unmaintained_satellites/qwbfsmanager.sat diff --git a/satellites/rxvt-unicode.sat b/graveyard/unmaintained_satellites/rxvt-unicode.sat similarity index 100% rename from satellites/rxvt-unicode.sat rename to graveyard/unmaintained_satellites/rxvt-unicode.sat diff --git a/satellites/speedtest-cli.sat b/graveyard/unmaintained_satellites/speedtest-cli.sat similarity index 100% rename from satellites/speedtest-cli.sat rename to graveyard/unmaintained_satellites/speedtest-cli.sat diff --git a/satellites/vcs/armips.sat b/graveyard/unmaintained_satellites/vcs/armips.sat similarity index 100% rename from satellites/vcs/armips.sat rename to graveyard/unmaintained_satellites/vcs/armips.sat diff --git a/satellites/vcs/bannertool.sat b/graveyard/unmaintained_satellites/vcs/bannertool.sat similarity index 100% rename from satellites/vcs/bannertool.sat rename to graveyard/unmaintained_satellites/vcs/bannertool.sat diff --git a/satellites/vcs/compton.sat b/graveyard/unmaintained_satellites/vcs/compton.sat similarity index 100% rename from satellites/vcs/compton.sat rename to graveyard/unmaintained_satellites/vcs/compton.sat diff --git a/satellites/vcs/ctr.sat b/graveyard/unmaintained_satellites/vcs/ctr.sat similarity index 100% rename from satellites/vcs/ctr.sat rename to graveyard/unmaintained_satellites/vcs/ctr.sat diff --git a/satellites/vcs/ctrff.sat b/graveyard/unmaintained_satellites/vcs/ctrff.sat similarity index 100% rename from satellites/vcs/ctrff.sat rename to graveyard/unmaintained_satellites/vcs/ctrff.sat diff --git a/satellites/vcs/ctrtool-git.sat b/graveyard/unmaintained_satellites/vcs/ctrtool-git.sat similarity index 100% rename from satellites/vcs/ctrtool-git.sat rename to graveyard/unmaintained_satellites/vcs/ctrtool-git.sat diff --git a/satellites/vcs/ctrulib-git.sat b/graveyard/unmaintained_satellites/vcs/ctrulib-git.sat similarity index 100% rename from satellites/vcs/ctrulib-git.sat rename to graveyard/unmaintained_satellites/vcs/ctrulib-git.sat diff --git a/satellites/vcs/makerom-git.sat b/graveyard/unmaintained_satellites/vcs/makerom-git.sat similarity index 100% rename from satellites/vcs/makerom-git.sat rename to graveyard/unmaintained_satellites/vcs/makerom-git.sat diff --git a/satellites/vcs/radare2-git.sat b/graveyard/unmaintained_satellites/vcs/radare2-git.sat similarity index 100% rename from satellites/vcs/radare2-git.sat rename to graveyard/unmaintained_satellites/vcs/radare2-git.sat diff --git a/satellites/vcs/sockfile.sat b/graveyard/unmaintained_satellites/vcs/sockfile.sat similarity index 100% rename from satellites/vcs/sockfile.sat rename to graveyard/unmaintained_satellites/vcs/sockfile.sat diff --git a/satellites/vcs/spasm-ng-git.sat b/graveyard/unmaintained_satellites/vcs/spasm-ng-git.sat similarity index 100% rename from satellites/vcs/spasm-ng-git.sat rename to graveyard/unmaintained_satellites/vcs/spasm-ng-git.sat diff --git a/satellites/webfs.sat b/graveyard/unmaintained_satellites/webfs.sat similarity index 100% rename from satellites/webfs.sat rename to graveyard/unmaintained_satellites/webfs.sat diff --git a/satellites/fakeroot.sat b/satellites/fakeroot.sat index faf2a01..36596a7 100644 --- a/satellites/fakeroot.sat +++ b/satellites/fakeroot.sat @@ -1,20 +1,18 @@ -import "compile/configure" - -# TODO: Can't get 1.21 to install properly +import 'compile/configure' name=fakeroot -#version=1.21 -version=1.20.2 +version=1.21 update_url="http://http.debian.net/debian/pool/main/f/$name/" -#dlextract "http://http.debian.net/debian/pool/main/f/$name/${name}_$version.orig.tar.gz" \ - #"be5c9a0e516869fca4a6758105968e5a" -dlextract "http://http.debian.net/debian/pool/main/f/$name/${name}_$version.orig.tar.bz2" \ - "a4b4564a75024aa96c86e4d1017ac786" +dlextract "http://http.debian.net/debian/pool/main/f/$name/${name}_$version.orig.tar.gz" \ + 'be5c9a0e516869fca4a6758105968e5a' header_end -cd "$name-$version" -#./bootstrap +cd "$name-$version/doc" +po4a -k 0 --rm-backups --variable 'srcdir=../doc/' po4a/po4a.cfg +cd .. + +./bootstrap compile_configure --disable-static # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/functions/compile/configure.sh b/satellites/functions/compile/configure.sh index 0071168..61f3f8d 100644 --- a/satellites/functions/compile/configure.sh +++ b/satellites/functions/compile/configure.sh @@ -2,15 +2,15 @@ compile_configure() { ./configure \ --prefix="/$dir_prefix" \ --sysconfdir="/$dir_sysconfdir" \ - --bindir="$dir_prefix/$dir_bindir" \ - --sbindir="$dir_prefix/$dir_sbindir" \ - --libdir="$dir_prefix/$dir_libdir" \ - --libexecdir="$dir_prefix/$dir_libexecdir" \ - --datadir="$dir_prefix/$dir_datadir" \ - --mandir="$dir_prefix/$dir_mandir" \ - --docdir="$dir_prefix/$dir_docdir/$name" \ - --infodir="$dir_prefix/$dir_infodir" \ - --localedir="$dir_prefix/$dir_localedir" \ + --bindir="/$dir_prefix/$dir_bindir" \ + --sbindir="/$dir_prefix/$dir_sbindir" \ + --libdir="/$dir_prefix/$dir_libdir" \ + --libexecdir="/$dir_prefix/$dir_libexecdir" \ + --datadir="/$dir_prefix/$dir_datadir" \ + --mandir="/$dir_prefix/$dir_mandir" \ + --docdir="/$dir_prefix/$dir_docdir/$name" \ + --infodir="/$dir_prefix/$dir_infodir" \ + --localedir="/$dir_prefix/$dir_localedir" \ $@ make make DESTDIR="$dir_install/" install diff --git a/satellites/functions/compile/qt5source.sh b/satellites/functions/compile/qt5source.sh new file mode 100644 index 0000000..98cb88b --- /dev/null +++ b/satellites/functions/compile/qt5source.sh @@ -0,0 +1,15 @@ +compile_qt5source() { + ./configure -v -confirm-license -opensource \ + -prefix "/$dir_prefix" \ + -libdir "/$dir_prefix/$dir_libdir" \ + -headerdir "/$dir_prefix/include/qt5" \ + -sysconfdir "/$dir_sysconfdir/xdg" \ + -datadir "/$dir_prefix/$dir_datadir/qt5" \ + -bindir "/$dir_prefix/$dir_libdir/qt5/bin" \ + -archdatadir "/$dir_prefix/$dir_libdir/qt5" \ + -docdir "/$dir_prefix/$dir_docdir/qt5" \ + -examplesdir "/$dir_prefix/$dir_docdir/qt5/examples" \ + $@ + make + make INSTALL_ROOT="$dir_install" install +} diff --git a/satellites/libxkbcommon.sat b/satellites/libxkbcommon.sat new file mode 100644 index 0000000..5197a6b --- /dev/null +++ b/satellites/libxkbcommon.sat @@ -0,0 +1,14 @@ +import 'compile/configure' + +name=libxkbcommon +version=0.6.1 +update_url='http://xkbcommon.org/' + +dlextract "http://xkbcommon.org/download/$name-$version.tar.xz" \ + '67a8f322b5fa32352272e811bb90dd73' +header_end + +cd "$name-$version" +compile_configure --disable-static + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/lua.sat b/satellites/lua.sat index cd695d9..95cf4fd 100644 --- a/satellites/lua.sat +++ b/satellites/lua.sat @@ -1,3 +1,5 @@ +# TODO: Install shared library, remove static library. + name=lua majver=5.3 version=$majver.3 diff --git a/satellites/nxengine.sat b/satellites/nxengine.sat index 6c73ce3..495b3a3 100644 --- a/satellites/nxengine.sat +++ b/satellites/nxengine.sat @@ -1,21 +1,24 @@ name=nxengine version=1006 -update_url="http://nxengine.sourceforge.net/" +update_url='http://nxengine.sourceforge.net/' + +define_option 'dir_runtime=$HOME/.nxengine: The directory used to store the nxengine configuration and save files.' +define_option 'console_key=`: The key used to access the debug console.' dlextract "http://nxengine.sourceforge.net/dl/nx-src-$version.tar.bz2" \ - "cc0d1f5608bba70df86a6f5a3b4dd3bd" + 'cc0d1f5608bba70df86a6f5a3b4dd3bd' download "http://www.cavestory.org/downloads/cavestoryen.zip" \ - "5aad47f1cb72185d6e7f4c8c392f6b6e" + '5aad47f1cb72185d6e7f4c8c392f6b6e' -extrafile "nxengine.sh" -extrafile "nxengine.desktop" -extrafile "nxengine.png" +extrafile 'nxengine.sh' +extrafile 'nxengine.desktop' +extrafile 'nxengine.png' header_end -extract "cavestoryen.zip" '' "unzip -qd {dst} {src}" +extract 'cavestoryen.zip' '' 'unzip -qd {dst} {src}' # Some keyboards don't have an accessible backtick. -console_key="$(safe_sed $(option console_key=\`))" +console_key="$(safe_sed $(option =console_key))" sed -i -e "s/\`/$console_key/" nx/input.cpp sed -i -e "s/\`/$console_key/" nx/console.cpp @@ -35,7 +38,7 @@ cp -r CaveStory/data "$dir_install/$dir_prefix/share/nxengine/data" # Install the run script # Where the files will be copied to on runtime. -dir_runtime="$(option dir_runtime=\$HOME/.nxengine)" +dir_runtime="$(option =dir_runtime)" sed -i -e "s/%PREFIX%/$(safe_sed "$dir_prefix")/" \ -e "s/%RUNTIME%/$(safe_sed "$dir_runtime")/" \ -e "s/%LIBDIR%/$(safe_sed "$dir_libdir")/" \ diff --git a/satellites/qt5-base.sat b/satellites/qt5-base.sat new file mode 100644 index 0000000..1b1f46c --- /dev/null +++ b/satellites/qt5-base.sat @@ -0,0 +1,42 @@ +import 'compile/qt5source' + +name=qt5 +majver=5.7 +version=$majver.0 + +optional_libraries='libpng libjpeg doubleconversion freetype harfbuzz' +for opt in $optional_libraries; do + define_option "$opt: Enable support for $opt." +done + +dlextract "http://download.qt.io/official_releases/qt/$majver/$version/submodules/qtbase-opensource-src-$version.tar.xz" \ + '184f9460b40752d71b15b827260580c2' +header_end + +cd "qtbase-opensource-src-$version" + +# Build using custom CFLAGS, CXXFLAGS and LDFLAGS (Shamelessly stolen from ArchLinux) +sed -i -e "s/^\(QMAKE_CFLAGS_RELEASE.*\)/\1 $(safe_sed "$CFLAGS")/" mkspecs/common/gcc-base.conf +sed -i -e "s/^\(QMAKE_CXXFLAGS_RELEASE.*\)/\1 $(safe_sed "$CXXFLAGS")/" mkspecs/common/gcc-base.conf +sed -i -e "s/^\(QMAKE_LFLAGS_RELEASE.*\)/\1 $(safe_sed "$LDFLAGS")/" mkspecs/common/g++-unix.conf + +optional="" +for opt in $optional_libraries; do + option $opt && optional="$optional -system-$opt" || optional="$optional -no-$opt" +done + +echo "$optional" + +# Make sure all the possible libraries are linked from the OS, as Qt might use it's own if they aren't available. +compile_qt5source \ + -system-sqlite \ + -system-zlib \ + -system-pcre \ + -system-xcb \ + -system-xkbcommon-x11 \ + -openssl-linked \ + -dbus-linked \ + -nomake examples \ + $optional + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/vcs/functions b/satellites/vcs/functions deleted file mode 120000 index c0b5bcc..0000000 --- a/satellites/vcs/functions +++ /dev/null @@ -1 +0,0 @@ -../functions \ No newline at end of file diff --git a/satellites/volumeicon.sat b/satellites/volumeicon.sat index 28b33f5..d695ed3 100644 --- a/satellites/volumeicon.sat +++ b/satellites/volumeicon.sat @@ -1,14 +1,15 @@ -import "compile/configure" +import 'compile/configure' name=volumeicon version=0.5.1 -update_url="http://softwarebakery.com/maato/$name.html" +update_url="http://nullwise.com/$name.html" -dlextract "http://softwarebakery.com/maato/files/$name/$name-$version.tar.gz" \ - "48230f3a1843fa4cc4ec97d0da35c3f5" +dlextract "http://nullwise.com/files/$name/$name-$version.tar.gz" \ + '48230f3a1843fa4cc4ec97d0da35c3f5' header_end cd "$name-$version" +sed -i -e 's/-DCOMPILEWITH_NOTIFY/ &/' ./configure compile_configure --enable-notify # vim:set tabstop=4 shiftwidth=4 syntax=sh et: