Browse Source

Dirs galore, because I need fine-tuning...

I actually wanted to try to avoid having to do something like this. I've thought about using options, but that'd allow each package to set their own default. This seemed the easiest way to handle all possible linux distributions, adhering to autoconf standards.
master
mid-kid 9 years ago
parent
commit
d6eb90fa4a
  1. 12
      astronaut/astronaut
  2. 16
      satellites/extrafiles/nxengine/nxengine.sh
  3. 2
      satellites/fakeroot.sat
  4. 2
      satellites/functions/compile/cmake.sh
  5. 6
      satellites/functions/compile/configure.sh
  6. 2
      satellites/functions/compile/python.sh
  7. 2
      satellites/functions/compile/qt.sh
  8. 6
      satellites/nxengine.sat

12
astronaut/astronaut

@ -13,14 +13,22 @@ dir_install='/var/tmp/astronaut/install' # Directory where the package will be
# Runtime directories
dir_sysroot='' # The root directory of the system
dir_prefix='/usr' # Prefix directory (for /bin, /lib, /include, /share and such)
dir_prefix='usr' # Prefix directory (for /bin, /lib, /include, /share and such)
# Finer-grained control of runtime dirs
# This can't be set from the command line, but might need to be adapted for your distro.
# Dirs always outside of $dir_prefix
dir_sysconfdir='etc'
# Dirs outside and inside of $dir_prefix
dir_bindir='bin'
dir_sbindir='sbin'
dir_libdir='lib'
# Dirs only inside of $dir_prefix
dir_libexecdir='libexec'
dir_datadir='share'
dir_mandir='share/man'
dir_docdir='share/doc'
dir_infodir='share/info'
@ -79,7 +87,7 @@ Usage: $0 [-sbipr <dir>] [-Id] [-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 45 $0 > astronaut.conf.example\` to generate a default configuration file.")
Tips:$([ "$(basename "$0")" = "astronaut" ] && printf "\n- Use \`head -n 55 $0 > 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.

16
satellites/extrafiles/nxengine/nxengine.sh

@ -2,15 +2,17 @@
dir_prefix="%PREFIX%"
dir_runtime="%RUNTIME%"
dir_libdir="%LIBDIR%"
dir_datadir="%DATADIR%"
files="
lib/nxengine/nx
share/nxengine/font.ttf
share/nxengine/smalfont.bmp
share/nxengine/sprites.sif
share/nxengine/tilekey.dat
share/nxengine/Doukutsu.exe
share/nxengine/data
$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"

2
satellites/fakeroot.sat

@ -15,6 +15,6 @@ header_end
cd "$name-$version"
#./bootstrap
compile_configure
compile_configure --disable-static
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

2
satellites/functions/compile/cmake.sh

@ -1,6 +1,6 @@
compile_cmake_base() {
mkdir -p build; cd build
cmake -DCMAKE_INSTALL_PREFIX="$dir_prefix" -DCMAKE_BUILD_TYPE=Release $@ ..
cmake -DCMAKE_INSTALL_PREFIX="/$dir_prefix" -DCMAKE_BUILD_TYPE=Release $@ ..
make
}

6
satellites/functions/compile/configure.sh

@ -1,15 +1,17 @@
compile_configure() {
./configure \
--prefix="$dir_prefix" \
--prefix="/$dir_prefix" \
--sysconfdir="/$dir_sysconfdir" \
--bindir="$dir_prefix/$dir_bindir" \
--sbindir="$dir_prefix/$dir_sbindir" \
--libdir="$dir_prefix/$dir_libdir" \
--libexecdir="$dir_prefix/$dir_libexecdir" \
--datadir="$dir_prefix/$dir_datadir" \
--mandir="$dir_prefix/$dir_mandir" \
--docdir="$dir_prefix/$dir_docdir/$name" \
--infodir="$dir_prefix/$dir_infodir" \
--localedir="$dir_prefix/$dir_localedir" \
--sysconfdir=/etc $@
$@
make
make DESTDIR="$dir_install/" install
}

2
satellites/functions/compile/python.sh

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

2
satellites/functions/compile/qt.sh

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

6
satellites/nxengine.sat

@ -26,7 +26,7 @@ sed -i -e '/g++/s/-o/$(CFLAGS) -o/g' nx/Makefile
make -C nx
# Install the nxengine executable
install -Dm755 nx/nx "$dir_install/$dir_prefix/lib/nxengine/nx"
install -Dm755 nx/nx "$dir_install/$dir_prefix/$dir_libdir/nxengine/nx"
# Install the necessary data
mkdir -p "$dir_install/$dir_prefix/share/nxengine"
@ -38,8 +38,10 @@ cp -r CaveStory/data "$dir_install/$dir_prefix/share/nxengine/data"
dir_runtime="$(option dir_runtime=\$HOME/.nxengine)"
sed -i -e "s/%PREFIX%/$(safe_sed "$dir_prefix")/" \
-e "s/%RUNTIME%/$(safe_sed "$dir_runtime")/" \
-e "s/%LIBDIR%/$(safe_sed "$dir_libdir")" \
-e "s/%DATADIR%/$(safe_sed "$dir_datadir")" \
nxengine.sh
install -Dm755 nxengine.sh "$dir_install/$dir_prefix/bin/nxengine"
install -Dm755 nxengine.sh "$dir_install/$dir_prefix/$dir_bindir/nxengine"
# Install desktop file and icon
install -Dm644 nxengine.png "$dir_install/$dir_prefix/share/pixmaps/nxengine.png"

Loading…
Cancel
Save