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/d/oprofile/oprofile.SlackBuild | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.xz |
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/d/oprofile/oprofile.SlackBuild')
-rwxr-xr-x | source/d/oprofile/oprofile.SlackBuild | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/source/d/oprofile/oprofile.SlackBuild b/source/d/oprofile/oprofile.SlackBuild index 28feae4ab..8a9d2bef5 100755 --- a/source/d/oprofile/oprofile.SlackBuild +++ b/source/d/oprofile/oprofile.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005-2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2005-2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,12 +21,21 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=0.9.4 -ARCH=${ARCH:-x86_64} +VERSION=${VERSION:-$(echo oprofile-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-" -j7 "} +# 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 + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -52,8 +61,13 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP || exit 1 rm -rf oprofile-$VERSION -tar xvf $CWD/oprofile-$VERSION.tar.bz2 || exit 1 +tar xvf $CWD/oprofile-$VERSION.tar.?z* || exit 1 cd oprofile-$VERSION + +zcat $CWD/oprofile.qt4.diff.gz | patch -p1 --verbose || exit 1 + +./autogen.sh + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -72,21 +86,46 @@ CXXFLAGS="$SLKCFLAGS" \ make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG +# Strip binaries: +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +# Compress and link manpages, if any: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + # This seems misplaced, and isn't referenced by any binaries or other files. # I'm tempted to think it shouldn't have been installed, but will just move it: if [ -r $PKG/usr/share/mangled-name ]; then mv $PKG/usr/share/mangled-name $PKG/usr/share/oprofile/mangled-name fi -( cd $PKG/usr/bin - strip --strip-unneeded * -) + mv $PKG/usr/share/doc $PKG/usr mv $PKG/usr/doc/oprofile $PKG/usr/doc/oprofile-$VERSION cp -a \ COPYING README TODO \ $PKG/usr/doc/oprofile-$VERSION -gzip -9 $PKG/usr/man/man?/* +# 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/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |