Pagina 1 di 1

Primo pacchetto

Inviato: dom 4 nov 2007, 19:00
da anycolouryoulike
Sto cercando di pacchettizzare DOSBox, un emulatore per i vecchi giochi per DOS.
Per dirla meglio ho preso lo SlackBuild di un pacchetto di Slacky e l'ho riadattato. :D
A chi volesse provarlo consiglio questo antico e bellissimo gioco http://popuw.com/index1.html.
Comunque questo è lo slack-desc:

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

       |-----handy-ruler------------------------------------------------------|
dosbox:
dosbox:                   http://dosbox.sourceforge.net/
dosbox:
dosbox: DOSBox is a DOS-emulator that uses the SDL-library which makes
dosbox: DOSBox very easy to port to different platforms. DOSBox
dosbox: has already been ported to many different platforms, such as Windows,
dosbox: BeOS, Linux, MacOS X...
dosbox:
dosbox:
dosbox: DOSBox 0.72
dosbox:
E questo è lo SlackBuild:

Codice: Seleziona tutto

#!/bin/sh

CWD=`pwd`
TMP=${TMP:-/tmp/tgz}
PKG=$TMP/package
NAME=dosbox
VERSION=0.72
CHOST=i486
ARCH=${ARCH:-i486}
BUILD=1sl

if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2"
fi

if [ ! -d $TMP ]; then
 mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
 mkdir -p $PKG
fi

cd $TMP
if [ -e $CWD/$NAME-$VERSION.tar.gz ]; then
tar xzvf $CWD/$NAME-$VERSION.tar.gz || exit 1
fi
if [ -e $CWD/$NAME-$VERSION.tar.bz2 ]; then
tar xjvf $CWD/$NAME-$VERSION.tar.bz2 || exit 1
fi

cd $NAME-$VERSION
find . \( -perm 777 -o -perm 775 -o -perm 711 \) -exec chmod 755 {} \;
find . \( -perm 700 -o -perm 555 -o -perm 511 \) -exec chmod 755 {} \;
find . \( -perm 666 -o -perm 664 -o -perm 600 \) -exec chmod 644 {} \;
find . \( -perm 444 -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
chown -R root:root .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var/lib \
--mandir=/usr/man \
--build=$CHOST-slackware-linux
make || exit 1
make install DESTDIR=$PKG || exit 1
mkdir -p $PKG/usr/doc/$NAME-$VERSION/SlackBuild
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS \
docs/{PORTING,README.video,dosbox.1} $PKG/usr/doc/$NAME-$VERSION
gzip -9 $PKG/usr/man/man?/*.?
rm -f $PKG/usr/man/man?/*.?

cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/slack-desc
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/$NAME.SlackBuild
requiredbuilder -v -y -s $CWD $PKG
makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz

if [ "$1" = "--cleanup" ]; then
 rm -rf $TMP
fi
Il problema è che durante il configure mi dà questo warning nonostante sdl_sound sia installato:

Codice: Seleziona tutto

configure: WARNING: Can't find libSDL_sound, libSDL_sound support disabled
Qualche pacchettizzatore esperto mi può dare una mano?
Grazie :D

Inviato: dom 4 nov 2007, 20:22
da gallows
Devi avere gli header per compilare, forse hai solo la libreria...

Ps. la pipe dell'handy ruler deve stare sopra i ':'

Inviato: dom 4 nov 2007, 20:39
da syaochan
guarda nel configure.log cosa va storto

Inviato: lun 5 nov 2007, 22:15
da anycolouryoulike
gallows ha scritto:Ps. la pipe dell'handy ruler deve stare sopra i ':'
Corretto. :D Era un problema di dipendenze... avevo installato sdl_sound ma non avevo installato le sue dipendenze... (smpeg, speex, physfs, libmodplug) ora è perfetto.
Grazie a tutti e due!