1 # Author: Adria Arrufat <swiftscythe@gmail.com>
8 pkgdesc="OMNeT++ is a discrete event simulation environment. Version used in LT3 at UPC"
9 url="http://www.omnetpp.org"
10 license="Academic Public License"
11 depends=('graphviz' 'giftrans' 'blt')
12 makedepends=('libxml2')
13 arch=('i686' 'x86_64')
14 install=omnetpp.install
15 source=(http://omnetpp.org/download/release/$_pkgname-$pkgver-src.tgz
16 'omnetpp-3.3p1-gcc-4.4.patch')
17 md5sums=('172346e30cd7958da655213f5bd056ff'
18 '517838dddbc626a8e176c87a592bdb09')
20 cd ${startdir}/src/${_pkgname}-${pkgver}
21 PATH=$PATH:${startdir}/src/${_pkgname}-${pkgver}/bin
22 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${startdir}/src/${_pkgname}-${pkgver}/lib
25 patch -p1 < ../omnetpp-3.3p1-gcc-4.4.patch || return 1
26 sed "s|#OMNETPP_BITMAP_PATH=\"./bitmaps;\$OMNETPP_ROOT/bitmaps\"|OMNETPP_BITMAP_PATH=\"./bitmaps;/usr/share/omnetpp/bitmaps\"|" -i configure.user
29 ./configure --prefix=/usr
33 mkdir -p ${startdir}/pkg/usr/bin
34 install -m755 bin/* ${startdir}/pkg/usr/bin
36 # change directories in opp_makemake
37 sed "s|${startdir}/src/${_pkgname}-${pkgver}|/usr|g" -i ${startdir}/pkg/usr/bin/opp_makemake
38 sed "s|OMNETPP_INCL_DIR=/usr/include|OMNETPP_INCL_DIR=/usr/include/omnetpp|" -i ${startdir}/pkg/usr/bin/opp_makemake
41 mkdir -p ${startdir}/pkg/usr/lib
42 install lib/* ${startdir}/pkg/usr/lib
45 mkdir -p ${startdir}/pkg/usr/include/omnetpp
46 mkdir -p ${startdir}/pkg/usr/include/omnetpp/platdep
47 install -m644 include/*.h ${startdir}/pkg/usr/include/omnetpp
48 install -m644 include/platdep/*.h ${startdir}/pkg/usr/include/omnetpp/platdep
50 # install demos,doc and bitmaps
51 install -d ${startdir}/pkg/usr/share/omnetpp/{bitmaps,doc,samples}
52 cp -R bitmaps/* ${startdir}/pkg/usr/share/omnetpp/bitmaps
53 cp -R doc/* ${startdir}/pkg/usr/share/omnetpp/doc
54 cp -R samples/* ${startdir}/pkg/usr/share/omnetpp/samples