diff options
Diffstat (limited to 'audio/cd-discid/cd-discid.SlackBuild')
-rw-r--r-- | audio/cd-discid/cd-discid.SlackBuild | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/audio/cd-discid/cd-discid.SlackBuild b/audio/cd-discid/cd-discid.SlackBuild index 4ba2e2ec2c77..01b0a2420808 100644 --- a/audio/cd-discid/cd-discid.SlackBuild +++ b/audio/cd-discid/cd-discid.SlackBuild @@ -44,13 +44,13 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686 -DVERSION=\"1.4\"" + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" - elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686 -DVERSION=\"1.4\"" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" - elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC -DVERSION=\"1.4\"" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" @@ -59,38 +59,34 @@ fi set -e +rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -rm -rf $PKG $TMP/$PRGNAM-$VERSION cd $TMP -mv $CWD/${PRGNAM}-${VERSION}.tar.gz $CWD/${PRGNAM}-${VERSION}.orig.tar.gz -tar xvf $CWD/${PRGNAM}-${VERSION}.orig.tar.gz +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Apply a patch to Makefile to fix mandir and prevent setting ownership during -# the install. The mandir could easily be done by passing the 'mandir' -# variable to 'make install' but the ownership setting can't be omitted any -# other way. This isn't a huge issue, but I'm probably not the only one who -# likes to test scripts as a normal user before running them as root, and the -# ownership setting has to be removed for that to work. --rworkman -patch -p1 < $CWD/Makefile.diff +CFLAGS="$SLKCFLAGS" \ +make +install -D -m 755 cd-discid $PKG/usr/bin/cd-discid +install -D -m 644 cd-discid.1 $PKG/usr/man/man1/cd-discid.1 -make CFLAGS+="$SLKCFLAGS" -make install DESTDIR=$PKG +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING README changelog $PKG/usr/doc/$PRGNAM-$VERSION -find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -strip --strip-unneeded $PKG/usr/bin/cd-discid -gzip -9 $PKG/usr/man/man1/*.? - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |