diff options
author | kyechou | 2021-11-10 00:33:05 -0600 |
---|---|---|
committer | kyechou | 2021-11-10 00:33:05 -0600 |
commit | 395cd355d41e9720db1a873e2524aa721e9861de (patch) | |
tree | ac28cc123e3ea2923d637ce1389151e47572c708 | |
parent | ebb8591e7bede3179f8f8534aa5679186fe8aba7 (diff) | |
download | aur-395cd355d41e9720db1a873e2524aa721e9861de.tar.gz |
Update to 3.35
-rw-r--r-- | .SRCINFO | 98 | ||||
-rw-r--r-- | PKGBUILD | 429 |
2 files changed, 130 insertions, 397 deletions
@@ -1,77 +1,57 @@ pkgbase = ns3 pkgdesc = Discrete-event network simulator for Internet systems - pkgver = 3.29 + pkgver = 3.35 pkgrel = 1 url = http://www.nsnam.org/ - arch = i686 - arch = x86_64 - arch = armv6 - arch = armv6h - arch = arm7h - arch = aarch64 - license = GPL + arch = any + license = GPL2 + makedepends = python-pip + makedepends = python-setuptools + makedepends = python-wheel + makedepends = git makedepends = mercurial makedepends = bzr - makedepends = git - makedepends = binutils - makedepends = fakeroot - makedepends = findutils + makedepends = doxygen + makedepends = graphviz + makedepends = imagemagick depends = gcc - depends = gsl - depends = libxml2 + depends = python + depends = dpdk + depends = qt5-base + depends = openmpi depends = sqlite + depends = libxml2 depends = boost depends = boost-libs - depends = doxygen - depends = graphviz - depends = imagemagick - depends = dia - depends = qt4 - depends = python2 - depends = python2-setuptools - depends = python2-pydot + depends = glibc + depends = libpcap + depends = gsl + depends = gtk2 + depends = python-pygraphviz depends = goocanvas depends = pygoocanvas depends = pygtk - depends = python2-pygraphviz - depends = python2-gobject - depends = pygccxml + depends = cmake + depends = clang + depends = llvm depends = castxml - depends = libgcrypt - depends = openmpi - depends = flex - depends = valgrind - optdepends = tcpdump - optdepends = wireshark-gtk - optdepends = gdb - optdepends = texlive-bin - optdepends = python2-sphinx - optdepends = uncrustify + depends = pygccxml + depends = python-cxxfilt + optdepends = python-sphinx: ns3 manual and tutorial + optdepends = dia: ns3 manual and tutorial + optdepends = texlive-bin: ns3 manual and tutorial + optdepends = uncrustify: utils/check-style.py style check program provides = ns3 - conflicts = ns3 - conflicts = ns-3 - conflicts = ns3-full conflicts = ns3-hg - source = https://www.nsnam.org/release/ns-allinone-3.29.tar.bz2 - source = ns3-hg::hg+http://code.nsnam.org/ns-3-allinone - source = ns3-openflow-hg::hg+http://code.nsnam.org/openflow - source = ns3-click-git::git+https://github.com/kohler/click - source = ns3-brite-hg::hg+http://code.nsnam.org/jpelkey3/BRITE - source = ns3-nsc-hg::hg+https://secure.wand.net.nz/mercurial/nsc - source = ns3-dev-hg::hg+http://code.nsnam.org/ns-3-dev - source = ns3-netanim-hg::hg+http://code.nsnam.org/netanim - source = ns3-bake-hg::hg+http://code.nsnam.org/bake - source = pybindgen-git::git+https://github.com/gjcarneiro/pybindgen.git - md5sums = 1f4b667035fdb79471c7319f38595289 - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP + source = https://www.nsnam.org/release/ns-allinone-3.35.tar.bz2 + source = ns3-brite-hg::hg+https://code.nsnam.org/jpelkey3/BRITE + source = click-git::git+https://github.com/kohler/click + source = ns3-openflow-hg::hg+https://code.nsnam.org/openflow + source = pybindgen-git::git+https://github.com/gjcarneiro/pybindgen + sha256sums = 25e07a95349847b3e453d3af29a94545a4f869b1c6b4d860900cb7718fb1a618 + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP pkgname = ns3 - @@ -1,367 +1,120 @@ -# Maintainer: Yunhui Fu <yhfudev@gmail.com> +# Maintainer: Kuan-Yen Chou <kychou2 at illinois dot edu> +# Contributor: Yunhui Fu <yhfudev@gmail.com> -USE_DEV=0 -VER_RELEASE=3.29 - -pkgname=ns3-hg -pkgver=r13896 -pkgrel=1 - -if [ "${USE_DEV}" = "0" ]; then pkgname=ns3 -pkgver=3.29 -fi - +pkgver=3.35 +pkgrel=1 pkgdesc='Discrete-event network simulator for Internet systems' -arch=( 'i686' 'x86_64' 'armv6' 'armv6h' 'arm7h' 'aarch64' ) +arch=('any') url='http://www.nsnam.org/' -license=('GPL') -depends=( - 'gcc' - 'gsl' # GNU Scientific Library - 'libxml2' 'sqlite' 'boost' 'boost-libs' - 'doxygen' - 'graphviz' 'imagemagick' 'dia' 'qt4' - 'python2' 'python2-setuptools' 'python2-pydot' 'goocanvas' 'pygoocanvas' 'pygtk' 'python2-pygraphviz' 'python2-gobject' - 'pygccxml' 'castxml' - 'libgcrypt' - 'openmpi' # MPI for HPC - 'flex' # for nsc - 'valgrind' - ) -makedepends=( - 'mercurial' 'bzr' 'git' - 'binutils' - 'fakeroot' - 'findutils' - ) -optdepends=( - 'tcpdump' 'wireshark-gtk' - 'gdb' - 'texlive-bin' - 'python2-sphinx' - 'uncrustify' # utils/check-style.py style check program - ) +license=('GPL2') +depends=('gcc' 'python' 'dpdk' + 'qt5-base' # netanim animator + 'openmpi' # MPI for HPC + 'sqlite' # database support for statistics + 'libxml2' # config store + 'boost' 'boost-libs' # openflow switch + 'glibc' 'libpcap' # click + 'gsl' # wireless model fidelity + 'gtk2' # configuration system + # ns-3-pyviz + 'python-pygraphviz' 'goocanvas' 'pygoocanvas' 'pygtk' + # Python bindings auto-generation + 'cmake' 'clang' 'llvm' 'castxml' 'pygccxml' 'python-cxxfilt') +makedepends=('python-pip' 'python-setuptools' 'python-wheel' 'git' 'mercurial' + 'bzr' 'doxygen' 'graphviz' 'imagemagick') +optdepends=('python-sphinx: ns3 manual and tutorial' + 'dia: ns3 manual and tutorial' + 'texlive-bin: ns3 manual and tutorial' + 'uncrustify: utils/check-style.py style check program') provides=('ns3') -conflicts=('ns3' 'ns-3' 'ns3-full' 'ns3-hg') -source=( - "https://www.nsnam.org/release/ns-allinone-${VER_RELEASE}.tar.bz2" - "ns3-hg::hg+http://code.nsnam.org/ns-3-allinone" - "ns3-openflow-hg::hg+http://code.nsnam.org/openflow" - "ns3-click-git::git+https://github.com/kohler/click" - "ns3-brite-hg::hg+http://code.nsnam.org/jpelkey3/BRITE" - "ns3-nsc-hg::hg+https://secure.wand.net.nz/mercurial/nsc" - "ns3-dev-hg::hg+http://code.nsnam.org/ns-3-dev" - "ns3-netanim-hg::hg+http://code.nsnam.org/netanim" - "ns3-bake-hg::hg+http://code.nsnam.org/bake" - "pybindgen-git::git+https://github.com/gjcarneiro/pybindgen.git" - ) - -pkgver_git() { - cd "${srcdir}/${pkgname}" - local ver="$(git show | grep commit | awk '{print $2}' )" - #printf "r%s" "${ver//[[:alpha:]]}" - echo ${ver:0:7} -} - -pkgver_svn() { - cd "${srcdir}/${pkgname}" - local ver="$(svn info | grep Revision | awk '{print $2}' )" - #printf "r%s" "${ver//[[:alpha:]]}" - echo ${ver:0:7} -} - -pkgver_hg() { - #cd "${srcdir}/${pkgname}" - cd "${srcdir}/ns3-dev-hg/" - local ver="$(hg log | grep changeset | head -n 1 | awk '{print $2}' | awk -F: '{print $1}' )" - printf "r%s" "${ver//[[:alpha:]]}" -} - -pkgver() { - if [ ! "${USE_DEV}" = "0" ]; then - pkgver_hg - else - echo $pkgver - fi -} - -prepare() -{ - local DN_PYBINDGEN="$srcdir/pybindgen-git" - local DN_NETANIM="$srcdir/ns3-netanim-hg" - if [ "${USE_DEV}" = "0" ]; then - cd "$srcdir/ns-allinone-$pkgver/" - local FN=`ls | grep pybindgen` - DN_PYBINDGEN="$srcdir/ns-allinone-$pkgver/$FN" - FN=`ls | grep netanim` - DN_NETANIM="$srcdir/ns-allinone-$pkgver/$FN" - fi - - if [ "${USE_DEV}" = "0" ]; then - # already include source for netanim, pybindgen, and ns3-xxx - cd $srcdir/ns-allinone-$pkgver - - sed '1s|^|#!/usr/bin/env python2\n|' -i ns-$pkgver/bindings/python/wscript - sed -e 's|#!/usr/bin/env python$|#!/usr/bin/env python2|g' -i ns-$pkgver/waf - - sed -e 's|program.create_task("SuidBuild")|program.create_task("SuidBuild_task")|' -i ns-$pkgver/wscript +conflicts=('ns3-hg') +source=("https://www.nsnam.org/release/ns-allinone-$pkgver.tar.bz2" + "ns3-brite-hg::hg+https://code.nsnam.org/jpelkey3/BRITE" + "click-git::git+https://github.com/kohler/click" + "ns3-openflow-hg::hg+https://code.nsnam.org/openflow" + "pybindgen-git::git+https://github.com/gjcarneiro/pybindgen") +sha256sums=('25e07a95349847b3e453d3af29a94545a4f869b1c6b4d860900cb7718fb1a618' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') - else - # setup: bake, netanim, pybindgen, and ns-3-dev - cd "${srcdir}/${pkgname}" - - sed '1s|^|#!/usr/bin/env python2\n|' -i ${srcdir}/ns3-dev-hg/bindings/python/wscript - sed -e 's|#!/usr/bin/env python$|#!/usr/bin/env python2|g' -i ${srcdir}/ns3-dev-hg/waf - fi - - echo "Fix python(3) for ns3" - grep -rl '/usr/bin/env python' . \ - | xargs sed -e 's|/usr/bin/env python$|/usr/bin/env python2|g' -i - - if [ ! "${USE_DEV}" = "0" ]; then - echo "update the dev links ..." - rm -f ns-3-dev - rm -f netanim - rm -f bake - rm -f pybindgen - ln -sf ../ns3-dev-hg/ ns-3-dev - ln -sf ../ns3-netanim-hg/ netanim - ln -sf ../ns3-bake-hg/ bake - ln -sf ../pybindgen-git/ pybindgen - echo "Update the .config file ... pwd=`pwd`" - PYTHON=`which python2` ./download.py - fi - - echo "compile openflow lib support ..." - cd $srcdir/ns3-openflow-hg - grep -rl '/usr/bin/env python' . \ - | xargs sed -e 's|/usr/bin/env python$|/usr/bin/env python2|g' -i - echo " waf configure ..." - PYTHON=`which python2` ./waf configure - echo " waf build ..." - PYTHON=`which python2` ./waf build - - echo "compile pybindgen lib support ..." - cd "${DN_PYBINDGEN}" - sed -e 's|#!/usr/bin/env python$|#!/usr/bin/env python2|g' -i waf - grep -rl '/usr/bin/env python' . \ - | xargs sed -e 's|/usr/bin/env python$|/usr/bin/env python2|g' -i - #echo " waf configure ..." - #PYTHON=`which python2` ./waf configure - #echo " waf build ..." - #PYTHON=`which python2` ./waf build - - echo "compile click support ..." - cd $srcdir/ns3-click-git - #autoreconf -if - ./configure --disable-linuxmodule --enable-nsclick --enable-wifi +build() { + # Build brite + cd "$srcdir/ns3-brite-hg" + make + + # Build click + cd "$srcdir/click-git" + sed -i -e '/linux_true/d' include/click/cxxprotect.h # https://github.com/kohler/click/issues/493 + ./configure --prefix=/usr --disable-linuxmodule --enable-nsclick --enable-wifi rm -rf bin - make -j $(nproc) - - echo "compile BRITE ..." - cd $srcdir/ns3-brite-hg - make -j $(nproc) - - - if [ 1 = 1 ]; then - - echo "compile Network Simulation Cradle (NSC) ..." - cd $srcdir/ns3-nsc-hg - - echo "(NSC) replace python2 ..." - grep -rl '/usr/bin/env python' . \ - | while read A; do sed -e 's|/usr/bin/env python$|/usr/bin/python2|g' -i $A; done - echo "(NSC) replace flex ..." - sed -e "s|if not conf.CheckLib('fl') or not exe_exists('flex'):|if not conf.CheckLib('fl') and not exe_exists('flex'):|g" -i SConstruct - sed -e "s|SConscript('test/SConscript')||g" -i SConstruct - echo "(NSC) replace is_function ..." - grep -Hr "is_function(" . | awk -F: '{print $1}' | sort | uniq \ - | while read A; do sed -e 's|is_function(|is_funct(|g' -i $A; done - echo "(NSC) replace is_enum ..." - grep -Hr "is_enum(" . | awk -F: '{print $1}' | sort | uniq \ - | while read A; do sed -e 's|is_enum(|is_enumeration(|g' -i $A; done - - echo "(NSC) replace yylex ..." - grep -Hr "extern int yylex" . | awk -F: '{print $1}' | sort | uniq \ - | while read A; do sed -e 's|extern int yylex();||g' -i $A; done - sed -e 's|class node_t;|class node_t; extern "C" int yylex();|g' -i globaliser/handle_global.h - sed -e 's|#include "parser.tab.hh"|#include "parser.tab.hh"\n#include "handle_global.h"\n|g' -i globaliser/ilex.cc - - echo "(NSC) scons ..." - #python2 scons.py - PYTHON=`which python2` SHLIBSUFFIX=.so ./scons.py -j $(nproc) - - fi -} - -build0() -{ - local DN_PYBINDGEN="$srcdir/pybindgen-git" - if [ "${USE_DEV}" = "0" ]; then - cd "$srcdir/ns-allinone-$pkgver/" - local FN=`ls | grep pybindgen` - DN_PYBINDGEN="$srcdir/ns-allinone-$pkgver/$FN" - fi - - if [ "${USE_DEV}" = "0" ]; then - cd $srcdir/ns-allinone-$pkgver - else - cd "${srcdir}/${pkgname}" - fi - - echo "Build ns-3 with build.py ..." - PYTHON=`which python2` ./build.py \ - --build-options="--progress -j $(nproc)" \ - --qmake-path=/usr/bin/qmake-qt4 \ - -- \ - -d release -o build-shared \ + make + + # Build openflow + cd "$srcdir/ns3-openflow-hg" + ./waf configure --prefix=/usr + ./waf build --progress + + # Build pybindgen + cd "$srcdir/pybindgen-git" + ./waf configure --prefix=/usr --build-profile=release + ./waf build --progress + + # Build netanim + cd "$srcdir/ns-allinone-$pkgver/netanim"-* + qmake NetAnim.pro + make + + # Build ns3 + cd "$srcdir/ns-allinone-$pkgver/ns-$pkgver" + ./waf configure \ + --build-profile=release \ --prefix=/usr \ - --libdir=/usr/lib \ - --with-python=`which python2` \ --progress \ - --enable-mpi \ --enable-sudo \ - --enable-des-metrics \ - --force-planetlab \ - --with-nsclick=$srcdir/ns3-click-git \ - --with-openflow=$srcdir/ns3-openflow-hg \ - --with-brite=$srcdir/ns3-brite-hg \ - --with-nsc=$srcdir/ns3-nsc-hg \ - "--with-pybindgen=${DN_PYBINDGEN}" \ - --enable-examples \ --enable-tests \ - $(NULL) - - # replace directory path - find -L . -name "*.pc" | xargs -n 1 sed -e "s|[^[:blank:]\r\n]\+$srcdir[^[:blank:]\r\n]\+||g" -i -} - -build1() -{ - local DN_PYBINDGEN="$srcdir/pybindgen-git" - if [ "${USE_DEV}" = "0" ]; then - cd "$srcdir/ns-allinone-$pkgver/" - local FN=`ls | grep pybindgen` - DN_PYBINDGEN="$srcdir/ns-allinone-$pkgver/$FN" - fi - - if [ "${USE_DEV}" = "0" ]; then - cd $srcdir/ns-allinone-$pkgver/ns-$pkgver - else - cd "${srcdir}/${pkgname}/ns-3-dev" - fi - echo "Build ns-3 with waf ..." - PYTHON=`which python2` ./waf configure \ - -d release -o build-shared \ - --prefix=/usr \ - --libdir=/usr/lib \ - --with-python=`which python2` \ - --progress \ + --enable-examples \ --enable-mpi \ - --enable-sudo \ --enable-des-metrics \ --force-planetlab \ - --with-nsclick=$srcdir/ns3-click-git \ - --with-openflow=$srcdir/ns3-openflow-hg \ - --with-brite=$srcdir/ns3-brite-hg \ - --with-nsc=$srcdir/ns3-nsc-hg \ - "--with-pybindgen=${DN_PYBINDGEN}" \ - --enable-examples \ - --enable-tests \ - $(NULL) - PYTHON=`which python2` ./waf build --progress -j $(nproc) + --with-brite="$srcdir/ns3-brite-hg" \ + --with-nsclick="$srcdir/click-git" \ + --with-openflow="$srcdir/ns3-openflow-hg" \ + --with-pybindgen="$srcdir/pybindgen-git" + ./waf build --progress + # replace directory path find -L . -name "*.pc" | xargs -n 1 sed -e "s|[^[:blank:]\r\n]\+$srcdir[^[:blank:]\r\n]\+||g" -i - - - local DN_NETANIM="$srcdir/ns3-netanim-hg" - if [ "${USE_DEV}" = "0" ]; then - cd "$srcdir/ns-allinone-$pkgver/" - FN=`ls | grep netanim` - DN_NETANIM="$srcdir/ns-allinone-$pkgver/$FN" - fi - cd "${DN_NETANIM}" - qmake-qt4 NetAnim.pro - make -j 8 -} - -build() { - build1 # replace this } -verify_build() -{ - - LIBVER="3-dev" - if [ "${USE_DEV}" = "0" ]; then - LIBVER="${pkgver}" - fi +check() { + cd "$srcdir/ns-allinone-$pkgver/ns-$pkgver" - if [ "${USE_DEV}" = "0" ]; then - cd $srcdir/ns-allinone-$pkgver/ns-$pkgver - else - cd "${srcdir}/${pkgname}/ns-3-dev" - fi + # brite + # https://www.nsnam.org/docs/models/html/brite.html + ./waf --run brite-generic-example + mpirun -np 2 ./waf --run brite-MPI-example # openflow - # https://www.nsnam.org/docs/release/3.13/models/html/openflow-switch.html - PYTHON=`which python2` ./waf --run openflow-switch - PYTHON=`which python2` ./waf --run "openflow-switch -v" + # https://www.nsnam.org/docs/models/html/openflow-switch.html + ./waf --run "openflow-switch -v" - # NS-3 Click Integration Support + # click # https://www.nsnam.org/docs/models/html/click.html - PYTHON=`which python2` ./waf --run nsclick-simple-lan - - # brite - # https://www.nsnam.org/wiki/BRITE_integration_with_ns-3 - PYTHON=`which python2` ./waf --run 'brite-generic-example --verbose=1' - - # nsc - # https://www.nsnam.org/docs/models/html/tcp.html?#network-simulation-cradle - PYTHON=`which python2` ./test.py -s ns3-tcp-interoperability + ./waf --run nsclick-simple-lan - g++ -std=c++11 \ - `pkg-config --cflags libns${LIBVER}-applications libns${LIBVER}-point-to-point` \ - `pkg-config --libs libns${LIBVER}-applications libns${LIBVER}-point-to-point` \ - -o ns3-first examples/tutorial/first.cc + # ns3 + ./test.py } -package() -{ - if [ "${USE_DEV}" = "0" ]; then - cd $srcdir/ns-allinone-$pkgver/ns-$pkgver - else - cd "${srcdir}/${pkgname}/ns-3-dev" - fi - PYTHON=`which python2` ./waf install \ - --with-python=`which python2` \ - --destdir=$pkgdir/ +package() { + cd "$srcdir/ns-allinone-$pkgver/ns-$pkgver" + ./waf install --prefix=/usr --destdir="$pkgdir" - local LIBVER="3-dev" - if [ "${USE_DEV}" = "0" ]; then - LIBVER="${pkgver}" - fi - local DN_NETANIM="$srcdir/ns3-netanim-hg" - if [ "${USE_DEV}" = "0" ]; then - cd "$srcdir/ns-allinone-$pkgver/" - FN=`ls | grep netanim` - DN_NETANIM="$srcdir/ns-allinone-$pkgver/$FN" - fi - - install -Dm755 "${DN_NETANIM}/NetAnim" ${pkgdir}/usr/bin/ns${LIBVER}-netanim + cd "$srcdir/ns-allinone-$pkgver/netanim"-* + install -Dm 755 ./NetAnim "${pkgdir}/usr/bin/netanim" } -#sha1sums=('59a9a3cfd738c48e17253eb7ed2aaccfc1cc498d' 'SKIP' 'SKIP' 'SKIP') -md5sums=('1f4b667035fdb79471c7319f38595289' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - ) - +# vim: set ts=4 sw=4 et : |