summaryrefslogtreecommitdiff
path: root/libraries/libv4l/libv4l.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libv4l/libv4l.SlackBuild')
-rw-r--r--libraries/libv4l/libv4l.SlackBuild20
1 files changed, 16 insertions, 4 deletions
diff --git a/libraries/libv4l/libv4l.SlackBuild b/libraries/libv4l/libv4l.SlackBuild
index ede68c1709..a69708efd6 100644
--- a/libraries/libv4l/libv4l.SlackBuild
+++ b/libraries/libv4l/libv4l.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
@@ -56,8 +59,15 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-make CFLAGS+="$SLKCFLAGS" CXXFLAGS+="$SLKCFLAGS"
-make install PREFIX=/usr DESTDIR=$PKG
+make \
+ CFLAGS+="$SLKCFLAGS" \
+ CXXFLAGS+="$SLKCFLAGS" \
+ PREFIX=/usr \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX}
+make install \
+ PREFIX=/usr \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ DESTDIR=$PKG
( cd $PKG
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
@@ -65,11 +75,13 @@ make install PREFIX=/usr DESTDIR=$PKG
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a [CRT]* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING* ChangeLog 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}