#!/bin/sh -x # variables CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=${VERSION:-051010} ARCH=${ARCH:-$(uname -m)} BUILD=1 TAG=cyco TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp PREFIX=/usr SLCKFLAGS=" -O " # nettoyage préalable rm -fr $PKG $TMP/$PRGNAM mkdir -p $PKG # mise en place [ ! -e $CWD/${PRGNAM}_src-${VERSION}.tgz ] && wget -c http://heanet.dl.sourceforge.net/project/${PRGNAM}/${PRGNAM}-src/${VERSION}/${PRGNAM}_src-${VERSION}.tgz -O $CWD/${PRGNAM}_src-${VERSION}.tgz cd $TMP/ tar xf $CWD/${PRGNAM}_src-${VERSION}.tgz cd ${PRGNAM} # installation ./configure \ --prefix=$PREFIX make sed -i "s|$PREFIX|$PKG$PREFIX|g" Makefile mkdir -p $PKG$PREFIX/{bin,man} make install cp *.1 $PKG$PREFIX/man mkdir -p $PKG$PREFIX/doc/$PRGNAM/ cp -r LICENSE README $PKG$PREFIX/doc/$PRGNAM/ # correction cd $PKG chown -R root:root * find $PKG -name \.git\* -exec rm -fr {} \; [ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; # Strip binaries ( 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 ) # embaumement mkdir -p $PKG/install cat < $PKG/install/slack-desc $PRGNAM: $PRGNAM (A melange of mac and unix font) $PRGNAM: $PRGNAM: A series of programs to interconvert between mac fonts (and FONDs) and unix font formats. $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: http://fondu.sourceforge.net/ $PRGNAM: EOF # empaquetage cd $PKG makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz