[Slackbuilds-users] Thanks!
Rich Shepard
rshepard at appl-ecosys.com
Sat Feb 24 16:08:58 UTC 2007
On Sat, 24 Feb 2007, Rich Shepard wrote:
> Toward that end, I've attached the gnucash.SlackBuild that's based on what
Oops! Caffine titer too loow.
Rich
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
-------------- next part --------------
#!/bin/bash
#############################
## Build script for: gnucash
## Modified by: Rich Shepard
## Adapted from sqlite.SlackBuild
## Date: 15 Feb 2007
## Builds package: Yes
## Source location: http://www.gnucash.org/
## Downloads source: Yes
## Build script version: v2
##
## Notes: Run 'sh gnucash.SlackBuild -- clean' to build a Slackware package.
## Install using 'installpkg' or 'upgradepkg'.
set -e -x
CWD=$PWD
NAME=gnucash
VERSION=2.0.4
BUILD=1-rbs
DOCS='README VERSION'
TMP=/tmp/package-gnucash
TGZ=$TMP/tgz
ARCH=${ARCH:-i486}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686 -I libffi"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
## Location to download the sources
if [ ! -e gnucash-${VERSION}.tar.bz2 ] ; then
wget -c http://www.gnucash.org/gnucash-${VERSION}.tar.bz2
fi
if [ -d $TMP ] ; then
rm -rf $TMP
fi
mkdir -p $TMP
cd $TMP
# Select one:
# tar xzf $CWD/gnucash-${VERSION}.tar.gz
tar xjvf $CWD/gnucash-${VERSION}.tar.bz2
cd gnucash-$VERSION
# ---------------- BUILDING -----------------------------
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr/local \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man
# --with-g-wrap-prefix=/usr \
# --disable-ofx \
# --disable-aqbanking-test \
# --disable-hbci
# --disable-deprecated-glib \
# --disable-deprecated-gdk \
# --disable-deprecated-gtk \
# --disable-deprecated-gnome
$ARCH-slackware-linux 2>&1 | tee > configure-gnucash.log
make 2>&1 | tee > make-gnucash.log
make install DESTDIR=$TGZ 2>&1 | tee > install-gnucash.log
# ---------------- DOCUMENTATION -------------------------
## Standards docs
mkdir -p $TGZ/usr/doc/gnucash-$VERSION
cp -a $DOCS $TGZ/usr/doc/gnucash-$VERSION
( cd $TMP/gnucash-${VERSION}/
mv art contrib doc $TGZ/usr/doc/gnucash-$VERSION )
## Pixmaps
mkdir -p $TGZ/usr/share/pixmaps
( cd $TGZ/usr/share/pixmaps
ln -s ../../doc/gnucash-$VERSION/art/gnucash.gif )
# ---------------- STRIPPING ----------------------------
( cd $TGZ
find . | xargs file | grep "ELF 32-bit LSB executable" | cut -f 1 -d : | xargs
strip --strip-all 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs
strip --strip-unneeded 2> /dev/null
)
# ---------------- DESCRIPTION -----------------------------
## SlackBuild
mkdir -p $TGZ/usr/src/slackbuilds/gnucash-$VERSION
cp -a $CWD/gnucash.SlackBuild $CWD/slack-desc $TGZ/usr/src/slackbuilds/gnucash-$VERSION/
## SlackDesc
mkdir -p $TGZ/install
cat $CWD/slack-desc > $TGZ/install/slack-desc
# ---------------- OWNERSHIP, RIGHTS ---------------------
( cd $TGZ/usr/doc/gnucash-$VERSION/ ; chmod 644 $DOCS )
( cd $TGZ/usr/src/slackbuilds/gnucash-$VERSION/ ; chmod 644 gnucash.SlackBuild )
( cd $TGZ
chown -R root:root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
)
# ----------------- PKG BUILDING -----------------
cd $TGZ
/sbin/makepkg -l y -c n $CWD/gnucash-${VERSION}-${ARCH}-${BUILD}.tgz
# ------------------ MD5 ----------------
cd $CWD
md5sum gnucash-${VERSION}-${ARCH}-${BUILD}.tgz > gnucash-${VERSION}-${ARCH}-${BUILD}.tgz.md5
# ----------------- CLEANUP -------------
if [ "$1" = "--clean" ] ; then
rm -rf $TMP
fi
# Fin
More information about the Slackbuilds-users
mailing list