summaryrefslogtreecommitdiffstats
path: root/office/devtodo/devtodo.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/devtodo/devtodo.SlackBuild')
-rw-r--r--office/devtodo/devtodo.SlackBuild32
1 files changed, 23 insertions, 9 deletions
diff --git a/office/devtodo/devtodo.SlackBuild b/office/devtodo/devtodo.SlackBuild
index 02631e2d1b..d7d8f0ee46 100644
--- a/office/devtodo/devtodo.SlackBuild
+++ b/office/devtodo/devtodo.SlackBuild
@@ -25,21 +25,25 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=devtodo
-VERSION=0.1.20
+VERSION=${VERSION:-0.1.20}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCFILES="AUTHORS COPYING ChangeLog INSTALL NEWS README QuickStart contrib"
-
-if [ "$ARCH" = "i486" ]; then
+if [ "$ARCH"- = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -50,13 +54,21 @@ cd $TMP
rm -rf $TMP/$PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Patch so it compiles on x86_64, and fix for missing C++ includes.
+patch -p1 < $CWD/c++includes.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
--sysconfdir=/etc \
--mandir=/usr/man \
@@ -71,11 +83,13 @@ make install-strip DESTDIR=$PKG
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/{contrib,profile.d}
-cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README QuickStart contrib \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat doc/scripts.sh > $PKG/usr/doc/$PRGNAM-$VERSION/profile.d/$PRGNAM.sh
cat doc/scripts.tcsh > $PKG/usr/doc/$PRGNAM-$VERSION/profile.d/$PRGNAM.csh
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+
+#find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
# Let's not clobber the config file
mv $PKG/etc/todorc $PKG/etc/todorc.new
@@ -85,4 +99,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}