Installation instructions¶
Installation (for Mac OS X)¶
Make sure you have brew installed and updated: http://brew.sh/.
brew install lopter/lightsd/lightsd
Or,
brew tap lopter/lightsd
brew install lightsd
Please, also install Python 3 and ipython if you want to follow the examples in the next section:
brew install python3
pip3 install ipython
Read on First steps to see how to use lightsd.
Installation (for Arch Linux)¶
Note
A pre-built package may already exist at: https://downloads.lightsd.io/archlinux/ for your convenience.
Make sure you have Yaourt installed: https://archlinux.fr/yaourt-en (wiki page):
yaourt -Sya lightsd
Make sure to follow the post-installation instructions: replace $USER
with
the user you usually use.
Please also install ipython if you want to follow the examples in the next section:
yaourt -Sya ipython
Read on First steps to see how to use lightsd.
Installation (for Debian/Raspbian)¶
Check if an appropriate package exists at: https://downloads.lightsd.io/debian/.
Download it and install it with dpkg -i
.
If you were able to install lightsd from a package then read on First steps to see how to use lightsd. Otherwise look for the Debian/Ubuntu build instructions below.
Installation (for OpenWRT)¶
Check if a package already exists at: https://downloads.lightsd.io/openwrt/. If
that’s the case transfer it to your device and install the package with opkg
install
. The lightsd package will depend on libevent2-core
.
If you were able to install lightsd from a package then read on First steps to see how to use lightsd. Otherwise look for the OpenWRT build instructions below.
Build instructions (for Debian based systems, including Ubuntu/Raspbian)¶
Note
Those instructions have been tested on Debian Wheezy & Jessie.
Install the following packages:
apt-get install build-essential cmake libevent-dev git ca-certificates ipython3 fakeroot wget devscripts debhelper
Download and extract lightsd:
wget -O lightsd_1.2.1.orig.tar.gz https://downloads.lightsd.io/releases/lightsd-1.2.1.tar.gz tar -xzf lightsd_1.2.1.orig.tar.gz cd lightsd-1.2.1 wget -O - https://downloads.lightsd.io/releases/dpkg-1.2.1.tar.gz | tar -xzf -
Build the package:
debuild -uc -us
Install the package:
Note
You will need to run this command as root with sudo(8) or be logged in as root already.
dpkg -i ../lightsd_1.2.1-1_$(dpkg --print-architecture).deb
Still as root, run the command the package asks you to run:
gpasswd -a $USER lightsd
Note
Unless you are using sudo, don’t forget to replace $USER with your username.
Log out and back in as $USER
for the change to take effect.
Read on First steps to see how to use lightsd.
Build instructions (for OpenWRT)¶
Follow the buildroot instructions then, from your build root, just add lightsd’s feed:
cat >>feeds.conf$([ -f feeds.conf ] || echo .default) <<EOF
src-git lightsd https://github.com/lopter/openwrt-lightsd.git
EOF
./scripts/feeds update -a
Install lightsd:
./scripts/feeds install lightsd
Run your usual make menuconfig
, make
firmware flash flow, lightsd should
be running at startup. If you only wish the build the lightsd package and not
the entire system follow the single package howto.
Read on First steps to see how to use lightsd.
Build instructions (for other systems)¶
lightsd should work on any slightly POSIX system (i.e: not Windows), make sure you have the following requirements installed:
- libevent ≥ 2.0.19 (released May 2012);
- CMake ≥ 2.8.9 (released August 2012).
lightsd is developed and tested from Arch Linux, Debian, OpenBSD and Mac OS X; both for 32/64 bits and little/big endian architectures.
Please also install ipython with Python 3 if you want to follow the examples in the next section.
From a terminal prompt, clone the repository and move to the root of it:
git clone https://github.com/lopter/lightsd.git
cd lightsd
From the root of the repository:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
make -j5 lightsd
Read on First steps to see how to use lightsd.