Browse Source

Add support for building slackware packages

master
mid-kid 9 years ago
parent
commit
d0bba0940c
  1. 23
      astronaut/astronautpkg
  2. 2
      satellites/astronaut.sat

23
astronaut/astronautpkg

@ -0,0 +1,23 @@
#!/bin/sh -e
# A hacky script to generate .t?z files using satellites.
# It's a fairly simple wrapper to astronaut, that generates a pkgtools package at the end.
# This may also serve as an example on how you can wrap astronaut to package in any format.
if [ "$(id -u)" != "0" ]; then
echo "This script has to be run as root" 1>&2
exit 1
fi
_topdir=$PWD
_astronaut="$(dirname "$0")/astronaut"
[ ! -f "$_astronaut" ] && _astronaut="astronaut"
_nuke_dir_install=true
. "$_astronaut"
# _dir_pkgtools should be set from a configuration file (e.g. ~/.astronaut.conf), and points to wherever you want your packages to be placed.
[ "$_dir_pkgtools" ] && mkdir -p "$_dir_pkgtools" || _dir_pkgtools="$_topdir"
cd "$dir_install"
makepkg -l y -c n "$_dir_pkgtools/$name-$version-$(uname -m)-astro.tgz"

2
satellites/astronaut.sat

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

Loading…
Cancel
Save