Mislav Novakovic | 13f38d8 | 2017-05-30 12:56:28 +0200 | [diff] [blame] | 1 | FROM sysrepo/sysrepo-netopeer2:arch_devel |
| 2 | |
| 3 | MAINTAINER mislav.novakovic@sartura.hr |
| 4 | |
| 5 | # install node 7.x and npm |
| 6 | RUN \ |
| 7 | pacman -S --noconfirm \ |
| 8 | nodejs \ |
| 9 | npm |
| 10 | |
| 11 | # latest SWIG version with pull request |
| 12 | RUN \ |
| 13 | cd /opt/dev && \ |
| 14 | git clone https://github.com/swig/swig.git && \ |
| 15 | cd swig && \ |
| 16 | git fetch origin pull/968/head:node7 && \ |
| 17 | git checkout node7 && \ |
| 18 | ./autogen.sh && \ |
| 19 | ./configure --prefix=/usr && \ |
| 20 | make -j2 && \ |
| 21 | make install |
| 22 | |
| 23 | # libyang |
| 24 | RUN \ |
| 25 | cd /opt/dev/libyang/build && \ |
| 26 | cmake -DJAVASCRIPT_BINDING=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:String="Debug" .. && \ |
| 27 | make -j2 && \ |
| 28 | make install && \ |
| 29 | cd javascript && \ |
| 30 | # bugfix for the generate javascript bindings \ |
| 31 | sed -i -- 's/lys_ext_instance_complex()/lys_ext_instance_complex/g' src/libyang_javascript_wrap.cxx && \ |
| 32 | npm install --unsafe-perm && \ |
| 33 | node test.js && \ |
| 34 | ldconfig |