]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
lots of changes
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Wed, 18 Oct 2006 16:50:47 +0000 (16:50 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Wed, 18 Oct 2006 16:50:47 +0000 (16:50 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@430 370017ae-e619-0410-ac65-c121f96126d4

15 files changed:
ardour/ardour.SlackBuild
ardour/slack-required
cairo/cairo.SlackBuild
cinelerra/cinelerra.SlackBuild
grub/grub.SlackBuild
hydrogen/slack-required [new file with mode: 0644]
jack/slack-required
ladspa/ladspa.SlackBuild
liba52/liba52.SlackBuild
mplayer/MPlayer.SlackBuild
mplayer/slack-required [new file with mode: 0644]
pygtk/pygtk.SlackBuild [new file with mode: 0755]
scons/scons.SlackBuild
scons/slack-required [deleted file]
stellarium/stellarium.SlackBuild [new file with mode: 0755]

index 62c90edde543f9a285c62c12c589830a0a99f406..5a2dd93a3f742928cc2381f3fc0e88cc909403e0 100755 (executable)
@@ -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
index 4ca6ff4fd2f3de7722a701ab07552fc2767d21ef..2f6935ab9c1d5a89e068b8973d76dc86d2cabeb4 100644 (file)
@@ -1,3 +1,4 @@
 scons
 raptor
 liblrdf
+ladspa
index d2366f809fecd524442984dddf4997f6fdcff88e..c1f14ec7192f5c59bd6dc92a142010373f509fa2 100755 (executable)
@@ -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
index b317bd6b2453a96fb2c5ca70297aa884f78ce76d..7fafc4a4e592f7fd17a7cfe128b8e1072e4aa515 100755 (executable)
@@ -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
index 758398ab63aae51e44b3a4f2e7e1d4dbdde95ed2..edf0311e83d6caf0cd4ad6fd17c7f9a6a6c6c97b 100755 (executable)
@@ -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 (file)
index 0000000..7d55e12
--- /dev/null
@@ -0,0 +1 @@
+libsndfile
index d5964983d56723e62bb2585c3a11b277d217aa2b..69d245af44e7835502955318911cd5f7c49f53a7 100644 (file)
@@ -1 +1,2 @@
 sndfile
+libsndfile
index 2dd920704308cd0f09da6eb161e923839bd2935b..56005e635a17a2d232ac99d8caedaecd3c35a985 100755 (executable)
@@ -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:
index 9fc143e07a05a29af8b0c1de363989ca4b24fb4e..0476572bc1733c892bbf6a46ebdd928ed1bb5930 100755 (executable)
@@ -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
index 2d6de0ef343baceec0b9f0527636bdbef437d927..0d30261d2bf861a9f7b7011a903cd8db9ebc2fcb 100755 (executable)
@@ -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 (file)
index 0000000..c6d9f0a
--- /dev/null
@@ -0,0 +1,3 @@
+libtheora
+speex
+jack
diff --git a/pygtk/pygtk.SlackBuild b/pygtk/pygtk.SlackBuild
new file mode 100755 (executable)
index 0000000..5cf09f7
--- /dev/null
@@ -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
+
index cfe110749269701b68d1108b99132a18ead9ecf4..c9cb18d7b0d366c637976b9f8bc2b9415a8fe6b6 100755 (executable)
@@ -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 (file)
index fdc793e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-python
diff --git a/stellarium/stellarium.SlackBuild b/stellarium/stellarium.SlackBuild
new file mode 100755 (executable)
index 0000000..bcaa423
--- /dev/null
@@ -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
+