aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xardour/ardour.SlackBuild16
-rw-r--r--ardour/slack-required1
-rwxr-xr-xcairo/cairo.SlackBuild5
-rwxr-xr-xcinelerra/cinelerra.SlackBuild43
-rwxr-xr-xgrub/grub.SlackBuild16
-rw-r--r--hydrogen/slack-required1
-rw-r--r--jack/slack-required1
-rwxr-xr-xladspa/ladspa.SlackBuild2
-rwxr-xr-xliba52/liba52.SlackBuild1
-rwxr-xr-xmplayer/MPlayer.SlackBuild45
-rw-r--r--mplayer/slack-required3
-rwxr-xr-xpygtk/pygtk.SlackBuild134
-rwxr-xr-xscons/scons.SlackBuild14
-rw-r--r--scons/slack-required1
-rwxr-xr-xstellarium/stellarium.SlackBuild123
15 files changed, 352 insertions, 54 deletions
diff --git a/ardour/ardour.SlackBuild b/ardour/ardour.SlackBuild
index 62c90edd..5a2dd93a 100755
--- a/ardour/ardour.SlackBuild
+++ b/ardour/ardour.SlackBuild
@@ -35,6 +35,12 @@ SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38 ERROR_GPP=39
+ERROR_PATCH=40
+
if [ "$ARCH" == "x86_64" ]; then
export LDFLAGS="-L/lib64 -L/usr/lib64"
LIBDIR=/usr/lib64
@@ -57,7 +63,7 @@ else
fi
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
TMP="$TMP/$PACKAGE"
@@ -69,12 +75,12 @@ tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION
if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
fi
mkdir -p $TMP/package-$PACKAGE
-scons PREFIX=$TMP/package-$PACKAGE KSI=yes
-scons install
+scons PREFIX=$TMP/package-$PACKAGE KSI=yes || exit $ERROR_CONF
+scons install || exit $ERROR_MAKE
CWD="`pwd`"
@@ -115,7 +121,7 @@ for file in AUTHORS AUTHORS.es BUILD CONTRIBUTORS FAQ README TRANSLATORS; do
cp $CWD/DOCUMENTATION/$file* usr/doc/$PACKAGE-$VERSION/
done
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP
diff --git a/ardour/slack-required b/ardour/slack-required
index 4ca6ff4f..2f6935ab 100644
--- a/ardour/slack-required
+++ b/ardour/slack-required
@@ -1,3 +1,4 @@
scons
raptor
liblrdf
+ladspa
diff --git a/cairo/cairo.SlackBuild b/cairo/cairo.SlackBuild
index d2366f80..c1f14ec7 100755
--- a/cairo/cairo.SlackBuild
+++ b/cairo/cairo.SlackBuild
@@ -45,7 +45,8 @@ fi
# ------- error codes for createpkg --------------
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
-ERROR_TAR=37; ERROR_MKPKG=38
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
RTOOL="wget"
PACKAGE_EXT="gz"
@@ -68,7 +69,7 @@ tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
cd $PACKAGE-$VERSION
if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
fi
./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF
diff --git a/cinelerra/cinelerra.SlackBuild b/cinelerra/cinelerra.SlackBuild
index b317bd6b..7fafc4a4 100755
--- a/cinelerra/cinelerra.SlackBuild
+++ b/cinelerra/cinelerra.SlackBuild
@@ -35,6 +35,12 @@ SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_SVN=41;
+
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
else
@@ -44,26 +50,31 @@ fi
SRC_DIR="$SRC_DIR/$PACKAGE"
mkdir -p $SRC_DIR
-rm -rf $TMP/$PACKAGE
-
-cd $TMP
-
-svn checkout svn://svn.skolelinux.org/cinelerra/trunk/hvirtual
-
-mv hvirtual cinelerra
+TMP=$TMP/$PACKAGE
+rm -rf $TMP
+mkdir -p $TMP
+
+if [ -d "$SRC_DIR/cinelerra" ]; then
+ cd $SRC_DIR/cinelerra
+ svn update || exit $ERROR_SVN
+else
+ cd $SRC_DIR
+ svn checkout svn://svn.skolelinux.org/cinelerra/trunk/hvirtual
+ mv hvirtual cinelerra
+fi
-cd cinelerra
+cd $SRC_DIR
+VERSION=r"`svnversion cinelerra`"
+cd $SRC_DIR/cinelerra
if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
fi
-VERSION=r"`svnversion cinelerra`"
-
-./autogen.sh
-./configure --prefix=/usr --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
+./autogen.sh || exit $ERROR_CONF
+./configure --prefix=/usr --libdir=$LIBDIR || exit $ERROR_CONF
+make || exit $ERROR_MAKE
+make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
CWD="`pwd`"
@@ -102,7 +113,7 @@ for file in AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README TODO;do
cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
done
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP
diff --git a/grub/grub.SlackBuild b/grub/grub.SlackBuild
index 758398ab..edf0311e 100755
--- a/grub/grub.SlackBuild
+++ b/grub/grub.SlackBuild
@@ -23,6 +23,12 @@ SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
else
@@ -44,7 +50,7 @@ SRC_DIR="$SRC_DIR/$PACKAGE"
mkdir -p $SRC_DIR
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
TMP="$TMP/$PACKAGE"
@@ -55,9 +61,9 @@ cd $TMP
tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION
-./configure --prefix=/usr --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
+./configure --prefix=/usr --libdir=$LIBDIR || exit $ERROR_CONF
+make || exit $ERROR_MAKE
+make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
CWD="`pwd`"
@@ -96,7 +102,7 @@ for file in AUTHORS BUGS COPYING ChangeLog INSTALL MAINTENANCE NEWS README THANK
cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
done
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP
diff --git a/hydrogen/slack-required b/hydrogen/slack-required
new file mode 100644
index 00000000..7d55e12e
--- /dev/null
+++ b/hydrogen/slack-required
@@ -0,0 +1 @@
+libsndfile
diff --git a/jack/slack-required b/jack/slack-required
index d5964983..69d245af 100644
--- a/jack/slack-required
+++ b/jack/slack-required
@@ -1 +1,2 @@
sndfile
+libsndfile
diff --git a/ladspa/ladspa.SlackBuild b/ladspa/ladspa.SlackBuild
index 2dd92070..56005e63 100755
--- a/ladspa/ladspa.SlackBuild
+++ b/ladspa/ladspa.SlackBuild
@@ -109,7 +109,7 @@ cat << EOF > install/slack-desc
ladspa: ladspa (linux audio developer's plugin API)
ladspa:
ladspa: The Linux Audio Developer's Simple Plugin API (LADSPA) attempts to
-ladspa: give programmers the ability to write simple `plugin' audio
+ladspa: give programmers the ability to write simple 'plugin' audio
ladspa: processors in C/C++ and link them dynamically against a range of
ladspa: host applications.
ladspa:
diff --git a/liba52/liba52.SlackBuild b/liba52/liba52.SlackBuild
index 9fc143e0..0476572b 100755
--- a/liba52/liba52.SlackBuild
+++ b/liba52/liba52.SlackBuild
@@ -36,6 +36,7 @@ TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
if [ "$ARCH" == "x86_64" ]; then
+ export CFLAGS=-fPIC
LIBDIR=/usr/lib64
else
LIBDIR=/usr/lib
diff --git a/mplayer/MPlayer.SlackBuild b/mplayer/MPlayer.SlackBuild
index 2d6de0ef..0d30261d 100755
--- a/mplayer/MPlayer.SlackBuild
+++ b/mplayer/MPlayer.SlackBuild
@@ -4,21 +4,16 @@
# by rhatto at riseup.net
#
-cat << EOCAT
-Recommended stuff:
-
- libtheora
- speex
- jack
-
-EOCAT
-
-if [ "$INTERACT" != "no" ]; then
- echo "Hit ENTER do continue, Crtl-C to abort"
- read crap
-else
- echo sleeping 3 seconds...
- sleep 3
+if [ -s "slack-required" ]; then
+ echo Recomended and required packages for building cairo are:
+ cat slack-required | sed -e 's/^/\t/'
+ if [ "$INTERACT" != "no" ]; then
+ echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
+ read crap
+ else
+ echo Sleeping 3 seconds...
+ sleep 3
+ fi
fi
CWD="`pwd`"
@@ -40,6 +35,12 @@ SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
else
@@ -61,7 +62,7 @@ SRC_DIR="$SRC_DIR/$PACKAGE"
mkdir -p $SRC_DIR
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
TMP="$TMP/$PACKAGE"
@@ -72,10 +73,14 @@ cd $TMP
tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION
-./configure --prefix=/usr --libdir=$LIBDIR --confdir=/etc --language=pt_BR --enable-largefiles --enable-gui --enable-win32 --enable-real --enable-qtx
-make || exit 32
+if [ "$ARCH" == "i386" ]; then
+ EXTRA_ARGS="--enable-win32 --enable-qtx"
+fi
+
+./configure --prefix=/usr --libdir=$LIBDIR --confdir=/etc --language=pt_BR --enable-largefiles --enable-gui --enable-real $EXTRA_ARGS || exit $ERROR_CONF
+make || exit $ERROR_MAKE
echo "$TMP/package-$PACKAGE/$PACKAGE"
-make DESTDIR=$TMP/package-$PACKAGE/$PACKAGE install
+make DESTDIR=$TMP/package-$PACKAGE/$PACKAGE install || exit $ERROR_INSTALL
CWD="`pwd`"
echo $CWD
@@ -115,7 +120,7 @@ for file in AUTHORS ChangeLog Copyright DOCS LICENSE README TOOLS; do
cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
done
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP
diff --git a/mplayer/slack-required b/mplayer/slack-required
new file mode 100644
index 00000000..c6d9f0ae
--- /dev/null
+++ b/mplayer/slack-required
@@ -0,0 +1,3 @@
+libtheora
+speex
+jack
diff --git a/pygtk/pygtk.SlackBuild b/pygtk/pygtk.SlackBuild
new file mode 100755
index 00000000..5cf09f7d
--- /dev/null
+++ b/pygtk/pygtk.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/bash
+#
+# slackbuild script for pygtk
+# by rhatto at riseup.net
+#
+
+if [ -s "slack-required" ]; then
+ echo Recomended and required packages for building pygtk are:
+ cat slack-required | sed -e 's/^/\t/'
+ if [ "$INTERACT" != "no" ]; then
+ echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
+ read crap
+ else
+ echo Sleeping 3 seconds...
+ sleep 3
+ fi
+fi
+
+CWD="`pwd`"
+
+if [ -f "/etc/slackbuildrc" ]; then
+ source /etc/slackbuildrc
+fi
+
+if [ -f "~/.slackbuildrc" ]; then
+ source ~/.slackbuildrc
+fi
+
+# default settings
+PACKAGE="pygtk"
+ARCH=${ARCH:=i486}
+VERSION=${VERSION:=2.8.5}
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
+
+if [ "$ARCH" == "x86_64" ]; then
+ export LDFLAGS="-L/lib64 -L/usr/lib64"
+ LIBDIR=/usr/lib64
+else
+ LIBDIR=/usr/lib
+fi
+
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
+RTOOL="wget"
+PACKAGE_EXT="bz2"
+SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
+URL="http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.8/$SRC"
+MD5="$PACKAGE-$VERSION.md5sum"
+MD5_URL="http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.8/$MD5"
+
+SRC_DIR="$SRC_DIR/$PACKAGE"
+mkdir -p $SRC_DIR
+
+if [ "$RTOOL" == "wget" ]; then
+ if [ ! -f "$SRC_DIR/$SRC" ]; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+ fi
+ if [ ! -f "$SRC_DIR/$MD5" ]; then
+ wget "$MD5_URL" -O "$SRC_DIR/$MD5" || exit $ERROR_WGET
+ fi
+fi
+
+cd $SRC_DIR
+grep $SRC $MD5 > $SRC.md5
+md5sum $SRC | diff - $SRC.md5 || exit $ERROR_MD5
+
+TMP="$TMP/$PACKAGE"
+rm -rf $TMP
+mkdir -p $TMP
+cd $TMP
+
+tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
+cd $PACKAGE-$VERSION
+
+if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
+fi
+
+./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF
+make || exit $ERROR_MAKE
+make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
+
+CWD="`pwd`"
+
+cd $TMP/package-$PACKAGE
+
+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 install
+cat << EOF > install/slack-desc
+# 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-----------------------------------------------------|
+pygtk: pygtk (A set of Python bindings for the GTK widget set)
+pygtk:
+pygtk: PyGTK provides a convenient wrapper for the GTK library for use in
+pygtk: Python programs, and takes care of many of the boring details such
+pygtk: as managing memory and type casting. When combined with PyORBit and
+pygtk: gnome-python, it can be used to write full featured Gnome
+pygtk: applications.
+pygtk:
+pygtk:
+pygtk:
+pygtk:
+EOF
+
+# docs
+mkdir -p usr/doc/$PACKAGE-$VERSION
+
+DOCS="COPYING README"
+
+for file in $DOCS; do
+ cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
+done
+
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
+
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi
+
diff --git a/scons/scons.SlackBuild b/scons/scons.SlackBuild
index cfe11074..c9cb18d7 100755
--- a/scons/scons.SlackBuild
+++ b/scons/scons.SlackBuild
@@ -35,6 +35,12 @@ SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
if [ "$ARCH" == "x86_64" ]; then
export LDFLAGS="-L/lib64 -L/usr/lib64"
LIBDIR=/usr/lib64
@@ -57,7 +63,7 @@ else
fi
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
TMP="$TMP/$PACKAGE"
@@ -69,10 +75,10 @@ tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION
if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
fi
-python setup.py install --prefix=$TMP/package-$PACKAGE
+python setup.py install --prefix=$TMP/package-$PACKAGE --standard-lib || exit $ERROR_INSTALL
CWD="`pwd`"
@@ -108,7 +114,7 @@ for file in CHANGES.txt LICENSE.txt MANIFEST README.txt RELEASE.txt; do
cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
done
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP
diff --git a/scons/slack-required b/scons/slack-required
deleted file mode 100644
index fdc793e7..00000000
--- a/scons/slack-required
+++ /dev/null
@@ -1 +0,0 @@
-python
diff --git a/stellarium/stellarium.SlackBuild b/stellarium/stellarium.SlackBuild
new file mode 100755
index 00000000..bcaa4238
--- /dev/null
+++ b/stellarium/stellarium.SlackBuild
@@ -0,0 +1,123 @@
+#!/bin/bash
+#
+# slackbuild script for stellarium
+# by rhatto at riseup.net
+#
+
+if [ -s "slack-required" ]; then
+ echo Recomended and required packages for building stellarium are:
+ cat slack-required | sed -e 's/^/\t/'
+ if [ "$INTERACT" != "no" ]; then
+ echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
+ read crap
+ else
+ echo Sleeping 3 seconds...
+ sleep 3
+ fi
+fi
+
+CWD="`pwd`"
+
+if [ -f "/etc/slackbuildrc" ]; then
+ source /etc/slackbuildrc
+fi
+
+if [ -f "~/.slackbuildrc" ]; then
+ source ~/.slackbuildrc
+fi
+
+# default settings
+PACKAGE="stellarium"
+ARCH=${ARCH:=i486}
+VERSION=${VERSION:=0.8.2}
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
+
+if [ "$ARCH" == "x86_64" ]; then
+ export LDFLAGS="-L/lib64 -L/usr/lib64"
+ LIBDIR=/usr/lib64
+else
+ LIBDIR=/usr/lib
+fi
+
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
+RTOOL="wget"
+PACKAGE_EXT="gz"
+SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
+URL="http://easynews.dl.sourceforge.net/sourceforge/$PACKAGE/$SRC"
+
+SRC_DIR="$SRC_DIR/$PACKAGE"
+mkdir -p $SRC_DIR
+
+if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+TMP="$TMP/$PACKAGE"
+rm -rf $TMP
+mkdir -p $TMP
+cd $TMP
+
+tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
+cd $PACKAGE-$VERSION
+
+if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
+fi
+
+./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF
+make || exit $ERROR_MAKE
+make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
+
+CWD="`pwd`"
+
+cd $TMP/package-$PACKAGE
+
+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 install
+cat << EOF > install/slack-desc
+# 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-----------------------------------------------------|
+stellarium: stellarium (A 3D astronomical sky renderer)
+stellarium:
+stellarium: Stellarium is a free GPL software which renders realistic skies in
+stellarium: real time with openGL. It is available for Linux/Unix, Windows and
+stellarium: MacOSX. With Stellarium, you really see what you can see with your
+stellarium: eyes, binoculars or a small telescope.
+stellarium:
+stellarium:
+stellarium:
+stellarium:
+stellarium:
+EOF
+
+# docs
+mkdir -p usr/doc/$PACKAGE-$VERSION
+
+DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
+
+for file in $DOCS; do
+ cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
+done
+
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
+
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi
+