E' il primo slackbuild che scrivo, ma è abbastanza standard avendo preso spunto dal wiki
Il pacchetto è stato creato correttamente
Avrei comunque alcune domande:
- il pacchetto creato pesa ben 40MB, nonostante lo stripping effettuato; c'è qualche possibilità che lo stripping non sia avvenuto?

- nei CFLAGS per la compilazione a 32 bit ho visto che si specificano le opzioni -march e -mtune, mentre a 64bit si usa -fPIC; ho fatto qualche ricerca in google, ma con poco successo. Cos'è -fPIC? E a cosa serve? Non sembra avere molti riferimenti all'architettura del sistema...
- c'è qualche ottimizzazione o trick da aggiungere allo slackBuild?
Codice: Seleziona tutto
#!/bin/sh
#
# Written by Alberto Coletta (alby dot coletta at gmail dot com)
#
# http://racket-lang.org/
CWD=`pwd`
if ["$TMP" = ""]; then
TMP=/tmp
fi
PKG=$TMP/package-racket
NAME=racket
VERSION=5.2.1
ARCH=x86_64
BUILD=1boh
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
mkdir -p $PKG
fi
cd $TMP
tar xzvf $CWD/$NAME-$VERSION.tgz
cd $NAME-$VERSION
chown -R root.root .
find . -perm 775 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
cd src
CFLAGS="-O2 -fPIC" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a README $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
gzip -9 $PKG/usr/man/*/*
gzip -9 $PKG/usr/info/*
chown -R root.bin $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.txz
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/$NAME-$VERSION
rm -rf $PKG
fiCodice: 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------------------------------------------------------|
racket: racket (programming language)
racket:
racket: Racket is a scheme-based programming language
racket:
racket: http://racket-lang.org/
racket:
racket:
racket:
racket:
racket:
racket:
