forked from openwisp/openwisp-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-dev.sh
executable file
·29 lines (29 loc) · 1.02 KB
/
install-dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# --- installs development dependencies ---
# --- designed for debian linux systems ---
set -e
export CFLAGS="-Wno-error"
apt-get update
# install cmake and git
apt-get install -y cmake git-core
# install lua
apt-get install -y lua5.1 liblua5.1-0-dev luarocks
# install json-c
apt-get install -y dh-autoreconf
git clone https://github.com/json-c/json-c.git --depth=1 && cd json-c
sh autogen.sh && ./configure && make && make install && cd ..
# install openwrt libubox and uci
git clone https://git.openwrt.org/project/libubox.git --depth=1 && cd libubox
cmake . && make install && cd ..
git clone https://git.openwrt.org/project/uci.git --depth=1 && cd uci
cmake . && make install && cd ..
# update links to shared libraries
ldconfig -v
# install luafilesystem
luarocks install luafilesystem
# install luaunit
git clone https://github.com/bluebird75/luaunit.git --depth=1
mkdir -p /usr/share/lua/5.1/
cd luaunit && cp luaunit.lua /usr/share/lua/5.1/ && cd ..
test -f /usr/share/lua/5.1/luaunit.lua
# clean
rm -rf json-c libubox uci luaunit