--- indent.SlackBuild	2006-04-03 20:39:15.000000000 -0400
+++ indent.SlackBuild.s390x	2005-12-18 16:53:39.000000000 -0500
@@ -7,8 +7,18 @@
 PKG=$TMP/package-indent
 
 VERSION=2.2.9
-ARCH=i386
-BUILD=1
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+
+if [ "$ARCH" = "i386" ]; then
+  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+  SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "s390x" ]; then
+  SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+  SLKCFLAGS="-O2"
+fi
 
 if [ ! -d $TMP ]; then
   mkdir -p $TMP # location to build the source
@@ -20,13 +30,14 @@
 cd $TMP
 tar xjvf $CWD/indent-$VERSION.tar.bz2
 cd indent-$VERSION
-chown -R root:root .
-CFLAGS="-O2 -march=i386 -mcpu=i686" \
-./configure --prefix=/usr i386-slackware-linux
+chown -R root.root .
+CFLAGS="$SLKCFLAGS" \
+./configure --prefix=/usr ${ARCH}-slackware-linux
 make
 strip src/indent
 mkdir -p $PKG/usr/bin
 cat src/indent > $PKG/usr/bin/indent
+chown -R root.bin $PKG/usr/bin
 chmod 755 $PKG/usr/bin/indent
 mkdir -p $PKG/usr/info
 cat doc/indent.info | gzip -9c > $PKG/usr/info/indent.info.gz
