diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2010-05-19 08:58:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:43:05 +0200 |
commit | b76270bf9e6dd375e495fec92140a79a79415d27 (patch) | |
tree | 3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/n/mtr/mtr.SlackBuild | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz |
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010
Slackware 13.1 x86_64 stable is released!
Lots of thanks are due -- see the RELEASE_NOTES and the rest of the
ChangeLog for credits. The ISOs are on their way to replication,
a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We are taking pre-orders now at store.slackware.com, and offering
a discount if you sign up for a subscription. Consider picking up
a copy to help support the project. Thanks again to the Slackware
community for testing, contributing, and generally holding us to a
high level of quality. :-)
Enjoy!
Diffstat (limited to 'source/n/mtr/mtr.SlackBuild')
-rwxr-xr-x | source/n/mtr/mtr.SlackBuild | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/source/n/mtr/mtr.SlackBuild b/source/n/mtr/mtr.SlackBuild index 91ed7be9..4f53c587 100755 --- a/source/n/mtr/mtr.SlackBuild +++ b/source/n/mtr/mtr.SlackBuild @@ -22,10 +22,19 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PRGNAM=mtr -VERSION=0.73 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-2} +PKGNAM=mtr +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi NUMJOBS=${NUMJOBS:-" -j7 "} @@ -35,19 +44,20 @@ elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-$PRGNAM +PKG=$TMP/package-$PKGNAM rm -rf $PKG mkdir -p $TMP $PKG cd $TMP -rm -rf ${PRGNAM}-${VERSION} -tar xvf $CWD/${PRGNAM}-${VERSION}.tar.bz2 || exit 1 -cd ${PRGNAM}-${VERSION} || exit 1 -zcat $CWD/mtr-0.73.configure.error.diff.gz | patch -p1 --verbose || exit 1 +rm -rf ${PKGNAM}-${VERSION} +tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1 +cd ${PKGNAM}-${VERSION} || exit 1 chown -R root.root * find . \ @@ -70,11 +80,19 @@ make DESTDIR=$PKG install || exit 1 chmod -s $PKG/usr/sbin/mtr -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ AUTHORS COPYING* FORMATS INSTALL NEWS README* SECURITY TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION -chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* + $PKG/usr/doc/$PKGNAM-$VERSION +chmod -R a-w $PKG/usr/doc/$PKGNAM-$VERSION/* + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi # Compress the man page(s) find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; @@ -88,5 +106,6 @@ cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG -/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz + |