# HG changeset patch # User Christophe Lincoln # Date 1399112043 -7200 # Node ID dee220ae1803b51b88568719349c4e3f87b3ecb8 # Parent f933b84b69df223d57bffd24e636b6bb5ba09f49 Add pi-blaster (PWM on the GPIO pins) diff -r f933b84b69df -r dee220ae1803 pi-blaster/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pi-blaster/receipt Sat May 03 12:14:03 2014 +0200 @@ -0,0 +1,28 @@ +# SliTaz package receipt. + +PACKAGE="pi-blaster" +GITHASH="177cef81774d6df5c6284c198ff818515281db14" +VERSION=${GITHASH:0:6} +CATEGORY="system-tools" +SHORT_DESC="Enables PWM on the GPIO pins you request of a Raspberry Pi." +MAINTAINER="pankso@slitaz.org" +LICENSE="MIT" +TARBALL="$PACKAGE-$VERSION.zip" +WEB_SITE="https://github.com/sarfata/pi-blaster/" +WGET_URL="https://codeload.github.com/sarfata/pi-blaster/zip/$GITHASH" +HOST_ARCH="arm" + +# Rules to configure and make the package. +compile_rules() +{ + sed -i s"/gcc/${HOST_SYSTEM}-gcc/" Makefile && + make +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/etc $fs/usr/sbin + cp -a ${src}/${PACKAGE} ${fs}/usr/sbin + cp -a ${stuff}/init.d $fs/etc +} diff -r f933b84b69df -r dee220ae1803 pi-blaster/stuff/init.d/pi-blaster --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pi-blaster/stuff/init.d/pi-blaster Sat May 03 12:14:03 2014 +0200 @@ -0,0 +1,34 @@ +#!/bin/sh +# Start, stop and restart pi-blaster on SliTaz +# +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. +# + +NAME=$(basename $0) +DESC="$NAME deamon" +DAEMON=$(which $NAME) +OPTIONS="" +PID=$(pidof $NAME) + +case "$1" in + start) + if [ "$PID" ]; then + echo "$NAME is already running..." + else + echo -n "Starting $DESC: $NAME..." + ${DAEMON} ${OPTIONS}; status + fi ;; + stop) + if [ "$PID" ]; then + echo -n "Stopping $DESC: $NAME..." + killall ${NAME} 2>/dev/bull; status + else + echo "$NAME is not running..." + fi ;; + restart) + $0 stop && sleep 1 && $0 start ;; + *) + echo "Usage: $0 [start|stop|restart]" ;; +esac +exit 0