#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-oprofile VERSION=0.9.6 ARCH=alpha BUILD=2 TARGET=$ARCH-alphaslack-linux rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf oprofile-$VERSION tar xzf $CWD/oprofile-$VERSION.tar.gz cd oprofile-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; ./configure \ --prefix=/usr \ --mandir=/usr/man \ --with-kernel-support \ --build=$TARGET make || exit 1 make install DESTDIR=$PKG # 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 * chown -R root.bin . ) 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?/* rm -rf $PKG/usr/share/oprofile/{i386,ia64,arm,x86-64,ppc64,mips,ppc} mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n ../oprofile-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/oprofile.build.log