summaryrefslogtreecommitdiff
path: root/libraries/libopensync/libopensync.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libopensync/libopensync.SlackBuild')
-rw-r--r--libraries/libopensync/libopensync.SlackBuild25
1 files changed, 19 insertions, 6 deletions
diff --git a/libraries/libopensync/libopensync.SlackBuild b/libraries/libopensync/libopensync.SlackBuild
index 1bedafbe0f..ea8e5c9080 100644
--- a/libraries/libopensync/libopensync.SlackBuild
+++ b/libraries/libopensync/libopensync.SlackBuild
@@ -35,10 +35,13 @@ OUTPUT=${OUTPUT:-/tmp}
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
@@ -61,30 +64,40 @@ chmod -R u+w,go+r-w,a-s .
# -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
# -DCMAKE_INSTALL_PREFIX=/usr
+if [ "$ARCH" = "x86_64" ]; then
+ sed "s%@baselibdir@%lib${LIBDIRSUFFIX}%g" \
+ $CWD/libopensync-0.22-fixup_python_libdir.diff \
+ | patch -p1
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog COPYING INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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}