|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2009,2010 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2009,2010,2019 Damien Goutte-Gattat |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
# is permitted provided that the following conditions are met: |
|
|
@ -23,17 +23,17 @@ |
|
|
|
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
|
|
|
# |
|
|
|
# Latest snes9x sourcecode is available at: |
|
|
|
# <http://code.google.com/p/snes9x-gtk/>. |
|
|
|
# <https://github.com/snes9xgit/snes9x>. |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-snes9x} |
|
|
|
VERSION=${VERSION:-1.52} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-src.tar.bz2} |
|
|
|
WGET=${WGET:-http://snes9x-gtk.googlecode.com/files/$ARCHIVE} |
|
|
|
VERSION=${VERSION:-1.60} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
WGET=${WGET:-https://github.com/snes9xgit/snes9x/archive/$VERSION.tar.gz} |
|
|
|
|
|
|
|
# Build infos |
|
|
|
NAMEPKG=${NAMEPKG:-snes9x} |
|
|
|
BUILD=${BUILD:-2GGD} |
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')} |
|
|
|
JOBS=${JOBS:-1} |
|
|
|
EXT=${EXT:-txz} |
|
|
@ -74,7 +74,7 @@ if [ ! -r $ARCHIVE ]; then |
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
fi |
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
# Compile |
|
|
@ -82,23 +82,21 @@ cd $TMP |
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
cd $NAME/gtk |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
LDFLAGS="-lXext -lX11 -ldl" \ |
|
|
|
./configure \ |
|
|
|
--prefix=/usr \ |
|
|
|
--with-gtk \ |
|
|
|
--with-opengl |
|
|
|
make -j $JOBS |
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
meson --prefix /usr build . |
|
|
|
ninja -j $JOBS -C build |
|
|
|
DESTDIR=$PKG ninja -C build install |
|
|
|
|
|
|
|
# Strip binary |
|
|
|
strip --strip-unneeded $PKG/usr/bin/snes9x-gtk |
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 AUTHORS doc/{LICENSE,README} \ |
|
|
|
../unix/docs/readme_unix.html ../docs/* $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
install -m 644 AUTHORS ../LICENSE ../README.md ../docs/* \ |
|
|
|
../unix/docs/readme_unix.html $PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
# Copy slack-desc and doinst.sh files |
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh |
|
|
|
|
|
|
|
# Package the tree |
|
|
|
cd $PKG |
|
|
|