blob: 052dce1f22838ce2354c9bde9db6425e6b0bf584 [file] [log] [blame]
Mislav Novakovic13f38d82017-05-30 12:56:28 +02001FROM sysrepo/sysrepo-netopeer2:arch_devel
2
3MAINTAINER mislav.novakovic@sartura.hr
4
5# install node 7.x and npm
6RUN \
7 pacman -S --noconfirm \
8 nodejs \
9 npm
10
11# latest SWIG version with pull request
12RUN \
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
24RUN \
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