You are not logged in.
Pages: 1
Hi,
Here's a bunch o' PKGBUILDs for building ns-2; I made them before I did a search and saw this post. That one doesn't seem to be in the right place, and isn't complete, so I thought I'd contribute what I'd done on here...
The PKGBUILDs cover the following: ns-2 v2.28, nam v1.11, OTcl v1.9, and TclCL v1.16.
Please note that it is highly unlikely that I will be maintaining these. Also, these are my first attempts at PKGBUILDs, so be warned that they could possibly destroy your filesystem, set your hair on fire, or alert your spouse to your hidden porn directories.
Re: the sed jiggery-pokery, yes I know it's hackish, but I couldn't be bothered creating patch files, and this solution was too easy.
OTcl
#Contributor: Andrew Wilkins <axwalk@gmail.com>
pkgname=otcl
pkgver=1.9
pkgrel=1
pkgdesc="An extension to Tcl/Tk for object-oriented programming."
url="http://otcl-tclcl.sourceforge.net/otcl/"
depends=(tcl tk)
source=(http://dl.sourceforge.net/sourceforge/otcl-tclcl/otcl-1.9.tar.gz)
md5sums=('d17331ef65912f43c530c57565f85600')
build() {
cd $startdir/src/$pkgname-$pkgver
# Make sure we look in /usr/include/tcl before /usr/include, otherwise
# tclInt.h won't be found
sed -i -e '3917{s#TCL_H_PLACES=" #&/usr/include/tcl #}' configure
./configure --prefix=/usr
make || return 1
# Unfortunately, the Makefile doesn't include any prefix variable for the
# installation path, so we'll just have to add one!
sed -i -e "28,+4{s#/#$startdir/pkg/#}" Makefile
sed -n -e '28,+4p' Makefile | cut -f2 |
( while read DIR; do mkdir -p $DIR; done; );
make install
}
TclCL
#Contributor: Andrew Wilkins <axwalk@gmail.com>
pkgname=tclcl
pkgver=1.16
pkgrel=1
pkgdesc="Tcl with classes: a C++ glue-layer for OTcl"
url="http://otcl-tclcl.sourceforge.net/tclcl/"
depends=(otcl tcl tk)
source=(http://dl.sourceforge.net/sourceforge/otcl-tclcl/tclcl-src-1.16.tar.gz)
md5sums=('2a25a4736c1bf4ec7f4e6343aa533bc6')
build() {
cd $startdir/src/$pkgname-$pkgver
sed -i -e '5275{s#TCL_H_PLACES=" #&/usr/include/tcl #}' configure
./configure --prefix=/usr
make || return 1
INSTALL_ROOT=$startdir/pkg
# Unfortunately, the Makefile doesn't include any prefix variable for the
# installation path, so we'll just have to add one!
sed -i -e "189,+2{s#/#$INSTALL_ROOT/#}" Makefile
sed -n -e '189,+2p' Makefile | cut -d' ' -f3 |
( while read DIR; do mkdir -p $DIR; done; );
make install
}
NS-2
#Contributor: Andrew Wilkins <axwalk@gmail.com>
pkgname=ns2
pkgver=2.28
pkgrel=1
pkgdesc="The Network Simulator ns-2."
url="http://www.isi.edu/nsnam/ns/"
depends=(tcl tk otcl tclcl)
source=(http://www.isi.edu/nsnam/dist/ns-src-2.28.tar.gz)
md5sums=('45ed7d066236aa981fd6cef6f9f44117')
build() {
cd $startdir/src/ns-$pkgver
./configure --prefix=/usr
make || return 1
mkdir -p $startdir/pkg/usr/{bin,man}
make DESTDIR=$startdir/pkg install
}
NAM
#Contributor: Andrew Wilkins <axwalk@gmail.com>
pkgname=nam
pkgver=1.11
pkgrel=1
pkgdesc="Tcl/TK based animatiion tool for viewing network simulation traces and real world packet traces."
url="http://www.isi.edu/nsnam/nam/"
depends=(tcl tk otcl tclcl)
source=(http://www.isi.edu/nsnam/dist/nam-src-1.11.tar.gz)
md5sums=('2627e85637d7ae8caf477d4e76b6f5e0')
build() {
cd $startdir/src/nam-$pkgver
./configure --prefix=/usr
# Patch agent.h
sed -i '73{s/NULL/0/}' $startdir/src/nam-$pkgver/agent.h
make || return 1
mkdir -p $startdir/pkg/usr/{bin,man}
make DESTDIR=$startdir/pkg install
}
Offline
Pages: 1