wok rev 16577
Add pi-blaster (PWM on the GPIO pins)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 03 12:14:03 2014 +0200 (2014-05-03) |
parents | f933b84b69df |
children | 4d5ea5783430 |
files | pi-blaster/receipt pi-blaster/stuff/init.d/pi-blaster |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/pi-blaster/receipt Sat May 03 12:14:03 2014 +0200 1.3 @@ -0,0 +1,28 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="pi-blaster" 1.7 +GITHASH="177cef81774d6df5c6284c198ff818515281db14" 1.8 +VERSION=${GITHASH:0:6} 1.9 +CATEGORY="system-tools" 1.10 +SHORT_DESC="Enables PWM on the GPIO pins you request of a Raspberry Pi." 1.11 +MAINTAINER="pankso@slitaz.org" 1.12 +LICENSE="MIT" 1.13 +TARBALL="$PACKAGE-$VERSION.zip" 1.14 +WEB_SITE="https://github.com/sarfata/pi-blaster/" 1.15 +WGET_URL="https://codeload.github.com/sarfata/pi-blaster/zip/$GITHASH" 1.16 +HOST_ARCH="arm" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + sed -i s"/gcc/${HOST_SYSTEM}-gcc/" Makefile && 1.22 + make 1.23 +} 1.24 + 1.25 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.26 +genpkg_rules() 1.27 +{ 1.28 + mkdir -p $fs/etc $fs/usr/sbin 1.29 + cp -a ${src}/${PACKAGE} ${fs}/usr/sbin 1.30 + cp -a ${stuff}/init.d $fs/etc 1.31 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/pi-blaster/stuff/init.d/pi-blaster Sat May 03 12:14:03 2014 +0200 2.3 @@ -0,0 +1,34 @@ 2.4 +#!/bin/sh 2.5 +# Start, stop and restart pi-blaster on SliTaz 2.6 +# 2.7 +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS 2.8 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. 2.9 +# 2.10 + 2.11 +NAME=$(basename $0) 2.12 +DESC="$NAME deamon" 2.13 +DAEMON=$(which $NAME) 2.14 +OPTIONS="" 2.15 +PID=$(pidof $NAME) 2.16 + 2.17 +case "$1" in 2.18 + start) 2.19 + if [ "$PID" ]; then 2.20 + echo "$NAME is already running..." 2.21 + else 2.22 + echo -n "Starting $DESC: $NAME..." 2.23 + ${DAEMON} ${OPTIONS}; status 2.24 + fi ;; 2.25 + stop) 2.26 + if [ "$PID" ]; then 2.27 + echo -n "Stopping $DESC: $NAME..." 2.28 + killall ${NAME} 2>/dev/bull; status 2.29 + else 2.30 + echo "$NAME is not running..." 2.31 + fi ;; 2.32 + restart) 2.33 + $0 stop && sleep 1 && $0 start ;; 2.34 + *) 2.35 + echo "Usage: $0 [start|stop|restart]" ;; 2.36 +esac 2.37 +exit 0