updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / omnetpp / PKGBUILD
blob7459a64f69f45ec789ec549efa5f5ac853b4ef98
1 pkgname="omnetpp"
2 pkgver=3.4b2
3 pkgrel=3
4 pkgdesc="OMNeT++ is a discrete event simulation environment"
5 url="http://www.omnetpp.org"
6 license="Academic Public License"
7 depends=(graphviz giftrans blt)
8 makedepends=(libxml2)
9 arch=('i686' 'x86_64')
10 source=(http://www.omnetpp.org/download/release/${pkgname}-${pkgver}-src.tgz
11         'omnetpp-3.4b2.patch')
12 md5sums=('ea7f427d942f2439494869745423e453'
13          '1db7ec020e3fffb026c0954dc86bc7e7')
15 build() {
16         cd ${startdir}/src/${pkgname}-${pkgver}
17         PATH=$PATH:${startdir}/src/${pkgname}-${pkgver}/bin
18         LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${startdir}/src/${pkgname}-${pkgver}/lib 
19         
20         # patches
21         cat ${startdir}/src/omnetpp-3.4b2.patch | patch -p 0 || return 1 
22         sed "s|#OMNETPP_BITMAP_PATH=\"./bitmaps;\$OMNETPP_ROOT/bitmaps\"|OMNETPP_BITMAP_PATH=\"./bitmaps;/usr/share/omnetpp/bitmaps\"|" -i configure.user
23         
24         # configure
25         ./configure --prefix=/usr
26         make || return 1
27         
28         # install binaries
29         mkdir -p ${startdir}/pkg/usr/bin
30         install -m755 bin/* ${startdir}/pkg/usr/bin
32         # change directories in opp_makemake
33         sed "s|${startdir}/src/${pkgname}-${pkgver}|/usr|g" -i ${startdir}/pkg/usr/bin/opp_makemake
34         sed "s|OMNETPP_INCL_DIR=/usr/include|OMNETPP_INCL_DIR=/usr/include/omnetpp|" -i ${startdir}/pkg/usr/bin/opp_makemake
35         
36         # install libs
37         mkdir -p ${startdir}/pkg/usr/lib
38         install lib/* ${startdir}/pkg/usr/lib
40         # install includes
41         mkdir -p ${startdir}/pkg/usr/include/omnetpp
42         mkdir -p ${startdir}/pkg/usr/include/omnetpp/platdep
43         install -m644 include/*.h ${startdir}/pkg/usr/include/omnetpp
44         install -m644 include/platdep/*.h ${startdir}/pkg/usr/include/omnetpp/platdep
45         
46         # install demos,doc and bitmaps
47         install -d ${startdir}/pkg/usr/share/omnetpp/{bitmaps,doc,samples}
48         cp -R bitmaps/* ${startdir}/pkg/usr/share/omnetpp/bitmaps
49         cp -R doc/* ${startdir}/pkg/usr/share/omnetpp/doc
50         cp -R samples/* ${startdir}/pkg/usr/share/omnetpp/samples
51