1 # Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>
5 pkgdesc="Profiling and tracing toolkit for Fortran, C, C++, Java and Python programs"
7 url="http://www.cs.uoregon.edu/research/tau/home.php"
10 optdepends=('java-runtime: for ParaProf and other GUI utilities')
11 source=(http://tau.uoregon.edu/tau.tgz \
13 md5sums=('d44467b82d925c8082334d27a8288f3c'
14 '52fa5f1687fe0ad889aa411d1b5b9982')
17 cd "$srcdir/$pkgname-$pkgver"
19 ./configure -LINUXTIMERS \
25 cd "$srcdir/$pkgname-$pkgver"
29 _ARCH=`grep TAU_ARCH include/tauarch.h | sed 's|.*"\(.*\)".*|\1|'`
30 _MAKEFILE=`ls $_ARCH/lib/Makefile*`
31 _MAKEFILE=`basename "$_MAKEFILE"`
33 install -d -m755 "$pkgdir/opt/tau"
34 cp -a $_ARCH "$pkgdir/opt/tau"
36 # remove all references to "$pkgdir" from text files
37 for FILE in "$pkgdir"/opt/tau/$_ARCH/bin/*; do
38 if [ `file $FILE | grep -c "text"` -ne 0 ] ; then
39 #echo "striping $srcdir/$pkgname-$pkgver from file $FILE"
40 sed "s|$srcdir/$pkgname-$pkgver|/opt/tau|g" -i "$FILE"
43 sed -i "s|$srcdir/$pkgname-$pkgver|/opt/tau|g" "$pkgdir/opt/tau/$_ARCH/lib/$_MAKEFILE"
45 # move man pages to correct location
46 install -d -m755 "$pkgdir/usr/share"
47 cp -a "$srcdir/$pkgname-$pkgver/man" "$pkgdir/usr/share"
48 # install tau.sh to profile.d and update paths in tau.sh
49 install -D -m755 "$srcdir/tau.sh" "$pkgdir/etc/profile.d/tau.sh"
50 sed -i "s|_ARCH_|$_ARCH|" "$pkgdir/etc/profile.d/tau.sh"
51 sed -i "s|_MAKEFILE_|$_MAKEFILE|" "$pkgdir/etc/profile.d/tau.sh"
53 install -D -m644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
56 # vim:set ts=2 sw=2 et: