updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / omnetpp-lt3 / PKGBUILD
blob2fdf296d73ca2116e1ebef5d61b0de47d53f0ba8
1 # Author: Adria Arrufat <swiftscythe@gmail.com>
4 pkgname="omnetpp-lt3"
5 _pkgname="omnetpp"
6 pkgver=3.3p1
7 pkgrel=2
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')
19 build() {
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 
23         
24         # patches
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
27         
28         # configure
29         ./configure --prefix=/usr
30         make -j 1|| return 1
31         
32         # install binaries
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
39         
40         # install libs
41         mkdir -p ${startdir}/pkg/usr/lib
42         install lib/* ${startdir}/pkg/usr/lib
44         # install includes
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
49         
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
55     
56