wok rev 16718

Add pifmrds (does not build yet)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jun 01 17:53:40 2014 +0000 (2014-06-01)
parents 6f136968d1ac
children 7309fd1536fe
files pifmrds/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pifmrds/receipt	Sun Jun 01 17:53:40 2014 +0000
     1.3 @@ -0,0 +1,51 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="pifmrds"
     1.7 +GITHASH="c67306ea9b8d827f45e0d90279d367e97119bcb1"
     1.8 +VERSION=${GITHASH:0:7}
     1.9 +CATEGORY="system-tools"
    1.10 +SHORT_DESC="FM-RDS transmitter using the Raspberry Pi's PWM."
    1.11 +MAINTAINER="pascal.bellard@slitaz.org"
    1.12 +LICENSE="GPL3"
    1.13 +WEB_SITE="https://github.com/ChristopheJacquet/PiFmRds"
    1.14 +TARBALL="$PACKAGE-$VERSION.zip"
    1.15 +WGET_URL="$WEB_SITE/archive/$GITHASH.zip"
    1.16 +HOST_ARCH="arm"
    1.17 +TAGS="radio FM RDS"
    1.18 +SUGGESTED="sox"
    1.19 +
    1.20 +DEPENDS="libsndfile"
    1.21 +BUILD_DEPENDS="wget libsndfile-dev"
    1.22 +
    1.23 +# Rules to configure and make the package.
    1.24 +compile_rules()
    1.25 +{
    1.26 +	cd $src/src
    1.27 +	sed -i "s|STD_CFLAGS = |&-I/cross/$ARCH/sysroot/usr/include |" Makefile
    1.28 +	make
    1.29 +}
    1.30 +
    1.31 +# SliTaz package testsuite
    1.32 +testsuite() {
    1.33 +	readelf -Ah $src/pi_fm_rds
    1.34 +}
    1.35 +
    1.36 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.37 +genpkg_rules()
    1.38 +{
    1.39 +	mkdir $fs/usr/sbin
    1.40 +	cp $src/pi_fm_rds $fs/usr/sbin
    1.41 +	cat > $fs/usr/sbin/pifmogg.sh <<EOT
    1.42 +#!/bin/sh
    1.43 +
    1.44 +fifo=/tmp/pifmogg$$
    1.45 +mkfifo $fifo
    1.46 +find $@ -name '*.ogg' -or -name '*.wav' -print | while read file ; do
    1.47 +	echo "RT $(basename $file .ogg)" > $FIFO
    1.48 +	cat $file
    1.49 +done | pi_fm_rds -audio - -ctl $fifo -freq ${FM_FREQ:-107.9} \
    1.50 +	-ps ${RDS_SERVICE:-RASP-PI} -pi ${RDS_ID:-$(printf "%04X" $RANDOM)}
    1.51 +rm -f $fifo
    1.52 +EOT
    1.53 +	chmod +x $fs/usr/sbin/pifmogg.sh
    1.54 +}