Browse Source

Refactoring things a bit, pass 1.

master
mid-kid 7 years ago
parent
commit
20d7ec1fbb
  1. 10
      astronaut/astrohelp
  2. 153
      astronaut/astronaut
  3. 14
      astronaut/astronaut.sat
  4. 88
      astronaut/astronautpkg
  5. 80
      astronaut/examples/hello.sat
  6. 8
      astronaut/pacman-astronaut
  7. 2
      astronaut/template.sat
  8. 6
      astronaut/xbps-astronaut
  9. 9
      graveyard/first_attempt.cause_of_death
  10. 18
      graveyard/first_attempt/satellites/acl.sat
  11. 18
      graveyard/first_attempt/satellites/attr.sat
  12. 16
      graveyard/first_attempt/satellites/binutils.sat
  13. 16
      graveyard/first_attempt/satellites/coreutils.sat
  14. 15
      graveyard/first_attempt/satellites/file.sat
  15. 23
      graveyard/first_attempt/satellites/gcc.sat
  16. 19
      graveyard/first_attempt/satellites/glibc.sat
  17. 16
      graveyard/first_attempt/satellites/gmp.sat
  18. 7
      graveyard/first_attempt/satellites/groups/package-management
  19. 8
      graveyard/first_attempt/satellites/groups/toolchain
  20. 14
      graveyard/first_attempt/satellites/linux-api.sat
  21. 15
      graveyard/first_attempt/satellites/mpc.sat
  22. 15
      graveyard/first_attempt/satellites/mpfr.sat
  23. 16
      graveyard/first_attempt/satellites/shadow.sat
  24. 16
      graveyard/first_attempt/satellites/tar.sat
  25. 17
      graveyard/first_attempt/satellites/tzdata.sat
  26. 17
      graveyard/first_attempt/satellites/util-linux.sat
  27. 15
      graveyard/first_attempt/satellites/zlib.sat
  28. 42
      graveyard/first_attempt/tools/chroot
  29. 7
      graveyard/first_attempt/tools/library-check.sh
  30. 100
      graveyard/first_attempt/tools/mktools
  31. 54
      graveyard/first_attempt/tools/prepchroot
  32. 8
      graveyard/first_attempt/tools/satellites/astronaut.sat
  33. 13
      graveyard/first_attempt/tools/satellites/bash.sat
  34. 20
      graveyard/first_attempt/tools/satellites/binutils-1.sat
  35. 26
      graveyard/first_attempt/tools/satellites/binutils-2.sat
  36. 14
      graveyard/first_attempt/tools/satellites/busybox.sat
  37. 17
      graveyard/first_attempt/tools/satellites/ca-certificates.sat
  38. 13
      graveyard/first_attempt/tools/satellites/check.sat
  39. 13
      graveyard/first_attempt/tools/satellites/curl.sat
  40. 13
      graveyard/first_attempt/tools/satellites/dejagnu.sat
  41. 14
      graveyard/first_attempt/tools/satellites/expect.sat
  42. 1038
      graveyard/first_attempt/tools/satellites/extrafiles/busybox/busybox.config
  43. 84
      graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-ca.sh
  44. 49
      graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-cert.pl
  45. 53
      graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/remove-expired-certs.sh
  46. 21
      graveyard/first_attempt/tools/satellites/extrafiles/stow/etc-stowrc.patch
  47. 13
      graveyard/first_attempt/tools/satellites/extrafiles/stow/fix-warning-message-perl5.20.patch
  48. 13
      graveyard/first_attempt/tools/satellites/gawk.sat
  49. 67
      graveyard/first_attempt/tools/satellites/gcc-1.sat
  50. 63
      graveyard/first_attempt/tools/satellites/gcc-2.sat
  51. 24
      graveyard/first_attempt/tools/satellites/glibc.sat
  52. 21
      graveyard/first_attempt/tools/satellites/libstdcxx.sat
  53. 13
      graveyard/first_attempt/tools/satellites/linux-api.sat
  54. 13
      graveyard/first_attempt/tools/satellites/m4.sat
  55. 13
      graveyard/first_attempt/tools/satellites/make.sat
  56. 13
      graveyard/first_attempt/tools/satellites/openssl.sat
  57. 17
      graveyard/first_attempt/tools/satellites/perl.sat
  58. 18
      graveyard/first_attempt/tools/satellites/stow.sat
  59. 17
      graveyard/first_attempt/tools/satellites/tcl-core.sat
  60. 53
      graveyard/first_attempt/tools/version-check.sh
  61. 161
      graveyard/freshnaut
  62. 6
      graveyard/freshnaut.cause_of_death
  63. 106
      graveyard/internaut
  64. 6
      graveyard/internaut.cause_of_death
  65. 14
      graveyard/unmaintained_satellites/3dsfat16tool.sat
  66. 13
      graveyard/unmaintained_satellites/3dstool-git.sat
  67. 16
      graveyard/unmaintained_satellites/3dstool.sat
  68. 19
      graveyard/unmaintained_satellites/apulse.sat
  69. 15
      graveyard/unmaintained_satellites/bam.sat
  70. 15
      graveyard/unmaintained_satellites/bctoolbox.sat
  71. 13
      graveyard/unmaintained_satellites/bcunit-git.sat
  72. 14
      graveyard/unmaintained_satellites/bin/default_arm7.sat
  73. 13
      graveyard/unmaintained_satellites/bin/extrafiles/palemoon/palemoon.desktop
  74. 14
      graveyard/unmaintained_satellites/bin/libfat-nds.sat
  75. 13
      graveyard/unmaintained_satellites/bin/libnds.sat
  76. 13
      graveyard/unmaintained_satellites/bluez-alsa-git.sat
  77. 32
      graveyard/unmaintained_satellites/broadcom-wl.sat
  78. 14
      graveyard/unmaintained_satellites/cabextract.sat
  79. 14
      graveyard/unmaintained_satellites/ctrtool.sat
  80. 14
      graveyard/unmaintained_satellites/ctrulib-bin.sat
  81. 11
      graveyard/unmaintained_satellites/ctrulib-git.sat
  82. 16
      graveyard/unmaintained_satellites/devkitarm-bin.sat
  83. 7
      graveyard/unmaintained_satellites/extrafiles/nxengine/nxengine.desktop
  84. BIN
      graveyard/unmaintained_satellites/extrafiles/nxengine/nxengine.png
  85. 24
      graveyard/unmaintained_satellites/extrafiles/nxengine/nxengine.sh
  86. 14
      graveyard/unmaintained_satellites/fdk-aac.sat
  87. 15
      graveyard/unmaintained_satellites/fluidsynth.sat
  88. 13
      graveyard/unmaintained_satellites/gfm-git.sat
  89. 25
      graveyard/unmaintained_satellites/giblib.sat
  90. 15
      graveyard/unmaintained_satellites/gtksourceview2.sat
  91. 18
      graveyard/unmaintained_satellites/heimdall.sat
  92. 15
      graveyard/unmaintained_satellites/include-what-you-use.sat
  93. 17
      graveyard/unmaintained_satellites/intel-ucode.sat
  94. 15
      graveyard/unmaintained_satellites/json-glib.sat
  95. 23
      graveyard/unmaintained_satellites/jsoncpp.sat
  96. 23
      graveyard/unmaintained_satellites/kbuild.sat
  97. 14
      graveyard/unmaintained_satellites/kexec-tools.sat
  98. 19
      graveyard/unmaintained_satellites/kpartx.sat
  99. 14
      graveyard/unmaintained_satellites/libbsd.sat
  100. 14
      graveyard/unmaintained_satellites/libgdiplus.sat

10
astronaut/astrohelp

@ -24,6 +24,8 @@ function="$2"
# Functions reused in all wrappers
global="$(printf '
download_only=true
name_sat="%s"
name="$name_sat"
import() {
. "%s/functions/$1.sh"
@ -32,7 +34,7 @@ global="$(printf '
# Allowed external utility commands
cut() { "%s" "$@"; }
expr() { "%s" "$@"; }
' "$(dirname "$satellite")" "$(command -v cut)" "$(command -v expr)")"
' "$(basename "$satellite" .sat)" "$(dirname "$satellite")" "$(command -v cut)" "$(command -v expr)")"
if [ "$function" = "variable" ]; then
name="$3"
@ -42,7 +44,7 @@ if [ "$function" = "variable" ]; then
fi
printf "$global"'
header_end() {
_() {
variable="$%s"
[ "$variable" ] && echo "$variable"
exit $?
@ -60,7 +62,7 @@ elif [ "$function" = "downloads" ]; then
dlfile() {
[ "$1" ] && echo "$1"
}
header_end() { exit 0; }
_() { exit 0; }
. %s
' "$satellite" | PATH= /bin/sh 2> /dev/null
elif [ "$function" = "options" ]; then
@ -68,7 +70,7 @@ elif [ "$function" = "options" ]; then
define_option() {
[ "$1" ] && echo "$1"
}
header_end() { exit 0; }
_() { exit 0; }
. %s
' "$satellite" | PATH= /bin/sh 2> /dev/null
else

153
astronaut/astronaut

@ -1,7 +1,7 @@
#!/bin/sh
set -e
set -eu
# Configuration
# Astronaut configuration
# Build/install-time directories
dir_build='/tmp/astronaut/build' # Temporary directory to build packages
@ -9,8 +9,6 @@ dir_source='/tmp/astronaut/source' # Directory where the package sources will b
dir_install='/tmp/astronaut/install' # Directory where the package will be installed
# The source directory will have subdirs for each different $name,
# specified inside the satellite file.
# The $dir_install variable will have '{pkg}' replaced with $_satname,
# which is the filename of the satellite, without the .sat suffix.
# Runtime directories
dir_prefix='usr' # Prefix directory
@ -18,17 +16,17 @@ dir_prefix='usr' # Prefix directory
# Finer-grained control of runtime dirs
# This can't be set from the command line, but might need to be adapted for your distro.
dir_bindir='bin'
dir_sbindir='sbin'
dir_libexecdir='libexec'
dir_sysconfdir='etc'
dir_libdir='lib'
dir_includedir='include'
dir_datadir='share'
dir_infodir='share/info'
dir_localedir='share/locale'
dir_mandir='share/man'
dir_docdir='share/doc'
dir_bin='bin'
dir_sbin='sbin'
dir_libexec='libexec'
dir_sysconf='etc'
dir_lib='lib'
dir_include='include'
dir_data='share'
dir_info='share/info'
dir_locale='share/locale'
dir_man='share/man'
dir_doc='share/doc'
# Default commands
cmd_download='curl -# -L -o {dst} {src}' # Command to execute to download files
@ -56,13 +54,11 @@ package_options() { :; } # Per-package options function.
# Options not in the configuration
download_only=false
_vcs_only=false
_nuke_dir_install=false
_user_options= # Options specified in the command line get the highest priority
_sat_options= # Options defined by the satellite
_astronaut_vcs_only=false
_astronaut_nuke_install=false
_astronaut_options_user= # Options specified in the command line get the highest priority
# Should be specified in the satellite
name=
version=
update_url=
vcs_compile=false
@ -92,18 +88,18 @@ Usage: $0 [-bsip <dir>] [-hIdv] [-o <options>] <satellite>...
-v Only build vcs package if any updates have been made to it
-o Set package options (comma-separated)
Tips:$([ "$(basename "$0")" = "astronaut" ] && printf "\n- Use \`head -n 51 $0 > astronaut.conf.example\` to generate a default configuration file.")
Tips:$([ "$(basename "$0")" = "astronaut" ] && printf "\n- Use \`head -n 49 $0 | tail -n +4 > astronaut.conf.example\` to generate a default configuration file.")
- Keep in mind that when specifying options on the command line in a string, the first always takes priority.
For example, in \"opt,someotheropt,!opt\", opt is enabled, due to it being the first occurrence.
- If you have set \$dir_satellites in the config, you can omit the .sat suffix.
"
}
_msg() {
_astronaut_msg() {
echo "=> $@"
}
_exiterr() {
_astronaut_error() {
echo "===> Houston, we've got a problem: $@" 1>&2
exit 1
}
@ -115,37 +111,23 @@ while getopts "h?s:b:i:p:Idvo:" opt; do
_show_help
exit 0
;;
s)
dir_source="$OPTARG"
;;
b)
dir_build="$OPTARG"
;;
i)
dir_install="$OPTARG"
;;
p)
dir_prefix="$OPTARG"
;;
I)
_nuke_dir_install=true
;;
d)
download_only=true
;;
v)
_vcs_only=true
;;
o)
_user_options="$OPTARG,$_user_options"
;;
s) dir_source="$OPTARG" ;;
b) dir_build="$OPTARG" ;;
i) dir_install="$OPTARG" ;;
p) dir_prefix="$OPTARG" ;;
I) _astronaut_nuke_install=true ;;
d) download_only=true ;;
v) _astronaut_vcs_only=true ;;
o) _astronaut_options_user="$OPTARG,$_astronaut_options_user" ;;
esac
done
shift $(expr $OPTIND - 1)
[ "$1" = "--" ] && shift
[ "$#" -ge 1 ] && [ "$1" = "--" ] && shift
if [ ! "$1" ]; then
if [ "$#" -lt 1 ]; then
_show_help
exit 1
fi
@ -162,29 +144,29 @@ safe_sed() {
download() {
mkdir -p "$dir_source/$name"
[ "$3" ] && local filename="$3" || local filename="$(basename $(echo "$1" | cut -d? -f1))"
[ "$#" -ge 3 ] && local filename="$3" || local filename="$(basename $(echo "$1" | cut -d? -f1))"
local path="$dir_source/$name/$filename"
if [ ! -e "$path" -o "$(_mksum "$path")" != "$2" ]; then
_msg "Downloading $filename"
if [ ! -e "$path" ] || [ "$#" -ge 2 -a "$(_mksum "$path")" != "$2" ]; then
_astronaut_msg "Downloading $filename"
[ "$4" ] && local cmd="$4" || local cmd="$cmd_download"
[ "$#" -ge 4 ] && local cmd="$4" || local cmd="$cmd_download"
eval $(echo "$cmd" | sed -e "s/{dst}/'$(safe_sed "$path")'/g" -e "s/{src}/'$(safe_sed "$1")'/g")
local checksum="$(_mksum "$path")"
if [ "$2" -a "$checksum" != "$2" ]; then
_msg "Checksum: $checksum"
_exiterr 'Checksum failed'
if [ "$#" -ge 2 -a "$checksum" != "$2" ]; then
_astronaut_msg "Checksum: $checksum"
_astronaut_error 'Checksum failed'
fi
elif [ ! -f "$path" ]; then
_exiterr "'$path' exists but isn't a file?"
_astronaut_error "'$path' exists but isn't a file?"
fi
}
extract() {
_msg "Extracting $1"
[ "$2" ] && local dest="$2" || local dest='.'
[ "$3" ] && local cmd="$3" || local cmd="$cmd_extract"
_astronaut_msg "Extracting $1"
[ "$#" -ge 2 ] && local dest="$2" || local dest='.'
[ "$#" -ge 3 ] && local cmd="$3" || local cmd="$cmd_extract"
eval $(echo "$cmd" | sed -e "s/{src}/'$(safe_sed "$dir_source/$name/$1")'/g" -e "s/{dst}/'$(safe_sed "$dest")'/g")
}
@ -193,7 +175,7 @@ getfile() {
}
extrafile() {
local dir="$(dirname "$_satellite")"
local dir="$(dirname "$_astronaut_satellite")"
[ -d "$dir/extrafiles" ] && local dir="$dir/extrafiles/$name" || true
cp -a "$dir/$1" "./$1"
@ -247,8 +229,8 @@ option() {
if [ "$option" = "$check" ]; then
if [ "$variable" = true -a "$option_variable" = false ]; then
_msg 'Tip: Define the option as option=value.' 1>&2
_exiterr "Satellite requested a variable option, but there was no value for option: '$option'."
_astronaut_msg 'Tip: Define the option as option=value.' 1>&2
_astronaut_error "Satellite requested a variable option, but there was no value for option: '$option'."
fi
[ "$option_negate" = true ] && local enabled=false || local enabled=true
@ -258,8 +240,8 @@ option() {
done
if [ "$found" = false ]; then
_msg 'Tip: Make sure to define every option you use in the satellite.' 1>&2
_exiterr "Option '$check' was nowhere to be found."
_astronaut_msg 'Tip: Make sure to define every option you use in the satellite.' 1>&2
_astronaut_error "Option '$check' was nowhere to be found."
fi
if [ "$variable" = true ]; then
@ -272,7 +254,7 @@ option() {
[ "$enabled" = true ] && local enabled=false || local enabled=true
fi
if [ "$1" ]; then
if [ "$#" -ge 1 ]; then
if [ "$enabled" = true ]; then
"$@"
fi
@ -287,13 +269,13 @@ define_option() {
}
import() {
. "$(dirname "$_satellite")/functions/$1.sh"
. "$(dirname "$_astronaut_satellite")/functions/$1.sh"
}
# Set some functions in accordance to the different options.
header_end() { :; }
if [ "$_vcs_only" = true ]; then
header_end() {
_() { :; }
if [ "$_astronaut_vcs_only" = true ]; then
_() {
if [ "$vcs_compile" = false ]; then
exit
fi
@ -306,7 +288,7 @@ if [ "$download_only" = true ]; then
extrafile() { :; }
# Exit at the end of the header
header_end() { exit; }
_() { exit; }
fi
# Create the directories
@ -320,38 +302,39 @@ if [ "$download_only" = false ]; then
dir_install="$(realpath "$dir_install")"
fi
for _satellite in "$@"; do
_satname="$(basename "$_satellite" .sat)"
for _astronaut_satellite in "$@"; do
name_sat="$(basename "$_astronaut_satellite" .sat)"
name="$name_sat"
# Try to find the satellite file if it can't be found.
if [ ! -f "$_satellite" ]; then
if [ ! -f "$_astronaut_satellite" ]; then
if [ -d "$dir_satellites" ]; then
file="$(find "$dir_satellites" -type f \( -name "$_satname.sat" -o -name "$_satname" \) -print -quit)"
file="$(find "$dir_satellites" -type f \( -name "$name_sat.sat" -o -name "$name_sat" \) -print -quit)"
if [ -f "$file" ]; then
_satellite="$file"
_satname="$(basename "$_satellite" .sat)"
_astronaut_satellite="$file"
name_sat="$(basename "$_astronaut_satellite" .sat)"
fi
fi
# If it still can't be found, exit.
if [ ! -f "$_satellite" ]; then
_exiterr "Can't find satellite: $_satellite"
if [ ! -f "$_astronaut_satellite" ]; then
_astronaut_error "Can't find satellite: $_astronaut_satellite"
fi
fi
_satellite="$(realpath "$_satellite")"
_astronaut_satellite="$(realpath "$_astronaut_satellite")"
(
options="$_user_options$(package_options "$_satname"),$options"
options="$_astronaut_options_user$(package_options "$name_sat"),$options"
if [ "$download_only" = true ]; then
# Just download it
. "$_satellite"
. "$_astronaut_satellite"
else
_astronaut_wrapper_pre
# Remove install dir if appropriate
if [ "$_nuke_dir_install" = true -a ! -z "$dir_install" ]; then
if [ "$_astronaut_nuke_install" = true -a ! -z "$dir_install" ]; then
rm -rf "$dir_install"
mkdir -p "$dir_install"
fi
@ -360,9 +343,9 @@ for _satellite in "$@"; do
mkdir -p "$dir_build"
# Create the satellite
options="$_user_options$(package_options "$_satname"),$options"
options="$_astronaut_options_user$(package_options "$name_sat"),$options"
cd "$dir_build"
. "$_satellite"
. "$_astronaut_satellite"
_astronaut_wrapper_post
fi

14
astronaut/astronaut.sat

@ -16,21 +16,21 @@ fi
option xbps extrafile 'xbps-astronaut'
option pacman extrafile 'pacman-astronaut'
option pkgtools extrafile 'astronautpkg'
header_end
_
# Fix paths
sed -i -e "s/\/etc\/astronaut.conf/$(safe_sed "/$dir_prefix/$dir_sysconfdir/astronaut.conf")/g" astronaut
sed -i -e "s/\/etc\/astronaut.conf/$(safe_sed "/$dir_prefix/$dir_sysconf/astronaut.conf")/g" astronaut
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" astronaut
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bin" astronaut
# Optional helper tools
if option helpers; then
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" astrohelp freshnaut
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bin" astrohelp freshnaut
fi
# Wrappers for specific package managers
option xbps install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" xbps-astronaut
option pacman install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" pacman-astronaut
option pkgtools install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" astronautpkg
option xbps install -Dm755 -t "$dir_install/$dir_prefix/$dir_bin" xbps-astronaut
option pacman install -Dm755 -t "$dir_install/$dir_prefix/$dir_bin" pacman-astronaut
option pkgtools install -Dm755 -t "$dir_install/$dir_prefix/$dir_bin" astronautpkg
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

88
astronaut/astronautpkg

@ -25,18 +25,18 @@ dir_wrapper_pkgtools="$PWD" # Where the packages should be stored
# Wrapper functions
_astronaut_wrapper_pre() {
# Make sure to remove the contents of the install directory before building
_nuke_dir_install=true
_astronaut_nuke_install=true
}
_astronaut_wrapper_post() {
# Gzip man and info pages
if [ -d "$dir_install/$dir_prefix/$dir_mandir" ]; then
find "$dir_install/$dir_prefix/$dir_mandir" -type f -exec gzip -9 {} \;
for i in $(find "$dir_install/$dir_prefix/$dir_mandir" -type l); do ln -s "$(readlink "$i").gz" "$i.gz"; rm "$i"; done
if [ -d "$dir_install/$dir_prefix/$dir_man" ]; then
find "$dir_install/$dir_prefix/$dir_man" -type f -exec gzip -9 {} \;
for i in $(find "$dir_install/$dir_prefix/$dir_man" -type l); do ln -s "$(readlink "$i").gz" "$i.gz"; rm "$i"; done
fi
if [ -d "$dir_install/$dir_prefix/$dir_infodir" ]; then
rm -f "$dir_install/$dir_prefix/$dir_infodir/dir"
find "$dir_install/$dir_prefix/$dir_infodir" -type f -name '*.info' -exec gzip -9 '{}' \;
if [ -d "$dir_install/$dir_prefix/$dir_info" ]; then
rm -f "$dir_install/$dir_prefix/$dir_info/dir"
find "$dir_install/$dir_prefix/$dir_info" -type f -name '*.info' -exec gzip -9 '{}' \;
fi
# Strip binaries
@ -52,22 +52,22 @@ _astronaut_wrapper_post() {
## make exactly 11 lines for the formatting to be correct. It's also
## customary to leave one space after the ':'.
#$(printf %$(printf '%s' "$_satname" | wc -c)s)|-----handy-ruler------------------------------------------------------|
#$_satname: $_satname (Generated with astronautpkg)
#$_satname:
#$_satname:
#$_satname:
#$_satname:
#$_satname:
#$_satname:
#$_satname:
#$_satname:
#$_satname:
#$_satname:
#$(printf %$(printf '%s' "$name_sat" | wc -c)s)|-----handy-ruler------------------------------------------------------|
#$name_sat: $name_sat (Generated with astronautpkg)
#$name_sat:
#$name_sat:
#$name_sat:
#$name_sat:
#$name_sat:
#$name_sat:
#$name_sat:
#$name_sat:
#$name_sat:
#$name_sat:
#EOF
# Move configuration files to .new and install them for proper compliance.
if [ -d "$dir_install/$dir_prefix/$dir_sysconfdir" ]; then
if [ -d "$dir_install/$dir_prefix/$dir_sysconf" ]; then
mkdir -p "$dir_install/install"
cat >> "$dir_install/install/doinst.sh" << 'EOF'
config() {
@ -84,42 +84,42 @@ config() {
EOF
find "$dir_install/$dir_prefix/$dir_sysconfdir" -type f -printf '%P\n' | while IFS= read file; do
mv "$dir_install/$dir_prefix/$dir_sysconfdir/$file" "$dir_install/$dir_prefix/$dir_sysconfdir/$file.new"
echo "config '$dir_prefix/$dir_sysconfdir/$file.new'" >> "$dir_install/install/doinst.sh"
find "$dir_install/$dir_prefix/$dir_sysconf" -type f -printf '%P\n' | while IFS= read file; do
mv "$dir_install/$dir_prefix/$dir_sysconf/$file" "$dir_install/$dir_prefix/$dir_sysconf/$file.new"
echo "config '$dir_prefix/$dir_sysconf/$file.new'" >> "$dir_install/install/doinst.sh"
done
echo >> "$dir_install/install/doinst.sh"
fi
# Update desktop database if new files were added
if [ -d "$dir_install/$dir_prefix/$dir_datadir/applications" ]; then
if [ -d "$dir_install/$dir_prefix/$dir_data/applications" ]; then
mkdir -p "$dir_install/install"
cat >> "$dir_install/install/doinst.sh" << EOF
if [ -x /$dir_prefix/$dir_bindir/update-desktop-database ]; then
/$dir_prefix/$dir_bindir/update-desktop-database -q $dir_prefix/$dir_datadir/applications >/dev/null 2>&1
if [ -x /$dir_prefix/$dir_bin/update-desktop-database ]; then
/$dir_prefix/$dir_bin/update-desktop-database -q $dir_prefix/$dir_data/applications >/dev/null 2>&1
fi
EOF
fi
# Update mime database if new files were added
if [ -d "$dir_install/$dir_prefix/$dir_datadir/mime" ]; then
if [ -d "$dir_install/$dir_prefix/$dir_data/mime" ]; then
mkdir -p "$dir_install/install"
cat >> "$dir_install/install/doinst.sh" << EOF
if [ -x /$dir_prefix/$dir_bindir/update-mime-database ]; then
/$dir_prefix/$dir_bindir/update-mime-database $dir_prefix/$dir_datadir/mime >/dev/null 2>&1
if [ -x /$dir_prefix/$dir_bin/update-mime-database ]; then
/$dir_prefix/$dir_bin/update-mime-database $dir_prefix/$dir_data/mime >/dev/null 2>&1
fi
EOF
fi
# Update icon cache if new files were added
if [ -d "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor" ]; then
if [ -d "$dir_install/$dir_prefix/$dir_data/icons/hicolor" ]; then
mkdir -p "$dir_install/install"
cat >> "$dir_install/install/doinst.sh" << EOF
if [ -e $dir_prefix/$dir_datadir/icons/hicolor/icon-theme.cache ]; then
if [ -x /$dir_prefix/$dir_bindir/gtk-update-icon-cache ]; then
/$dir_prefix/$dir_bindir/gtk-update-icon-cache -f $dir_prefix/$dir_datadir/icons/hicolor >/dev/null 2>&1
if [ -e $dir_prefix/$dir_data/icons/hicolor/icon-theme.cache ]; then
if [ -x /$dir_prefix/$dir_bin/gtk-update-icon-cache ]; then
/$dir_prefix/$dir_bin/gtk-update-icon-cache -f $dir_prefix/$dir_data/icons/hicolor >/dev/null 2>&1
fi
fi
@ -127,12 +127,12 @@ EOF
fi
# Compile schemas if new files were added
if [ -d "$dir_install/$dir_prefix/$dir_datadir/glib-2.0/schemas" ]; then
if [ -d "$dir_install/$dir_prefix/$dir_data/glib-2.0/schemas" ]; then
mkdir -p "$dir_install/install"
cat >> "$dir_install/install/doinst.sh" << EOF
if [ -e $dir_prefix/$dir_datadir/glib-2.0/schemas ]; then
if [ -x /$dir_prefix/$dir_datadir/glib-compile-schemas ]; then
/$dir_prefix/$dir_datadir/glib-compile-schemas $dir_prefix/$dir_datadir/glib-2.0/schemas >/dev/null 2>&1
if [ -e $dir_prefix/$dir_data/glib-2.0/schemas ]; then
if [ -x /$dir_prefix/$dir_data/glib-compile-schemas ]; then
/$dir_prefix/$dir_data/glib-compile-schemas $dir_prefix/$dir_data/glib-2.0/schemas >/dev/null 2>&1
fi
fi
@ -140,20 +140,20 @@ EOF
fi
# Query gio modules if new files were added
if [ -d "$dir_install/$dir_prefix/$dir_libdir/gio/modules" ]; then
if [ -d "$dir_install/$dir_prefix/$dir_lib/gio/modules" ]; then
mkdir -p "$dir_install/install"
cat >> "$dir_install/install/doinst.sh" << EOF
chroot . /$dir_prefix/$dir_bindir/gio-querymodules $dir_prefix/$dir_libdir/gio/modules/ 1> /dev/null 2> /dev/null
chroot . /$dir_prefix/$dir_bin/gio-querymodules $dir_prefix/$dir_lib/gio/modules/ 1> /dev/null 2> /dev/null
EOF
fi
# Install new info files if they were added
if [ -d "$dir_install/$dir_prefix/$dir_infodir" ]; then
if [ -d "$dir_install/$dir_prefix/$dir_info" ]; then
mkdir -p "$dir_install/install"
echo "if [ -x /$dir_prefix/$dir_bindir/install-info ]; then" >> "$dir_install/install/doinst.sh"
find "$dir_install/$dir_prefix/$dir_infodir" -type f -name '*.info.gz' -printf '%P\0' | while read -d '' -r file; do
echo " chroot . /$dir_prefix/$dir_bindir/install-info --info-dir=/$dir_prefix/$dir_infodir /$file 2> /dev/null" >> "$dir_install/install/doinst.sh"
echo "if [ -x /$dir_prefix/$dir_bin/install-info ]; then" >> "$dir_install/install/doinst.sh"
find "$dir_install/$dir_prefix/$dir_info" -type f -name '*.info.gz' -printf '%P\0' | while read -d '' -r file; do
echo " chroot . /$dir_prefix/$dir_bin/install-info --info-dir=/$dir_prefix/$dir_info /$file 2> /dev/null" >> "$dir_install/install/doinst.sh"
done
echo 'fi' >> "$dir_install/install/doinst.sh"
echo >> "$dir_install/install/doinst.sh"
@ -162,7 +162,7 @@ EOF
# Create the package
cd "$dir_install"
mkdir -p "$dir_wrapper_pkgtools"
PATH="$PATH:/sbin" $_astronaut_wrapper_fakeroot makepkg -l y -c n "$dir_wrapper_pkgtools/$_satname-$(echo "$version" | tr - _)-$(uname -m)-astro.txz"
PATH="$PATH:/sbin" $_astronaut_wrapper_fakeroot makepkg -l y -c n "$dir_wrapper_pkgtools/$name_sat-$(echo "$version" | tr - _)-$(uname -m)-astro.txz"
}
. "$_astronaut"

80
astronaut/examples/hello.sat

@ -1,14 +1,45 @@
# Example of a satellite file, which is just a shell script with a cool name.
# Astronaut will generally prefix internal variables and functions with "_astronaut".
# Some of those you can touch, some not.
# None of your variables should start with "_astronaut".
# There are, however, a few exceptions. You shouldn't modify these variables directly, as they will affect how astronaut and it's wrappers run.
# Astronaut directory variables:
# - dir_build -- The directory where the package is built. You are by default in this directory.
# - dir_source -- The directory where the sources are placed. Don't rely on this unless necessary. Place everything in $dir_source/$name!
# - dir_install -- The directory where you will have to install the software.
# Package directory variables, taken straight from GNU autotools:
# - dir_prefix
# - dir_bin
# - dir_sbin
# - dir_libexec
# - dir_sysconf
# - dir_lib
# - dir_include
# - dir_data
# - dir_info
# - dir_locale
# - dir_man
# - dir_doc
# Command variables (see the default astronaut configuration)
# - cmd_download -- Used to download files
# - cmd_extract -- Used to extract files
# Misc variables
# - options -- The options this package is built with.
# - download_only -- Whether we're in 'download only' mode or not. If we are, you may only create files in $dir_source/$name.
import 'say_hello' # Import some functions. See functions/say_hello.sh for more info.
# Info (Please declare it, as it will be used outside of this script, too)
# Required info
# Satellite info
name=hello # Name of the software, not the package name.
# Same source files will be used for the same software, despite the package name being different.
version=2.10
# Optional info
# By default, it's the same as the filename, without the .sat extension.
version=2.10 # REQUIRED! Please declare it, as it will be used outside of the script as well.
update_url="https://ftp.gnu.org/gnu/$name/" # URL to a downloadable plain-text file which updates when a new version is available.
update_names="$name-$version.tar.gz" # Specify what the lines containing the version number look like on the download page.
# It's a comma-separated list, and can contain multiple entries.
@ -16,7 +47,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, and has to be set before header_end is called.
# By default, astronaut doesn't use a "package name".
# It only uses the name variable, above, to create some sort of "namespaces", so that files from different projects don't overlap.
# The downloaded files and extra files in the "namespace" can be used by multiple satellites with the same name variable.
# This effectively gives you the ability to use the same files in multiple satellites.
# A few of the wrappers, however, do use a "package name". This is the same as the filename without the .sat extension.
# This "package name" can be accessed through the $name_sat variable, and you may use it as well.
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 conjunction with git, and has to be set before the end of 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.
@ -26,25 +65,7 @@ define_option 'test=Default value' # It is also allowed to provide no descripti
# 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.
# "You shouldn't even look, unless you're hacking really bad, but definitely don't touch"-variables:
# - dir_build (You cd into it automatically. Just use relative paths or $PWD.)
# - dir_source (This is handled by the commands detailed below. You should have no use for it.)
# "Look, but don't touch"-variables:
# - All other dir_* 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, ignoring default/user config.)
# - cmd_download
# - cmd_extract
# - vcs_compile
# - download_only
# - options
# Get them files.
# Get the files.
# URL [REQUIRED], MD5sum, Custom filename, Custom command
download "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
'6cd0ffea3884a4e79330338dcc2987d6' \
@ -62,7 +83,7 @@ download "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
# Copy local file to build directory. File should be stored in $(basedir <satellite file>)/extrafiles/$name/
#extrafile 'Herpaderp.txt'
header_end # End of the header.
_ # End of the header.
# The only commands that are allowed to be in the header are:
# - download
# - dlextract
@ -70,10 +91,11 @@ header_end # End of the header.
# - extrafile
# - import
# - define_option
# getfile and extract are technically allowed, but not encouraged.
# getfile and extract are technically allowed, but not encouraged. Those should be outside of the header.
# 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.
# Extract a downloaded file
# Name [REQUIRED], Destination, Custom command
extract "$name-$version.tar.gz" \
'.' \
@ -88,7 +110,7 @@ cd "$name-$version"
make
# Know if the user wants the package to be checked
# Check if an option is disabled
# Check if an option is enabled
if option check; then
make check
fi
@ -98,7 +120,7 @@ fi
#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.
rm "$dir_install/$dir_prefix/$dir_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

8
astronaut/pacman-astronaut

@ -18,13 +18,13 @@ dir_wrapper_pacman="$PWD" # Where the packages should be stored
# Wrapper functions
_astronaut_wrapper_pre() {
# Make sure to remove the contents of the install directory before building
_nuke_dir_install=true
_astronaut_nuke_install=true
}
_astronaut_wrapper_post() {
# Create the package info file
cat > "$dir_install/.PKGINFO" << EOF
pkgname = $_satname
pkgname = $name_sat
pkgver = $version-astro
pkgdesc = Generated with pacman-astronaut
url = $update_url
@ -39,8 +39,8 @@ EOF
# Create the package
bsdtar --strip-components 1 -C "$dir_install" -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' .
mv .MTREE "$dir_install/.MTREE" # bsdtar doesn't like the file being in the same directory.
fakeroot -- bsdtar --strip-components 1 -C "$dir_install" -cf - . > "$_satname-$version-astro-$(uname -m).pkg.tar"
repo-add astronaut.db.tar.gz "$_satname-$version-astro-$(uname -m).pkg.tar"
fakeroot -- bsdtar --strip-components 1 -C "$dir_install" -cf - . > "$name_sat-$version-astro-$(uname -m).pkg.tar"
repo-add astronaut.db.tar.gz "$name_sat-$version-astro-$(uname -m).pkg.tar"
}
. "$_astronaut"

2
astronaut/template.sat

@ -8,7 +8,7 @@ define_option '!check: Enable the testsuite.'
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
'6cd0ffea3884a4e79330338dcc2987d6'
header_end
_
cd "$name-$version"

6
astronaut/xbps-astronaut

@ -18,7 +18,7 @@ dir_wrapper_xbps="$PWD"
# Wrapper functions
_astronaut_wrapper_pre() {
# Make sure to remove the contents of the install directory before building
_nuke_dir_install=true
_astronaut_nuke_install=true
}
_astronaut_wrapper_post() {
@ -26,8 +26,8 @@ _astronaut_wrapper_post() {
cd "$dir_wrapper_xbps"
# Create the package
xbps-create --compression none -A "$(uname -m)" -n "$_satname-${version}_astro" -s "Generated with xbps-astronaut" -H "$update_url" "$dir_install"
xbps-rindex -f -a "$_satname-${version}_astro.$(uname -m).xbps"
xbps-create --compression none -A "$(uname -m)" -n "$name_sat-${version}_astro" -s "Generated with xbps-astronaut" -H "$update_url" "$dir_install"
xbps-rindex -f -a "$name_sat-${version}_astro.$(uname -m).xbps"
}
. "$_astronaut"

9
graveyard/first_attempt.cause_of_death

@ -1,9 +0,0 @@
First attempt died on 18 november 2015.
Latest update is unknown.
Birth date is unknown.
Description:
The first attempt was the first attempt I made at making a distro.
Cause of death:
Because the latest changes only being version bumps, and me having never actually tested those changes, and after I've made some substantial changes in how satellites are written (adding functions, support for vcs, header_end hooks, etc.), I've decided that if I ever take up making a distro again, I'll rewrite all of these satellites from scratch anyway.

18
graveyard/first_attempt/satellites/acl.sat

@ -1,18 +0,0 @@
name=acl
version=2.2.52
update_url="http://download.savannah.gnu.org/releases/$name/"
enable_check=false # These tests require a specific filesystem.
dlextract "http://download.savannah.gnu.org/releases/$name/$name-$version.src.tar.gz" \
"a61415312426e9c2212bd7dc7929abda"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make -j1 tests
make DIST_ROOT="$dir_install" install install-lib install-dev
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

18
graveyard/first_attempt/satellites/attr.sat

@ -1,18 +0,0 @@
name=attr
version=2.4.47
update_url="http://download.savannah.gnu.org/releases/$name/"
enable_check=false # These tests require a specific filesystem.
dlextract "http://download.savannah.gnu.org/releases/$name/$name-$version.src.tar.gz" \
"84f58dec00b60f2dc8fd1c9709291cc7"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make -j1 tests root-tests
make DIST_ROOT="$dir_install" install install-lib install-dev
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/binutils.sat

@ -1,16 +0,0 @@
name=binutils
version=2.25.1
enable_check=false
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"ac493a78de4fee895961d025b7905be4"
header_end
mkdir "$name-build"; cd "$name-build"
"../$name-$version/configure" --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/coreutils.sat

@ -1,16 +0,0 @@
name=coreutils
version=8.24
update_url="https://ftp.gnu.org/gnu/$name/"
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"40efdbce865d2458d8da0a9dcee7c16c"
header_end
cd "$name-$version"
./configure --prefix=/usr --enable-no-install-program=kill
make
do_check make check # NEED: user nobody, group nogroup, diff -c
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/file.sat

@ -1,15 +0,0 @@
name=file
version=5.24
dlextract "ftp://ftp.astron.com/pub/$name/$name-$version.tar.gz" \
"ec161b5a0d2aef147fb046e5630b1408"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

23
graveyard/first_attempt/satellites/gcc.sat

@ -1,23 +0,0 @@
name=gcc
version=5.2.0
enable_check=false
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
"a51bcfeb3da7dd4c623e27207ed43467"
header_end
mkdir "$name-build"; cd "$name-build"
SED=sed "../$name-$version/configure" --prefix=/usr --enable-languages=c,c++ --with-system-zlib --disable-bootstrap --disable-multilib
make
if do_check; then
ulimit -s 32768
make -k check
fi
make DESTDIR="$dir_install" install
ln -s gcc "$dir_install/usr/bin/cc"
mkdir -p "$dir_install/usr/lib/bfd-plugins"
ln -s "../../libexec/gcc/$(gcc -dumpmachine)/5.2.0/liblto_plugin.so" "$dir_install/usr/lib/bfd-plugins/"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

19
graveyard/first_attempt/satellites/glibc.sat

@ -1,19 +0,0 @@
name=glibc
version=2.22
enable_check=false
dlextract "https://ftp.gnu.org/gnu/libc/$name-$version.tar.xz" \
"e51e02bf552a0a1fbbdc948fb2f5e83c"
header_end
mkdir "$name-build"; cd "$name-build"
"../$name-$version/configure" --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# It likes leaving this file here. Something it really shouldn't.
rm "$dir_install/etc/ld.so.cache"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/gmp.sat

@ -1,16 +0,0 @@
name=gmp
shortver=6.0.0
version=${shortver}a
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"1e6da4e434553d2811437aa42c7f7c76"
header_end
cd "$name-$shortver"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

7
graveyard/first_attempt/satellites/groups/package-management

@ -1,7 +0,0 @@
tar
perl
stow
openssl
ca-certificates
curl
astronaut

8
graveyard/first_attempt/satellites/groups/toolchain

@ -1,8 +0,0 @@
linux-api
glibc # Adjust the toolchain after (http://linuxfromscratch.org/lfs/view/stable/chapter06/adjusting.html)
binutils
gmp # From here, run ldconfig after every package install.
mpfr
mpc
zlib # Dependency of gcc
gcc

14
graveyard/first_attempt/satellites/linux-api.sat

@ -1,14 +0,0 @@
name=linux
version=4.1.6
dlextract "https://www.kernel.org/pub/$name/kernel/v4.x/$name-$version.tar.xz" \
"1dae0c808e34164cab3dfd57be88bd53"
header_end
cd "$name-$version"
make mrproper
make INSTALL_HDR_PATH="$dir_install/usr" headers_install
find "$dir_install/usr/include" \( -name .install -o -name ..install.cmd \) -delete
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/mpc.sat

@ -1,15 +0,0 @@
name=mpc
version=1.0.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"d6a1d5f8ddea3abd2cc3e98f58352d26"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/mpfr.sat

@ -1,15 +0,0 @@
name=mpfr
version=3.1.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"6969398cd2fbc56a6af570b5273c56a9"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/shadow.sat

@ -1,16 +0,0 @@
name=shadow
version=4.2.1
update_url="https://pkg-shadow.alioth.debian.org/"
dlextract "https://pkg-shadow.alioth.debian.org/releases/$name-$version.tar.xz" \
"2bfafe7d4962682d31b5eba65dba4fc8"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/tar.sat

@ -1,16 +0,0 @@
name=tar
version=1.28
update_url="https://ftp.gnu.org/gnu/$name/"
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"49b6306167724fe48f419a33a5beb857"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/first_attempt/satellites/tzdata.sat

@ -1,17 +0,0 @@
name=tzdata
version=2015f
dlextract "https://www.iana.org/time-zones/repository/releases/$name$version.tar.gz" \
"e3b82732d20e973e48af1c6f13df9a1d"
header_end
timezones="africa antarctica asia australasia backward backzone etcetera europe factory northamerica pacificnew southamerica systemv"
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo" $timezones
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo/posix" $timezones
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo/right" -L leapseconds $timezones
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo" -p America/New_York
cp zone1970.tab iso3166.tab "$dir_install/usr/share/zoneinfo"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/first_attempt/satellites/util-linux.sat

@ -1,17 +0,0 @@
name=util-linux
majver=2.26
version=$majver.2
update_url="https://www.kernel.org/pub/linux/utils/$name/"
dlextract "https://www.kernel.org/pub/linux/utils/$name/v$majver/$name-$version.tar.xz" \
"9bdf368c395f1b70325d0eb22c7f48fb"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install # NEEDS: group tty
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/zlib.sat

@ -1,15 +0,0 @@
name=zlib
version=1.2.8
dlextract "http://zlib.net/$name-$version.tar.xz" \
"28f1205d8dd2001f26fec1e8c2cebe37"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

42
graveyard/first_attempt/tools/chroot

@ -1,42 +0,0 @@
#!/bin/sh
umask 022
set -e
if [ "$(id -u)" != "0" ]; then
echo "Please run this script as root" 1>&2
exit 1
fi
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2
exit 1
fi
rocket="$(realpath "$rocket")"
mkdir -p "$rocket/dev" "$rocket/proc" "$rocket/sys" "$rocket/run"
mount --bind /dev "$rocket/dev" 2> /dev/null || true
mount --bind /dev/pts "$rocket/dev/pts" 2> /dev/null || true # Bind-mounting this because not doing so breaks some things.
mount -t proc proc "$rocket/proc" 2> /dev/null || true
mount -t tmpfs tmpfs "$rocket/run" 2> /dev/null || true
if [ -h "$rocket/dev/shm" ]; then
mkdir -p "$rocket/$(readlink "$rocket/dev/shm")"
fi
mkdir -p "$rocket/etc"
cp /etc/resolv.conf "$rocket/etc/resolv.conf"
# FORCE_UNSAFE_CONFIGURE is needed for building some packages as root
chroot "$rocket" /tools/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1="(buildenv) \u:\w \$ " \
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/tools/bin:/tools/sbin \
MAKEFLAGS="$MAKEFLAGS" \
FORCE_UNSAFE_CONFIGURE=1 \
/tools/bin/ash -l
umount "$rocket/dev/pts" || true
umount "$rocket/dev" || true
umount "$rocket/proc" || true
umount "$rocket/run" || true

7
graveyard/first_attempt/tools/library-check.sh

@ -1,7 +0,0 @@
#!/bin/bash
# Copied from LFS 7.7
for lib in lib{gmp,mpfr,mpc}.la; do
echo $lib: $(if find /usr/lib* -name $lib|
grep -q $lib;then :;else echo not;fi) found
done
unset lib

100
graveyard/first_attempt/tools/mktools

@ -1,100 +0,0 @@
#!/bin/sh
# Tool to build tools to build the temporary system
set -e
umask 022
download_only=false
if [ "$1" = "download" ]; then
download_only=true
fi
command -v astronaut >/dev/null 2>&1 || {
echo 'Can'\''t find astronaut in $PATH' 1>&2
exit 1
}
if [ "$download_only" = false ]; then
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2
exit 1
fi
if [ "$(readlink /tools)" != "$(realpath "$rocket")/tools" ]; then
echo "Please create a symlink from /tools to $(realpath "$rocket")/tools" 1>&2
exit 1
fi
fi
# Options for supported shells
if [ "$(basename "$(readlink /bin/sh)")" = "bash" ]; then
shellopts="+h"
fi
# Know where them satellites are
satellite_dir="$(dirname "$(realpath "$0")")/satellites"
envrun() {
if [ "$download_only" = true ]; then
$@
return
fi
env -i \
HOME="$HOME" \
TERM="$TERM" \
LC_ALL=C \
PATH="/tools/bin:$PATH" \
MAKEFLAGS="$MAKEFLAGS" \
rocket="$rocket" \
target="$(uname -m)-rocket-linux-gnu" \
/bin/sh "$shellopts" "$@"
}
astrobuild() {
if [ "$download_only" = true ]; then
envrun astronaut -d "$satellite_dir/$1.sat"
else
envrun astronaut -i "$rocket" "$satellite_dir/$1.sat"
fi
}
# Needed for x86_64
if [ "$download_only" = false ]; then
mkdir -p "$rocket/tools/lib"
ln -sf lib "$rocket/tools/lib64"
fi
# Just enter the environment
#envrun
# List of packages to build
# Toolchain
astrobuild "binutils-1"
astrobuild "gcc-1"
astrobuild "linux-api"
astrobuild "glibc"
astrobuild "libstdcxx"
astrobuild "binutils-2"
astrobuild "gcc-2"
# Utilities
astrobuild "busybox"
astrobuild "bash"
astrobuild "gawk"
astrobuild "make"
astrobuild "m4"
# Testing
astrobuild "tcl-core"
astrobuild "expect"
astrobuild "dejagnu"
astrobuild "check"
# Package management
astrobuild "perl"
astrobuild "stow"
astrobuild "openssl"
astrobuild "ca-certificates"
astrobuild "curl"
astrobuild "astronaut"

54
graveyard/first_attempt/tools/prepchroot

@ -1,54 +0,0 @@
#!/bin/sh
umask 022
set -e
if [ "$(id -u)" != "0" ]; then
echo "Please run this script as root" 1>&2
exit 1
fi
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2
exit 1
fi
echo "Changing ownership of $rocket to root"
chown -R 0.0 "$rocket"
echo "Creating device nodes"
mkdir -p "$rocket/dev"
umount -R "$rocket/dev" 2> /dev/null || true
mknod -m 600 "$rocket/dev/console" c 5 1 2> /dev/null || true
mknod -m 666 "$rocket/dev/null" c 1 3 2> /dev/null || true
echo "Creating directories"
install -dm750 "$rocket/root"
install -dm1777 "$rocket/tmp"
mkdir -p "$rocket/etc" "$rocket/usr/pkg" "$rocket/usr/sat"
echo "Creating temporary symlinks"
mkdir -p "$rocket/usr/pkg/tmp-coreutils/bin"
ln -f "$rocket/tools/bin/busybox" "$rocket/usr/pkg/tmp-coreutils/bin/pwd"
mkdir -p "$rocket/usr/pkg/tmp-sh/bin"
ln -f "$rocket/tools/bin/busybox" "$rocket/usr/pkg/tmp-sh/bin/sh"
mkdir -p "$rocket/usr/pkg/tmp-bash/bin"
ln -f "$rocket/tools/bin/bash" "$rocket/usr/pkg/tmp-bash/bin/bash"
mkdir -p "$rocket/usr/pkg/tmp-ca-certificates/etc/ssl"
ln -sf /tools/ssl/certs "$rocket/usr/pkg/tmp-ca-certificates/etc/ssl/certs"
mkdir -p "$rocket/usr/pkg/tmp-gcc/usr/lib"
ln -f "$rocket/tools/lib/libgcc_s.so" "$rocket/usr/pkg/tmp-gcc/usr/lib/libgcc_s.so"
ln -f "$rocket/tools/lib/libgcc_s.so.1" "$rocket/usr/pkg/tmp-gcc/usr/lib/libgcc_s.so.1"
ln -f "$rocket/tools/lib/libstdc++.so" "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so"
ln -f "$rocket/tools/lib/libstdc++.so.6" "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so.6"
ln -f "$rocket/tools/lib/libstdc++.so.6.0.21" "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so.6.0.21"
echo "Creating users and groups"
echo 'root:x:0:0:root:/root:/bin/sh
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false' > "$rocket/etc/passwd"
echo 'root:x:0:
tty:x:1:
nogroup:x:99:' > "$rocket/etc/group"
echo "Configuring stow"
echo '-d /usr/pkg
-t /' > "$rocket/etc/stowrc"

8
graveyard/first_attempt/tools/satellites/astronaut.sat

@ -1,8 +0,0 @@
# This is a hacky satellite. Please refrain of making more like this if possible.
header_end
msg "Installing astronaut"
install -Dm755 "$(command -v "$0")" "$dir_install/tools/bin/astronaut"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/bash.sat

@ -1,13 +0,0 @@
name=bash
version=4.3.30
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"a27b3ee9be83bd3ba448c0ff52b28447"
header_end
cd "$name-$version"
./configure --prefix=/tools --without-bash-malloc
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

20
graveyard/first_attempt/tools/satellites/binutils-1.sat

@ -1,20 +0,0 @@
name=binutils
version=2.25.1
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"ac493a78de4fee895961d025b7905be4"
header_end
mkdir "$name-build"; cd "$name-build"
"../$name-$version/configure" \
--prefix=/tools \
--with-sysroot="$dir_install" \
--with-lib-path=/tools/lib \
--target="$target" \
--disable-nls \
--disable-werror
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

26
graveyard/first_attempt/tools/satellites/binutils-2.sat

@ -1,26 +0,0 @@
name=binutils
version=2.25.1
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"ac493a78de4fee895961d025b7905be4"
header_end
mkdir "$name-build"; cd "$name-build"
CC="$target-gcc" \
AR="$target-ar" \
RANLIB="$target-ranlib" \
"../$name-$version/configure" \
--prefix=/tools \
--disable-nls \
--disable-werror \
--with-lib-path=/tools/lib \
--with-sysroot
make; make DESTDIR="$dir_install" install
make -C ld clean
make -C ld LIB_PATH=/lib:/lib64:/usr/lib:/usr/lib64
cp ld/ld-new "$dir_install/tools/bin/ld-new"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

14
graveyard/first_attempt/tools/satellites/busybox.sat

@ -1,14 +0,0 @@
name=busybox
version=1.23.2
dlextract "http://www.busybox.net/downloads/$name-$version.tar.bz2" \
"7925683d7dd105aabe9b6b618d48cc73"
extrafile "busybox.config"
header_end
sed 's@./_install@'"$dir_install/tools"'@' busybox.config > "$name-$version/.config"
cd "$name-$version"
make; make install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/first_attempt/tools/satellites/ca-certificates.sat

@ -1,17 +0,0 @@
name=ca-certificates
version=$(date +%Y%m%d)
dlfile "https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt"
extrafile "make-ca.sh"
extrafile "make-cert.pl"
extrafile "remove-expired-certs.sh"
header_end
./make-ca.sh
./remove-expired-certs.sh certs
mkdir -p "$dir_install/tools/ssl/certs"
cp certs/*.pem "$dir_install/tools/ssl/certs"
c_rehash "$dir_install/tools/ssl/certs"
cp ca-certificates.crt "$dir_install/tools/ssl/certs"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/check.sat

@ -1,13 +0,0 @@
name=check
version=0.10.0
dlextract "https://sourceforge.net/projects/$name/files/$name/$version/$name-$version.tar.gz" \
"53c5e5c77d090e103a17f3ed7fd7d8b8"
header_end
cd "$name-$version"
PKG_CONFIG= ./configure --prefix=/tools
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/curl.sat

@ -1,13 +0,0 @@
name=curl
version=7.44.0
dlextract "http://curl.haxx.se/download/$name-$version.tar.bz2" \
"6b952ca00e5473b16a11f05f06aa8dae"
header_end
cd "$name-$version"
./configure --prefix=/tools --with-ssl
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/dejagnu.sat

@ -1,13 +0,0 @@
name=dejagnu
version=1.5.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"5bda2cdb1af51a80aecce58d6e42bd2f"
header_end
cd "$name-$version"
./configure --prefix=/tools
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

14
graveyard/first_attempt/tools/satellites/expect.sat

@ -1,14 +0,0 @@
name=expect
version=5.45
dlextract "https://sourceforge.net/projects/$name/files/Expect/$version/$name$version.tar.gz" \
"44e1a4f4c877e9ddc5a542dfa7ecc92b"
header_end
cd "$name$version"
sed -i 's:/usr/local/bin:/bin:' configure
./configure --prefix=/tools --with-tcl=/tools/lib --with-tclinclude=/tools/include
make; make DESTDIR="$dir_install" SCRIPTS="" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

1038
graveyard/first_attempt/tools/satellites/extrafiles/busybox/busybox.config

File diff suppressed because it is too large

84
graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-ca.sh

@ -1,84 +0,0 @@
#!/bin/sh
# Begin make-ca.sh
# Script to populate OpenSSL's CApath from a bundle of PEM formatted CAs
#
# The file certdata.txt must exist in the local directory
# Version number is obtained from the version of the data.
#
# Authors: DJ Lucas
# Bruce Dubbs
#
# Version 20120211
certdata="certdata.txt"
if [ ! -r $certdata ]; then
echo "$certdata must be in the local directory"
exit 1
fi
TEMPDIR=$(mktemp -d)
BUNDLE="ca-certificates.crt"
CONVERTSCRIPT="make-cert.pl"
mkdir "${TEMPDIR}/certs"
# Get a list of starting lines for each cert
CERTBEGINLIST=$(grep -n "^# Certificate" "${certdata}" | cut -d ":" -f1)
# Get a list of ending lines for each cert
CERTENDLIST=`grep -n "^CKA_TRUST_STEP_UP_APPROVED" "${certdata}" | cut -d ":" -f 1`
# Start a loop
for certbegin in ${CERTBEGINLIST}; do
for certend in ${CERTENDLIST}; do
if test "${certend}" -gt "${certbegin}"; then
break
fi
done
# Dump to a temp file with the name of the file as the beginning line number
sed -n "${certbegin},${certend}p" "${certdata}" > "${TEMPDIR}/certs/${certbegin}.tmp"
done
unset CERTBEGINLIST CERTDATA CERTENDLIST certbegin certend
mkdir -p certs
rm -f certs/* # Make sure the directory is clean
for tempfile in ${TEMPDIR}/certs/*.tmp; do
# Make sure that the cert is trusted...
grep "CKA_TRUST_SERVER_AUTH" "${tempfile}" | \
egrep "TRUST_UNKNOWN|NOT_TRUSTED" > /dev/null
if test "${?}" = "0"; then
# Throw a meaningful error and remove the file
cp "${tempfile}" tempfile.cer
perl ${CONVERTSCRIPT} > tempfile.crt
keyhash=$(openssl x509 -noout -in tempfile.crt -hash)
echo "Certificate ${keyhash} is not trusted! Removing..."
rm -f tempfile.cer tempfile.crt "${tempfile}"
continue
fi
# If execution made it to here in the loop, the temp cert is trusted
# Find the cert data and generate a cert file for it
cp "${tempfile}" tempfile.cer
perl ${CONVERTSCRIPT} > tempfile.crt
keyhash=$(openssl x509 -noout -in tempfile.crt -hash)
mv tempfile.crt "certs/${keyhash}.pem"
rm -f tempfile.cer "${tempfile}"
echo "Created ${keyhash}.pem"
done
# Remove blacklisted files
# MD5 Collision Proof of Concept CA
if test -f certs/8f111d69.pem; then
echo "Certificate 8f111d69 is not trusted! Removing..."
rm -f certs/8f111d69.pem
fi
# Finally, generate the bundle and clean up.
cat certs/*.pem > ${BUNDLE}
rm -r "${TEMPDIR}"

49
graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-cert.pl

@ -1,49 +0,0 @@
#!/usr/bin/perl -w
# Used to generate PEM encoded files from Mozilla certdata.txt.
# Run as ./make-cert.pl > certificate.crt
#
# Parts of this script courtesy of RedHat (mkcabundle.pl)
#
# This script modified for use with single file data (tempfile.cer) extracted
# from certdata.txt, taken from the latest version in the Mozilla NSS source.
# mozilla/security/nss/lib/ckfw/builtins/certdata.txt
#
# Authors: DJ Lucas
# Bruce Dubbs
#
# Version 20120211
my $certdata = './tempfile.cer';
open( IN, "cat $certdata|" )
|| die "could not open $certdata";
my $incert = 0;
while ( <IN> )
{
if ( /^CKA_VALUE MULTILINE_OCTAL/ )
{
$incert = 1;
open( OUT, "|openssl x509 -text -inform DER -fingerprint" )
|| die "could not pipe to openssl x509";
}
elsif ( /^END/ && $incert )
{
close( OUT );
$incert = 0;
print "\n\n";
}
elsif ($incert)
{
my @bs = split( /\\/ );
foreach my $b (@bs)
{
chomp $b;
printf( OUT "%c", oct($b) ) unless $b eq '';
}
}
}

53
graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/remove-expired-certs.sh

@ -1,53 +0,0 @@
#!/bin/sh
# Begin /usr/sbin/remove-expired-certs.sh
#
# Version 20120211
# Make sure the date is parsed correctly on all systems
mydate()
{
local y=$( echo $1 | cut -d" " -f4 )
local M=$( echo $1 | cut -d" " -f1 )
local d=$( echo $1 | cut -d" " -f2 )
local m
if [ ${d} -lt 10 ]; then d="0${d}"; fi
case $M in
Jan) m="01";;
Feb) m="02";;
Mar) m="03";;
Apr) m="04";;
May) m="05";;
Jun) m="06";;
Jul) m="07";;
Aug) m="08";;
Sep) m="09";;
Oct) m="10";;
Nov) m="11";;
Dec) m="12";;
esac
certdate="${y}${m}${d}"
}
OPENSSL=/usr/bin/openssl
DIR=/etc/ssl/certs
if [ $# -gt 0 ]; then
DIR="$1"
fi
certs=$( find ${DIR} -type f -name "*.pem" -o -name "*.crt" )
today=$( date +%Y%m%d )
for cert in $certs; do
notafter=$( $OPENSSL x509 -enddate -in "${cert}" -noout )
date=$( echo ${notafter} | sed 's/^notAfter=//' )
mydate "$date"
if [ ${certdate} -lt ${today} ]; then
echo "${cert} expired on ${certdate}! Removing..."
rm -f "${cert}"
fi
done

21
graveyard/first_attempt/tools/satellites/extrafiles/stow/etc-stowrc.patch

@ -1,21 +0,0 @@
diff -ur stow-2.2.0-orig/bin/stow.in stow-2.2.0/bin/stow.in
--- stow-2.2.0-orig/bin/stow.in 2015-08-20 18:05:18.543173733 +0200
+++ stow-2.2.0/bin/stow.in 2015-08-20 18:05:58.844669895 +0200
@@ -577,15 +577,14 @@
# Parameters: none
# Returns : a list of default options
# Throws : no exceptions
-# Comments : prepends the contents of '~/.stowrc' and '.stowrc' to the command
+# Comments : prepends the contents of '/etc/stowrc', '~/.stowrc' and '.stowrc' to the command
# : line so they get parsed just like normal arguments. (This was
# : hacked in so that Emil and I could set different preferences).
#=============================================================================
sub get_config_file_options {
my @defaults = ();
- for my $file ("$ENV{HOME}/.stowrc", '.stowrc') {
+ for my $file ('/etc/stowrc', "$ENV{HOME}/.stowrc", '.stowrc') {
if (-r $file) {
- warn "Loading defaults from $file\n";
open my $FILE, '<', $file
or die "Could not open $file for reading\n";
while (my $line = <$FILE>){

13
graveyard/first_attempt/tools/satellites/extrafiles/stow/fix-warning-message-perl5.20.patch

@ -1,13 +0,0 @@
# Source: ArchLinux (https://projects.archlinux.org/svntogit/community.git/tree/trunk/01-fix-warning-message-perl5.20.patch?h=packages/stow)
# https://projects.archlinux.org/svntogit/community.git/plain/trunk/01-fix-warning-message-perl5.20.patch?h=packages/stow
--- a/lib/Stow.pm.in 2012-02-18 20:33:34.000000000 +0000
+++ b/lib/Stow.pm.in 2014-06-08 22:46:03.420893651 +0100
@@ -1732,7 +1732,7 @@
}
elsif (-l $path) {
debug(4, " read_a_link($path): real link");
- return readlink $path
+ (return readlink $path)
or error("Could not read link: $path");
}
internal_error("read_a_link() passed a non link path: $path\n");

13
graveyard/first_attempt/tools/satellites/gawk.sat

@ -1,13 +0,0 @@
name=gawk
version=4.1.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"97f8f44149ea9b9e94be97f68988be87"
header_end
cd "$name-$version"
./configure --prefix=/tools
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

67
graveyard/first_attempt/tools/satellites/gcc-1.sat

@ -1,67 +0,0 @@
name=gcc
version=5.2.0
gmp_shortver=6.0.0
gmp_version=${gmp_shortver}a
mpfr_version=3.1.3
mpc_version=1.0.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
"a51bcfeb3da7dd4c623e27207ed43467"
download "https://ftp.gnu.org/gnu/gmp/gmp-$gmp_version.tar.xz" \
"1e6da4e434553d2811437aa42c7f7c76"
download "https://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \
"6969398cd2fbc56a6af570b5273c56a9"
download "https://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \
"d6a1d5f8ddea3abd2cc3e98f58352d26"
header_end
cd "$name-$version"
extract "gmp-$gmp_version.tar.xz"
extract "mpfr-$mpfr_version.tar.xz"
extract "mpc-$mpc_version.tar.gz"
mv "gmp-$gmp_shortver" gmp
mv "mpfr-$mpfr_version" mpfr
mv "mpc-$mpc_version" mpc
for file in \
$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
cp -u $file $file.orig
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
mkdir "../$name-build"; cd "../$name-build"
"../$name-$version/configure" \
--target="$target" \
--prefix=/tools \
--with-glibc-version=2.11 \
--with-sysroot="$dir_install" \
--with-newlib \
--without-headers \
--with-local-prefix=/tools \
--with-native-system-header-dir=/tools/include \
--disable-nls \
--disable-shared \
--disable-multilib \
--disable-decimal-float \
--disable-threads \
--disable-libatomic \
--disable-libgomp \
--disable-libquadmath \
--disable-libssp \
--disable-libvtv \
--disable-libstdcxx \
--enable-languages=c,c++
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

63
graveyard/first_attempt/tools/satellites/gcc-2.sat

@ -1,63 +0,0 @@
name=gcc
version=5.2.0
gmp_shortver=6.0.0
gmp_version=${gmp_shortver}a
mpfr_version=3.1.3
mpc_version=1.0.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
"a51bcfeb3da7dd4c623e27207ed43467"
download "https://ftp.gnu.org/gnu/gmp/gmp-$gmp_version.tar.xz" \
"1e6da4e434553d2811437aa42c7f7c76"
download "https://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \
"6969398cd2fbc56a6af570b5273c56a9"
download "https://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \
"d6a1d5f8ddea3abd2cc3e98f58352d26"
header_end
cd "$name-$version"
extract "gmp-$gmp_version.tar.xz"
extract "mpfr-$mpfr_version.tar.xz"
extract "mpc-$mpc_version.tar.gz"
mv "gmp-$gmp_shortver" gmp
mv "mpfr-$mpfr_version" mpfr
mv "mpc-$mpc_version" mpc
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
"$(dirname "$($target-gcc -print-libgcc-file-name)")/include-fixed/limits.h"
for file in \
$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
cp -u $file $file.orig
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
mkdir "../$name-build"; cd "../$name-build"
CC="$target-gcc" \
CXX="$target-g++" \
AR="$target-ar" \
RANLIB="$target-ranlib" \
"../$name-$version/configure" \
--prefix=/tools \
--with-local-prefix=/tools \
--with-native-system-header-dir=/tools/include \
--enable-languages=c,c++ \
--disable-libstdcxx-pch \
--disable-multilib \
--disable-bootstrap \
--disable-libgomp
make; make DESTDIR="$dir_install" install
ln -s gcc "$dir_install/tools/bin/cc"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

24
graveyard/first_attempt/tools/satellites/glibc.sat

@ -1,24 +0,0 @@
name=glibc
version=2.22
dlextract "https://ftp.gnu.org/gnu/libc/$name-$version.tar.xz" \
"e51e02bf552a0a1fbbdc948fb2f5e83c"
header_end
mkdir "$name-build"; cd "$name-build"
"../$name-$version/configure" \
--prefix=/tools \
--host="$target" \
--build="$(../$name-$version/scripts/config.guess)" \
--disable-profile \
--enable-kernel=2.6.32 \
--enable-obsolete-rpc \
--with-headers=/tools/include \
libc_cv_forced_unwind=yes \
libc_cv_ctors_header=yes \
libc_cv_c_cleanup=yes
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

21
graveyard/first_attempt/tools/satellites/libstdcxx.sat

@ -1,21 +0,0 @@
name=gcc
version=5.2.0
dlextract "https://ftp.gnu.org/gnu/gcc/$name-$version/$name-$version.tar.bz2" \
"a51bcfeb3da7dd4c623e27207ed43467"
header_end
mkdir "$name-build"; cd "$name-build"
"../$name-$version/libstdc++-v3/configure" \
--host="$target" \
--prefix=/tools \
--disable-multilib \
--disable-nls \
--disable-libstdcxx-threads \
--disable-libstdcxx-pch \
--with-gxx-include-dir="/tools/$target/include/c++/$version"
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/linux-api.sat

@ -1,13 +0,0 @@
name=linux
version=4.1.6
dlextract "https://www.kernel.org/pub/$name/kernel/v4.x/$name-$version.tar.xz" \
"1dae0c808e34164cab3dfd57be88bd53"
header_end
cd "$name-$version"
make mrproper
make INSTALL_HDR_PATH="$dir_install/tools" headers_install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/m4.sat

@ -1,13 +0,0 @@
name=m4
version=1.4.17
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"12a3c829301a4fd6586a57d3fcf196dc"
header_end
cd "$name-$version"
./configure --prefix=/tools
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/make.sat

@ -1,13 +0,0 @@
name=make
version=4.1
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"57a7a224a822f94789a587ccbcedff69"
header_end
cd "$name-$version"
./configure --prefix=/tools --without-guile
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/openssl.sat

@ -1,13 +0,0 @@
name=openssl
version=1.0.2d
dlextract "https://www.openssl.org/source/$name-$version.tar.gz" \
"38dd619b2e77cbac69b99f52a053d25a"
header_end
cd "$name-$version"
./config --prefix=/tools shared
make all; make INSTALL_PREFIX="$dir_install" install_sw
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/first_attempt/tools/satellites/perl.sat

@ -1,17 +0,0 @@
name=perl
version=5.22.0
dlextract "http://www.cpan.org/src/5.0/$name-$version.tar.gz" \
"e32cb6a8dda0084f2a43dac76318d68d"
header_end
cd "$name-$version"
sh Configure -des -Dprefix=/tools -Dlibs=-lm
make
cp perl "$dir_install/tools/bin"
mkdir -p "$dir_install/tools/lib/perl5"
cp -r lib "$dir_install/tools/lib/perl5/$version"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

18
graveyard/first_attempt/tools/satellites/stow.sat

@ -1,18 +0,0 @@
name=stow
version=2.2.0
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"5bb56592eff9aaf9dfb6c975b3004240"
extrafile "fix-warning-message-perl5.20.patch"
extrafile "etc-stowrc.patch"
header_end
cd "$name-$version"
patch -p1 -i "../fix-warning-message-perl5.20.patch"
patch -p1 -i "../etc-stowrc.patch"
./configure --prefix=/tools
make DESTDIR="$dir_install" install-exec-am install-pmDATA install-dist_pmstowDATA
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/first_attempt/tools/satellites/tcl-core.sat

@ -1,17 +0,0 @@
name=tcl
fullname=$name-core
majver=8.6
version=$majver.4
dlextract "https://sourceforge.net/projects/tcl/files/Tcl/$version/$fullname$version-src.tar.gz" \
"8b8c9d85469d8dbe32e51117b8ef11e3"
header_end
cd "$name$version/unix"
./configure --prefix=/tools
make; make DESTDIR="$dir_install" install install-private-headers
chmod u+w "$dir_install/tools/lib/libtcl$majver.so"
ln -s tclsh$majver "$dir_install/tools/bin/tclsh"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

53
graveyard/first_attempt/tools/version-check.sh

@ -1,53 +0,0 @@
#!/bin/bash
# Simple script to list version numbers of critical development tools
# Copied from LFS 7.7
export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4
echo "/bin/sh -> `readlink -f /bin/sh`"
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1
if [ -h /usr/bin/yacc ]; then
echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
elif [ -x /usr/bin/yacc ]; then
echo yacc is `/usr/bin/yacc --version | head -n1`
else
echo "yacc not found"
fi
bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
diff --version | head -n1
find --version | head -n1
gawk --version | head -n1
if [ -h /usr/bin/awk ]; then
echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
elif [ -x /usr/bin/awk ]; then
echo yacc is `/usr/bin/awk --version | head -n1`
else
echo "awk not found"
fi
gcc --version | head -n1
g++ --version | head -n1
ldd --version | head -n1 | cut -d" " -f2- # glibc version
grep --version | head -n1
gzip --version | head -n1
cat /proc/version
m4 --version | head -n1
make --version | head -n1
patch --version | head -n1
echo Perl `perl -V:version`
sed --version | head -n1
tar --version | head -n1
makeinfo --version | head -n1
xz --version | head -n1
curl --version | head -n1
echo 'main(){}' > dummy.c && g++ -o dummy dummy.c
if [ -x dummy ]
then echo "g++ compilation OK";
else echo "g++ compilation failed"; fi
rm -f dummy.c dummy

161
graveyard/freshnaut

@ -1,161 +0,0 @@
#!/bin/sh -e
# A script to check for satellite updates.
# It just downloads the documents which should be updated when the software has an update.
# It's a shitty method, but it kinda works... Other than having a lot of false-positives.
_show_help() {
echo "This program will help keep your satellites fresh and up to date.
Usage: $0 <[\$dir_satellites] [\$_dir_fresh]|ignore <diff> <ignorediff>>
\$dir_satellites = The directory where all the satellites are you want to update.
\$_dir_fresh = The directory that will be used to keep all the files for checking.
ignore = Use this option to generate an ignorediff.
diff = A diff file. Generated without -u or any other fancy options.
ignorediff = A file containing the differences to be ignored (this file will be appended to).
The variables (starting with \$) can also be set from a configuration file."
}
get_variable() {
printf "
download() { :; }
extract() { :; }
getfile() { :; }
extrafile() { :; }
dlextract() { :; }
dlfile() { :; }
header_end() { echo \$$1; exit; }
. %s
" $2 | sh
}
download() {
$(echo "$cmd_download" | sed -e 's@{dst}@'"$2"'@g' -e 's@{src}@'"$1"'@g') 2> /dev/null
}
diff_extractlines() {
# Extract all the line numbers from a diff.
stage=0
for line in $(echo "$1" | awk '{print $1}'); do
if [ "$stage" = 0 ]; then
if [ "$line" != ">" -a "$line" != "<" ]; then
echo "$line"
stage=1
fi
elif [ "$stage" = 1 ]; then
if [ "$line" != ">" -a "$line" != "<" ]; then
if [ "$line" = "---" ]; then
stage=0
else
echo "$line"
fi
fi
fi
done
}
apply_ignorediff() {
# Filter a diff, only return the differences that shouldn't be ignored.
# TODO: This function is slow, due to the usage of awk on every line. A solution for this problem would be great.
stage=0
ignore=0
echo "$1" | while read line; do
first="$(echo "$line" | awk '{print $1}')"
if [ "$stage" = 0 ]; then
if [ "$first" != ">" -a "$first" != "<" ]; then
stage=1
ignore=0
if grep -e "^$line\$" "$2" > /dev/null; then
ignore=1
fi
fi
elif [ "$stage" = 1 ]; then
if [ "$first" != ">" -a "$first" != "<" ]; then
if [ "$line" = "---" ]; then
stage=0
else
ignore=0
if grep -e "^$line\$" "$2" > /dev/null; then
ingore=1
fi
fi
fi
fi
if [ "$ignore" = 0 ]; then
echo "$line"
fi
done
}
# Do something completely different when this option is provided.
if [ "$1" = "ignore" ]; then
if [ $# -lt 3 ]; then
_show_help
exit 1
fi
diff_extractlines "$(cat "$2")" >> "$3"
# Don't do anything else
exit
fi
# Load the config
cmd_download="curl -L -o {dst} {src}" # Command to execute to download files
[ -f /etc/astronaut.conf ] && . /etc/astronaut.conf
[ -f "$HOME/.astronaut.conf" ] && . "$HOME/.astronaut.conf"
# Override config with command-line parameters.
[ "$1" ] && dir_satellites="$1"
[ "$2" ] && _dir_fresh="$2"
if [ ! "$dir_satellites" -o ! "$_dir_fresh" ]; then
_show_help
exit 1
fi
mkdir -p "$_dir_fresh"
for sat in "$dir_satellites"/*.sat; do
update_url="$(get_variable update_url "$sat")"
name="$(basename "$sat" .sat)"
if [ "$update_url" ]; then
printf "Checking: $name..."
cols="$(expr $(tput cols) - $(printf "Checking: $name..." | wc -c))"
download "$update_url" "$_dir_fresh/$name.fresh"
if [ -f "$_dir_fresh/$name" ]; then
check="$(diff "$_dir_fresh/$name" "$_dir_fresh/$name.fresh" || true)"
if [ -f "$_dir_fresh/$name.ignorediff" ]; then
check="$(apply_ignorediff "$check" "$_dir_fresh/$name.ignorediff")"
fi
if [ "$check" ]; then
printf "%${cols}s\n" "Update detected"
echo "$check" >> "$_dir_fresh/$name-$(date +%Y%m%d%H%M%S).diff"
else
printf "\n"
fi
else
printf "%${cols}s\n" "First update check, creating new file"
download "$update_url" "$_dir_fresh/$name.checkfresh"
check="$(diff "$_dir_fresh/$name.fresh" "$_dir_fresh/$name.checkfresh" || true)"
if [ "$check" ]; then
echo "$(diff_extractlines "$check")" >> "$_dir_fresh/$name.ignorediff"
echo "> Created ignorediff"
fi
rm "$_dir_fresh/$name.checkfresh"
fi
mv "$_dir_fresh/$name.fresh" "$_dir_fresh/$name"
fi
done

6
graveyard/freshnaut.cause_of_death

@ -1,6 +0,0 @@
Freshnaut died on 19 december 2015.
It's latest known update was 4 november of the same year.
Birth date is unknown.
Cause of death:
I've started working on freshnaut as a way of checking software for updates with as little missed updates as possible. At the time, I thought regex methods were prone to missing a lot of updates, and while they do, this method is even worse. Yes, diffing websites is hell. The only websites this worked on were things like palemoon, but even that one updated a few times for halloween and other unnecessary things. As soon as you get into generated websites like sourceforge, everything changes every time you fetch it, and even if you try to ignore some ever-changing lines, you'll start noticing every single update they do to their site anyway (they even have some line in the file which tells the page's version). So, I've started doing a different approach (this time in lua), which relies on regex shenanigans, but that's all handled by the implementation, as the satellite writer doesn't have to worry about it too much.

106
graveyard/internaut

@ -1,106 +0,0 @@
#!/bin/sh -e
# This is a very hacky script to generate satellites.
# A honestly shitty attempt to auto-generate satellites.
astronaut="$(dirname "$0")/astronaut"
[ ! -f "$astronaut" ] && astronaut="astronaut"
# TODO: These variables won't always be valid
dir_build="$PWD/build"
dir_source="$PWD/source"
dir_install="$PWD/install"
tempdir="/tmp/internaut"
rm -rf "$tempdir"
mkdir -p "$tempdir"
intshell() {
# This is the most hacky part in the script, so bear with me.
# Why this is even a thing, is because I need two things:
# - Run some commands on start
# - Capture all input
# I'm sure "tee ouput | bash --rcfile filewithcommands" would effectively do the same thing, but fuck bash.
echo "Entering shell..."
cmdfifo="$tempdir/cmdfifo"
waitfifo="$tempdir/waitfifo"
mkfifo "$cmdfifo" 2> /dev/null || true
mkfifo "$waitfifo" 2> /dev/null || true
sh -s < "$cmdfifo" "$pkgfile" &
shpid=$!
echo ". \"$astronaut\"; set +e; echo \$PWD > \"$waitfifo\"; cat \"$waitfifo\"" > "$cmdfifo"
while ps -p $shpid > /dev/null; do
printf "$(cat "$waitfifo")> "
read cmd
case "$cmd" in
exit) ;;
!*) cmd="$(echo "$cmd" | cut -c 2-)" ;;
*) echo "$cmd" >> "$pkgfile" ;;
esac
echo "$cmd" > "$cmdfifo"
echo "echo \$PWD > \"$waitfifo\"; cat \"$waitfifo\"" > "$cmdfifo"
printf '' > "$waitfifo"
done
rm -f "$waitfifo" "$cmdfifo"
echo 'End shell.'
}
# The rest of this script is your olde gather info stuff.
printf 'Package name: '
read pkgname
pkgfile="$PWD/$pkgname.sat"
echo "# Generated with internaut. Please revise and edit." > "$pkgfile"
echo >> "$pkgfile"
printf 'Software name [enter for same as package]: '
read name
if [ "$name" ]; then
echo "name=$name" >> "$pkgfile"
else
echo "name=$pkgname" >> "$pkgfile"
fi
printf 'Version: '
read version
echo "version=$version" >> "$pkgfile"
printf 'Update URL: '
read update_url
echo "update_url=\"$update_url\"" >> "$pkgfile"
echo >> "$pkgfile"
# Now we ask the user to fetch the files they need.
echo '=> Header'
intshell
# Generate the md5sums, append them to the satellite, for manual inspection.
for file in $(find "$dir_source" -type f); do
printf '# ' >> "$pkgfile"
md5sum "$file" >> "$pkgfile"
done
printf 'header_end\n\n' >> "$pkgfile"
# Now we ask the user to build and install the program in question.
echo '=> Build'
intshell
# Replacing all the instances of the name and the version with the variable.
#sed -i -e "s/$name/\$name/g" -e "s/$version/\$version/g" -e "s/name=\$name/name=$name/g" -e "s/version=\$version/version=$version/g" "$pkgfile"
# TODO: Why dun dis shit work?
# The usual vim config line.
printf '\n# vim:set tabstop=4 shiftwidth=4 syntax=sh et:\n' >> "$pkgfile"
rm -rf "$tempdir"

6
graveyard/internaut.cause_of_death

@ -1,6 +0,0 @@
Internaut died on 14 november 2015.
It's latest known update was 31 october of the same year.
Birth date is unknown.
Cause of death:
I initially wanted something that could generate satellites easily, and after hacking together internaut, I may have used it one or two times, but that was it. I haven't touched it in a few months and it's latest update has been to change the way the astronaut program is found. It just isn't practical, and the implementation is awful. After deciding I wanted to make some changes to the way satellites work, I've come to realize that maintaining it is more work than it's worth.

14
graveyard/unmaintained_satellites/3dsfat16tool.sat

@ -1,14 +0,0 @@
name=3DSFAT16tool
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" \
'c4a2a0d4e8eed7b882ea090ccdb2e929'
header_end
cd "$name-$version"
cc -O3 "$name.c" -o "$name"
install -Dm755 "$name" "$dir_install/$dir_prefix/bin/$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/unmaintained_satellites/3dstool-git.sat

@ -1,13 +0,0 @@
import 'compile/cmake'
import 'vcs/git'
name=3dstool
vcs_git "https://github.com/dnasdw/$name"
header_end
cd "$name"
compile_cmake -I
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "bin/Release/$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

16
graveyard/unmaintained_satellites/3dstool.sat

@ -1,16 +0,0 @@
import 'compile/cmake'
name=3dstool
version=1.0.18 # TODO: Untested
update_url="https://github.com/dnasdw/$name/releases"
update_names="/archive/v$version.tar.gz"
dlextract "https://github.com/dnasdw/$name/archive/v$version.tar.gz" \
'cfba027c749b4b600dae36f508f0af48'
header_end
cd "$name-$version"
compile_cmake -I
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "bin/Release/$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

19
graveyard/unmaintained_satellites/apulse.sat

@ -1,19 +0,0 @@
import 'compile/cmake'
name=apulse
version=0.1.7
update_url="https://github.com/i-rinat/$name/releases"
dlextract "https://github.com/i-rinat/$name/archive/v$version.tar.gz" \
'd489c93132fd201037372d3d9caf62ba'
header_end
cd "$name-$version"
compile_cmake -I
install -Dm755 -t "$dir_install/$dir_prefix/$dir_libdir" \
build/libpulse-simple.so.0 build/libpulse.so.0 build/libpulsecommon-5.0.so
ln -s libpulse-simple.so.0 "$dir_install/$dir_prefix/$dir_libdir/libpulse-simple.so"
ln -s libpulse.so.0 "$dir_install/$dir_prefix/$dir_libdir/libpulse.so"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

15
graveyard/unmaintained_satellites/bam.sat

@ -1,15 +0,0 @@
name=bam
version=0.5.1
revision=a23a89d580a0408ca330ab42857157e443ec9b6f
#update_url="https://github.com/matricks/$name/releases" -- Disabled temporarily until new version (0.5.1) is tagged. Development seems stagnant lately though.
dlextract "https://github.com/matricks/$name/archive/$revision.tar.gz" \
'590b81a95a927eff56d4f4c7462eaafd'
header_end
cd "$name-$revision"
make
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

15
graveyard/unmaintained_satellites/bctoolbox.sat

@ -1,15 +0,0 @@
import 'compile/cmake'
name=bctoolbox
version=0.4.0
update_url="https://github.com/BelledonneCommunications/$name/releases"
update_names="/archive/$version.tar.gz"
dlextract "https://github.com/BelledonneCommunications/$name/archive/$version.tar.gz" \
'963e0a83feda8b0a6c10d646573aae28'
header_end
cd "$name-$version"
compile_cmake -- -DENABLE_TESTS=OFF -DENABLE_TESTS_COMPONENT=OFF -DENABLE_STATIC=OFF
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

13
graveyard/unmaintained_satellites/bcunit-git.sat

@ -1,13 +0,0 @@
import 'vcs/git'
import 'compile/configure'
name=bcunit
vcs_git "https://github.com/BelledonneCommunications/$name"
header_end
cd "$name"
./autogen.sh
compile_configure
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

14
graveyard/unmaintained_satellites/bin/default_arm7.sat

@ -1,14 +0,0 @@
name=default_arm7
libname=libnds
version=0.6.0
update_url="https://sourceforge.net/projects/devkitpro/files/default arm7/"
update_names="<tr title=\"$version\" class=\"folder \">"
download "https://sourceforge.net/projects/devkitpro/files/default arm7/$version/$name-$version.tar.bz2" \
"11cf9d749c3d346ca35c5d586364fad3"
header_end
mkdir -p "$dir_install/opt/devkitPRO/$libname"
extract "$name-$version.tar.bz2" "$dir_install/opt/devkitPRO/$libname"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/unmaintained_satellites/bin/extrafiles/palemoon/palemoon.desktop

@ -1,13 +0,0 @@
[Desktop Entry]
Version=1.0
Name=Pale Moon Web Browser
Comment=Browse the World Wide Web
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=palemoon %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=palemoon
Categories=Network;WebBrowser;Internet
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true

14
graveyard/unmaintained_satellites/bin/libfat-nds.sat

@ -1,14 +0,0 @@
name=libfat-nds
libname=libnds
version=1.0.14
update_url="https://sourceforge.net/projects/devkitpro/files/libfat/"
update_names="<tr title=\"$version\" class=\"folder \">"
download "https://sourceforge.net/projects/devkitpro/files/libfat/$version/$name-$version.tar.bz2" \
"cc1712a56c8b0c133974936c69599f0e"
header_end
mkdir -p "$dir_install/opt/devkitPRO/$libname"
extract "$name-$version.tar.bz2" "$dir_install/opt/devkitPRO/$libname"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/unmaintained_satellites/bin/libnds.sat

@ -1,13 +0,0 @@
name=libnds
version=1.5.12
update_url="https://sourceforge.net/projects/devkitpro/files/$name/"
update_names="<tr title=\"$version\" class=\"folder \">"
download "https://sourceforge.net/projects/devkitpro/files/$name/$version/$name-$version.tar.bz2" \
"49f4e8dfee73c3fd9897cf314eb6d359"
header_end
mkdir -p "$dir_install/opt/devkitPRO/$name"
extract "$name-$version.tar.bz2" "$dir_install/opt/devkitPRO/$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/unmaintained_satellites/bluez-alsa-git.sat

@ -1,13 +0,0 @@
import 'vcs/git'
import 'compile/configure'
name=bluez-alsa
vcs_git "https://github.com/Arkq/$name"
header_end
cd "$name"
autoreconf -fi
compile_configure -- --enable-aac --enable-debug --disable-static
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

32
graveyard/unmaintained_satellites/broadcom-wl.sat

@ -1,32 +0,0 @@
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'
dlfile "https://aur.archlinux.org/cgit/aur.git/plain/$name-dkms.conf?h=$name-dkms&id=cea4c9bc92dab37ed89d2c68e9ce0a3896f34d71" \
'b6e8ae4cf217bf68dcf08599bf43fce4'
dlfile "https://aur.archlinux.org/cgit/aur.git/plain/001-null-pointer-fix.patch?h=$name-dkms&id=cea4c9bc92dab37ed89d2c68e9ce0a3896f34d71" \
'fabbf528164f5e3a9dcf46f46a678f86'
dlfile "https://aur.archlinux.org/cgit/aur.git/plain/002-rdtscl.patch?h=$name-dkms&id=cea4c9bc92dab37ed89d2c68e9ce0a3896f34d71" \
'76c168a0271cb57d2539a10877979fbd'
dlfile "https://aur.archlinux.org/cgit/aur.git/plain/003-linux47.patch?h=$name-dkms&id=cea4c9bc92dab37ed89d2c68e9ce0a3896f34d71" \
'c5074307a37698b11780237beb8f52b2'
dlfile "https://aur.archlinux.org/cgit/aur.git/plain/004-linux48.patch?h=$name-dkms&id=cea4c9bc92dab37ed89d2c68e9ce0a3896f34d71" \
'6ba8d147afe6112112b03af593ae38a0'
header_end
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
patch -p1 -i 003-linux47.patch
patch -p1 -i 004-linux48.patch
make KBUILD_DIR="$dir_sysroot/lib/modules/$kver/build"
install -Dm644 -t "$dir_install/lib/modules/$kver/kernel/drivers/net/wireless" wl.ko
install -Dm644 "$name-dkms.conf" "$dir_install/$dir_sysconfdir/modprobe.d/$name.conf"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

14
graveyard/unmaintained_satellites/cabextract.sat

@ -1,14 +0,0 @@
import 'compile/configure'
name=cabextract
version=1.6
update_url='http://cabextract.org.uk/'
dlextract "http://cabextract.org.uk/$name-$version.tar.gz" \
'ee3ded0b1f84e5c6e3309bb36d701916'
header_end
cd "$name-$version"
compile_configure
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

14
graveyard/unmaintained_satellites/ctrtool.sat

@ -1,14 +0,0 @@
name=Project_CTR
version=0.15
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'
header_end
cd "$name-$version/ctrtool"
make
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" ctrtool
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

14
graveyard/unmaintained_satellites/ctrulib-bin.sat

@ -1,14 +0,0 @@
name=ctrulib
libname=libctru
version=1.1.0
update_url="https://sourceforge.net/projects/devkitpro/files/$libname/"
update_names="<tr title=\"$version\" class=\"folder \">"
download "https://sourceforge.net/projects/devkitpro/files/$libname/$version/$libname-$version.tar.bz2" \
'9c65ae1f9474a03a727d346c6507d4b4'
header_end
mkdir -p "$dir_install/$dir_prefix/$dir_libdir/devkitPRO/$libname"
extract "$libname-$version.tar.bz2" "$dir_install/$dir_prefix/$dir_libdir/devkitPRO/$libname"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

11
graveyard/unmaintained_satellites/ctrulib-git.sat

@ -1,11 +0,0 @@
import 'vcs/git'
name=ctrulib
vcs_git "https://github.com/smealum/$name"
header_end
cd "$name/libctru"
make DEVKITPRO="$dir_install/$dir_prefix/$dir_libdir/devkitPRO" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

16
graveyard/unmaintained_satellites/devkitarm-bin.sat

@ -1,16 +0,0 @@
name=devkitARM
version=r45
update_url="https://sourceforge.net/projects/devkitpro/files/$name/"
update_names="/$name/${name}_$version/"
download "https://sourceforge.net/projects/devkitpro/files/$name/${name}_$version/${name}_$version-x86_64-linux.tar.bz2" \
'660dd47bae0e4b70a0a649b4bc833e33'
extrafile 'devkitarm.sh'
header_end
mkdir -p "$dir_install/$dir_prefix/$dir_libdir/devkitPRO"
extract "${name}_$version-x86_64-linux.tar.bz2" "$dir_install/$dir_prefix/$dir_libdir/devkitPRO"
sed -i -e "s/%DEVKITPRO%/$(safe_sed "$dir_sysroot/$dir_prefix/$dir_libdir/devkitPRO")/g" devkitarm.sh
install -Dm755 -t "$dir_install/$dir_sysconfdir/profile.d/" devkitarm.sh
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

7
graveyard/unmaintained_satellites/extrafiles/nxengine/nxengine.desktop

@ -1,7 +0,0 @@
[Desktop Entry]
Name=NXEngine (Cave Story)
Comment=A clone/engine-rewrite of the classic jump-and-run platformer Cave Story/Doukutsu Monogatari
Exec=nxengine
Icon=nxengine
Type=Application
Categories=Game;AdventureGame;

BIN
graveyard/unmaintained_satellites/extrafiles/nxengine/nxengine.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 B

24
graveyard/unmaintained_satellites/extrafiles/nxengine/nxengine.sh

@ -1,24 +0,0 @@
#!/bin/sh -e
dir_prefix="%PREFIX%"
dir_runtime="%RUNTIME%"
dir_libdir="%LIBDIR%"
dir_datadir="%DATADIR%"
files="
$dir_libdir/nxengine/nx
$dir_datadir/nxengine/font.ttf
$dir_datadir/nxengine/smalfont.bmp
$dir_datadir/nxengine/sprites.sif
$dir_datadir/nxengine/tilekey.dat
$dir_datadir/nxengine/Doukutsu.exe
$dir_datadir/nxengine/data
"
mkdir -p "$dir_runtime"
for file in $files; do
[ ! -L "$dir_runtime/$(basename "$file")" ] && ln -sf -t "$dir_runtime" "$dir_prefix/$file"
done
cd "$dir_runtime" && ./nx

14
graveyard/unmaintained_satellites/fdk-aac.sat

@ -1,14 +0,0 @@
import 'compile/configure'
name=fdk-aac
version=0.1.4
update_url="https://sourceforge.net/projects/opencore-amr/files/$name/"
dlextract "https://sourceforge.net/projects/opencore-amr/files/$name/$name-$version.tar.gz" \
'e274a7d7f6cd92c71ec5c78e4dc9f8b7'
header_end
cd "$name-$version"
compile_configure -- --disable-static
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

15
graveyard/unmaintained_satellites/fluidsynth.sat

@ -1,15 +0,0 @@
import 'compile/configure'
name=fluidsynth
version=1.1.6
update_url="https://sourceforge.net/projects/$name/files/"
update_names="/files/$name-$version/"
dlextract "https://sourceforge.net/projects/$name/files/$name-$version/$name-$version.tar.bz2" \
'f6e696690e989098f70641364fdffad7'
header_end
cd "$name-$version"
compile_configure -- --disable-static
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

13
graveyard/unmaintained_satellites/gfm-git.sat

@ -1,13 +0,0 @@
import 'vcs/git'
import 'compile/configure'
name=tilp
vcs_git 'https://github.com/debrouxl/tilp_and_gfm'
header_end
cd tilp_and_gfm/gfm/trunk
autoreconf -fi
compile_configure
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

25
graveyard/unmaintained_satellites/giblib.sat

@ -1,25 +0,0 @@
import 'compile/configure'
name=giblib
majver=1.2.4
version=$majver-11
update_url="https://packages.debian.org/sid/${name}1"
update_names="${name}_$version.debian.tar.xz"
dlextract "http://http.debian.net/debian/pool/main/g/$name/${name}_$majver.orig.tar.gz" \
'598711e2cb631c59f6ad11cba4383f2c'
dlextract "http://http.debian.net/debian/pool/main/g/$name/${name}_$version.debian.tar.xz" \
'85d5fb2f8a78d23b3a7929f3f8828f44'
header_end
cd "$name-$majver.orig"
# Updating with debian patches as appropiate
for x in $(cat ../debian/patches/series); do
patch -p1 -i ../debian/patches/$x
done
autoreconf -fi
compile_configure -- --disable-static
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

15
graveyard/unmaintained_satellites/gtksourceview2.sat

@ -1,15 +0,0 @@
import 'compile/configure'
name=gtksourceview
majver=2.10
version=$majver.5 # I'm not sure why, but everybody seems to use this version.
update_url="https://download.gnome.org/sources/$name/cache.json"
dlextract "https://download.gnome.org/sources/$name/$majver/$name-$version.tar.bz2" \
'1219ad1694df136f126507466aeb41aa'
header_end
cd "$name-$version"
compile_configure
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

18
graveyard/unmaintained_satellites/heimdall.sat

@ -1,18 +0,0 @@
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'
header_end
cd "$name-$version/libpit"
./configure
make
cd "../heimdall"
compile_configure
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/unmaintained_satellites/include-what-you-use.sat

@ -1,15 +0,0 @@
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'
header_end
cd "$name"
compile_cmake -DIWYU_LLVM_LIB_PATH=/usr/lib -DIWYU_LLVM_INCLUDE_PATH=/usr/include/llvm
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/unmaintained_satellites/intel-ucode.sat

@ -1,17 +0,0 @@
name=intel-ucode
version=20160714
dlextract "https://downloadmirror.intel.com/26156/eng/microcode-$version.tgz" \
'84e4c0530dc38fd7b804daf894b1bdf9'
dlfile 'https://git.archlinux.org/svntogit/packages.git/plain/trunk/intel-microcode2ucode.c?h=packages/intel-ucode&id=98b27b5f007b03d50146864efb078cba99b772ad' \
'580276790cfc62dfd82b76085bd1e743'
header_end
cc $CFLAGS -o intel-microcode2ucode intel-microcode2ucode.c
./intel-microcode2ucode ./microcode.dat
install -Dm644 microcode.bin kernel/x86/microcode/GenuineIntel.bin
echo kernel/x86/microcode/GenuineIntel.bin | cpio -o -H newc -R 0:0 > intel-ucode.img
install -Dm644 -t "$dir_install/boot/" intel-ucode.img
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

15
graveyard/unmaintained_satellites/json-glib.sat

@ -1,15 +0,0 @@
import 'compile/configure'
name=json-glib
majver=1.2
version=$majver.2
update_url="https://download.gnome.org/sources/$name/cache.json"
dlextract "https://download.gnome.org/sources/$name/$majver/$name-$version.tar.xz" \
'c1daefb8d0fb59612af0c072c8aabb58'
header_end
cd "$name-$version"
compile_configure
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

23
graveyard/unmaintained_satellites/jsoncpp.sat

@ -1,23 +0,0 @@
import 'compile/cmake'
name=jsoncpp
version=1.7.7
update_url="https://github.com/open-source-parsers/$name/releases"
update_names="/archive/$version.tar.gz"
dlextract "https://github.com/open-source-parsers/$name/archive/$version.tar.gz" \
'9b51c65c563463220a8cb5fa33d525f8'
header_end
cd "$name-$version"
# Fix paths
sed -i -e "s/lib\${LIB_SUFFIX}\/pkgconfig/$(safe_sed "$dir_libdir/pkgconfig")/" CMakeLists.txt
compile_cmake -- \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DRUNTIME_INSTALL_DIR="/$dir_prefix/$dir_bindir" \
-DLIBRARY_INSTALL_DIR="/$dir_prefix/$dir_libdir"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

23
graveyard/unmaintained_satellites/kbuild.sat

@ -1,23 +0,0 @@
import 'vcs/svn'
name=kBuild
revision=2823
version=r$revision
vcs_svn 'http://svn.netlabs.org/repos/kbuild/trunk' 2823
header_end
cd trunk
rm -rf kBuild/bin # Remove prebuilts
variables="
NIX_INSTALL_DIR=/$dir_prefix
MY_INST_BIN=$dir_prefix/$dir_bindir/
MY_INST_DATA=$dir_prefix/$dir_datadir/$name/
MY_INST_DOC=$dir_prefix/$dir_docdir/$name/
"
kBuild/env.sh --full make -f bootstrap.gmk $variables
kBuild/env.sh --full-with-bin kmk $variables PATH_INS="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

14
graveyard/unmaintained_satellites/kexec-tools.sat

@ -1,14 +0,0 @@
import 'compile/configure'
name=kexec-tools
version=2.0.14
update_url='https://www.kernel.org/pub/linux/utils/kernel/kexec/'
dlextract "https://www.kernel.org/pub/linux/utils/kernel/kexec/$name-$version.tar.xz" \
'4164abff8ed21e9f94d57f535c2f77bf'
header_end
cd "$name-$version"
compile_configure
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

19
graveyard/unmaintained_satellites/kpartx.sat

@ -1,19 +0,0 @@
name=multipath-tools
version=0.6.4
revision=922421cf795d53d339862bb2d99f1a85c96ad9a3
update_url="http://git.opensvc.com/?p=$name/.git;a=tags"
update_names="href=\"/?p=$name/.git;a=shortlog;h=refs/tags/$version\""
download "http://git.opensvc.com/?p=$name/.git;a=snapshot;h=$revision;sf=tgz" \
'48e2c62e6216f57cfac166b3a4b387a7' \
"$name-$version.tar.gz"
header_end
extract "$name-$version.tar.gz"
cd "$name-$(echo "$revision" | cut -c -7)/kpartx"
make
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" kpartx
install -Dm655 -t "$dir_install/$dir_prefix/$dir_mandir/man8" kpartx.8
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

14
graveyard/unmaintained_satellites/libbsd.sat

@ -1,14 +0,0 @@
import 'compile/configure'
name=libbsd
version=0.8.3
update_url='https://libbsd.freedesktop.org/releases/'
dlextract "https://libbsd.freedesktop.org/releases/$name-$version.tar.xz" \
'e935c1bb6cc98a4a43cb1da22795493a'
header_end
cd "$name-$version"
compile_configure -- --disable-static
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

14
graveyard/unmaintained_satellites/libgdiplus.sat

@ -1,14 +0,0 @@
import 'compile/configure'
name=libgdiplus
version=4.2
update_url="https://download.mono-project.com/sources/$name/"
dlextract "https://download.mono-project.com/sources/$name/$name-$version.tar.gz" \
'3e68075aa0911d5ebc2b3739e85af0ea'
header_end
cd "$name-$version"
compile_configure -- --disable-static
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save