BuildSystem: Rewrite port compilation system
Now ports define some environment variables, and call a unified bash script that handles configuration, recompilation and installation. If a port uses non-configure buildsystem, port script can also specify custom build and install step.
This commit is contained in:
@@ -1,33 +1,17 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash ../install.sh
|
||||
|
||||
if [ -z $BANAN_ARCH ]; then
|
||||
echo "You must set the BANAN_ARCH environment variable" >&2
|
||||
exit 1
|
||||
fi
|
||||
NAME='doom'
|
||||
VERSION='git'
|
||||
DOWNLOAD_URL="https://github.com/ozkl/doomgeneric.git#613f870b6fa83ede448a247de5a2571092fa729d"
|
||||
|
||||
if [ -z $BANAN_SYSROOT ]; then
|
||||
echo "You must set the BANAN_ARCH environment variable" >&2
|
||||
exit 1
|
||||
fi
|
||||
build() {
|
||||
if [ ! -f doom1.wad ]; then
|
||||
wget https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad || exit 1
|
||||
fi
|
||||
make --directory doomgeneric --file Makefile.banan_os -j$(nproc) || exit 1
|
||||
}
|
||||
|
||||
cd $(dirname $(realpath $0))
|
||||
|
||||
if [ ! -d "doomgeneric" ]; then
|
||||
git clone https://github.com/ozkl/doomgeneric.git
|
||||
cd doomgeneric
|
||||
git checkout 613f870b6fa83ede448a247de5a2571092fa729d
|
||||
for patch in ../patches/*; do
|
||||
git am "$patch"
|
||||
done
|
||||
cd ..
|
||||
|
||||
grep -qxF doom ../installed || echo doom >> ../installed
|
||||
fi
|
||||
|
||||
if [ ! -f doom1.wad ]; then
|
||||
wget https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad
|
||||
fi
|
||||
|
||||
make --directory doomgeneric/doomgeneric --file Makefile.banan_os -j $(nproc)
|
||||
cp "doomgeneric/doomgeneric/build-${BANAN_ARCH}/doomgeneric" "${BANAN_SYSROOT}/bin/doom"
|
||||
cp doom1.wad $BANAN_SYSROOT/home/user/
|
||||
install() {
|
||||
cp doomgeneric/build/doom "${BANAN_SYSROOT}/bin/" || exit 1
|
||||
cp ./doom1.wad "$BANAN_SYSROOT/home/user/" || exit 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user