Prima di tutto vi incollo il testdisk.SlackBuild:
Codice: Seleziona tutto
#!/bin/sh
CWD=`pwd`
if ["$TMP" = ""]; then
TMP=/tmp/pkg
fi
PKG=$TMP/testdisk
NAME=testdisk
VERSION=6.5
ARCH=i486
BUILD=1
if [ ! -d $TMP ]; then
mkdir -p $PKG
fi
echo "+-----------------------------------+"
echo "| Start SlackBuild $NAME-$VERSION |"
echo "+-----------------------------------+"
cd $TMP
tar xjvf $CWD/$NAME-$VERSION.tar.bz2
cd $NAME-$VERSION
chown -R root.root .
find . -perm 775 -exec chmod 755 '{}' \;
find . -perm 664 -exec chmod 644 '{}' \;
CFLAGS="-O2 -march=i486 -mtune=i686" ./configure --prefix=/usr \
--disable-debug \
--sysconfdir=/etc \
--localstatedir=/var
make
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a \
AUTHORS COPYING ChangeLog INFO INSTALL NEWS README THANKS \
$PKG/usr/doc/$NAME-$VERSION
( 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
find . -type f -name "*.a" | xargs file | grep archive | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null
)
gzip -9 $PKG/usr/man/*/*
gzip -9 $PKG/usr/info/*
chown -R root.root $PKG/usr/bin
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/$NAME-$VERSION-$ARCH-$BUILD.tgz
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/$NAME-$VERSION
rm -rf $PKG
fi
Ed infine ecco l'errore restituito:
Naturalmente il processo va avanti, ma poi nel pacchetto chiaramente non ho nessun binario.hdaccess.c: In function `disk_get_geometry':
hdaccess.c:983: error: `u64' undeclared (first use in this function)
hdaccess.c:983: error: (Each undeclared identifier is reported only once
hdaccess.c:983: error: for each function it appears in.)
hdaccess.c: In function `file_read':
hdaccess.cwarning: comparison between signed and unsigned
hdaccess.c: In function `file_write':
hdaccess.cwarning: comparison between signed and unsigned
hdaccess.c: At top level:
hdaccess.cwarning: unused parameter 'nom_buffer'
hdaccess.c: In function `file_test_availability':
hdaccess.cwarning: passing arg 1 of `free' discards qualifiers from pointer target type
make[2]: *** [hdaccess.o] Error 1
make[2]: Leaving directory `/tmp/pkg/testdisk-6.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pkg/testdisk-6.5'
make: *** [all] Error 2
Making install in src
make[1]: Entering directory `/tmp/pkg/testdisk-6.5/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -march=i486 -mtune=i686 -Wall -MD -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wwrite-strings -W -Wcast-align -Waggregate-return -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Wnested-externs -Winline -Wdeclaration-after-statement -MT hdaccess.o -MD -MP -MF ".deps/hdaccess.Tpo" -c -o hdaccess.o hdaccess.c; \
then mv -f ".deps/hdaccess.Tpo" ".deps/hdaccess.Po"; else rm -f ".deps/hdaccess.Tpo"; exit 1; fi
hdaccess.c: In function `disk_get_geometry':
hdaccess.c:983: error: `u64' undeclared (first use in this function)
hdaccess.c:983: error: (Each undeclared identifier is reported only once
hdaccess.c:983: error: for each function it appears in.)
hdaccess.c: In function `file_read':
hdaccess.cwarning: comparison between signed and unsigned
hdaccess.c: In function `file_write':
hdaccess.cwarning: comparison between signed and unsigned
hdaccess.c: At top level:
hdaccess.cwarning: unused parameter 'nom_buffer'
hdaccess.c: In function `file_test_availability':
hdaccess.cwarning: passing arg 1 of `free' discards qualifiers from pointer target type
make[1]: *** [hdaccess.o] Error 1
make[1]: Leaving directory `/tmp/pkg/testdisk-6.5/src'
make: *** [install-recursive] Error 1
Usage: file [-bcikLhnNsvz] [-f namefile] [-F separator] [-m magicfiles] file...
file -C -m magicfiles
Se avete idee in proposito scrivete pure, grazie!

Cya!
P.S. Mi sembra di aver ricevuto anche un Warning per il CFLAGS -02, del tipo che non era supportato...
