Compiling profanity for raspbian
Install dependencies:
|
|
Compile and install libstrophe:
|
|
Compile and install profanity:
|
|
Run it:
|
|
Install dependencies:
|
|
Compile and install libstrophe:
|
|
Compile and install profanity:
|
|
Run it:
|
|
Sometimes FTP has to be used to transfer files instead of one of the more secure alternatives, like SCP. Since the FTP client ftp
only supports interactive mode, it can be hard to automate when being called from a script.
The script below is used — almost — the same way as a the scp
command is. Its first arguments are files to be copied, and the final argument is the FTP address to send them to, similar to the URI used with scp
.
|
|
This can be useful if you are writing something that is entirely client-side and has to list the contents of directories on the web server. The only limitations are that:
|
|
This can be tested on the console. First define a function ls:
|
|
Then try listing the contents of some directories:
|
|
|
|
Download and configure alsa-lib to compile its static library (libasound.a):
|
|
Compile the library, and install it to the directory just created above (make sure to specify absolute path, in this case “/src/alsa-static-build”):
|
|
Download and compile the re and rem libraries:
|
|
Download and compile baresip with the STATIC option:
|
|
The make above may fail in the linking because it can’t find the static alsa library — if so, it doesn’t matter. Now statically link the baresip binary to all the modules and libasound:
|
|
This should create the binary “baresip”:
|
|
Add the emdedian repository[1]:
|
|
Install ARM cross compilation tools:
|
|
Prepare the build directory that will contain the ARM binaries:
|
|
Download, configure and compile the alsa library[2]:
|
|
Download and configure pjsip:
|
|
Make sure that alsa was found:
|
|
You should see something like:
|
|
Compile pjsip:
|
|
To save precious space, you can delete the include directories that shouldn’t be needed on the device:
|
|
Copy the contents of the build directory into the root directory of the chroot running on the Kindle.
Create a configuration pjsua file with options that optimize for running on a slow device[3]:
|
|
pjsua should now be able to make VoIP calls:
|
|
[1] http://wiki.micromint.com/index.php/Debian_ARM_Cross-compile
[2] http://omappedia.org/wiki/ALSA_Setup#ALSA_library
[3] https://trac.pjsip.org/repos/wiki/audio-check-cpu
Pipe all the raw data received on the interface eth0 to aplay:
|
|
Listen to the network in stereo:
|
|
Use a filter expression to only listen to specific data:
|
|
Using mencoder, this will concatenate all .jpg image files in the current directory to create a time-lapse video at 30 frames per second:
|
|
Assumptions:
|
|
Save the zone file and then add these lines to /etc/bind/named.conf.local:
|
|
replacing the path to point to the location of the zone file you just created. If the web server that listens to update requests from clients (that we will set up below) is not on the same machine as Bind, it has to be added to “allow-update” above instead of “127.0.0.1”.
Now download this script and put it the appropriate directory so that it is accessible on your web server at “/nic/update” (for example, “dns.example.com/nic/update”): update.php
You will need to use Apache’s MultiViews or mod_rewrite to ensure that the script is accessible at “/nic/update” and not just “/nic/update.php”.
Update the config section to contain the correct zone information along with the authentication credentials that the dynamic DNS updater client script will use. ddclient is such a client.
This iptables rules script protects against attacks where clients send many “getstatus” or “getinfo” requests, slowing down the server.
|
|