diff options
Diffstat (limited to 'graphics/gphoto2/gphoto2.SlackBuild')
-rw-r--r-- | graphics/gphoto2/gphoto2.SlackBuild | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/graphics/gphoto2/gphoto2.SlackBuild b/graphics/gphoto2/gphoto2.SlackBuild index e7abce5068..2d29c4b098 100644 --- a/graphics/gphoto2/gphoto2.SlackBuild +++ b/graphics/gphoto2/gphoto2.SlackBuild @@ -6,34 +6,39 @@ # No Guarantees. Use this SlackBuild at your own risk. # Public Domain -# Modified by the SlackBuilds.org project - PRGNAM=gphoto2 -VERSION=2.4.0 +VERSION=2.4.3 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -PDOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" - if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar -xvjf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +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 {} \; CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -43,18 +48,23 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=/var \ --enable-static=no \ --mandir=/usr/man \ - || exit 1 + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG -make || exit 1 -make install-strip DESTDIR=$PKG || exit 1 +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man +( cd $PKG/usr/man || exit 1 find . -type f -exec gzip -9 {} \; for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $PDOCS $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |