wok-6.x view pifmrds/receipt @ 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 | |
children | 65916402b97c |
line source
1 # SliTaz package receipt.
3 PACKAGE="pifmrds"
4 GITHASH="c67306ea9b8d827f45e0d90279d367e97119bcb1"
5 VERSION=${GITHASH:0:7}
6 CATEGORY="system-tools"
7 SHORT_DESC="FM-RDS transmitter using the Raspberry Pi's PWM."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL3"
10 WEB_SITE="https://github.com/ChristopheJacquet/PiFmRds"
11 TARBALL="$PACKAGE-$VERSION.zip"
12 WGET_URL="$WEB_SITE/archive/$GITHASH.zip"
13 HOST_ARCH="arm"
14 TAGS="radio FM RDS"
15 SUGGESTED="sox"
17 DEPENDS="libsndfile"
18 BUILD_DEPENDS="wget libsndfile-dev"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 cd $src/src
24 sed -i "s|STD_CFLAGS = |&-I/cross/$ARCH/sysroot/usr/include |" Makefile
25 make
26 }
28 # SliTaz package testsuite
29 testsuite() {
30 readelf -Ah $src/pi_fm_rds
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir $fs/usr/sbin
37 cp $src/pi_fm_rds $fs/usr/sbin
38 cat > $fs/usr/sbin/pifmogg.sh <<EOT
39 #!/bin/sh
41 fifo=/tmp/pifmogg$$
42 mkfifo $fifo
43 find $@ -name '*.ogg' -or -name '*.wav' -print | while read file ; do
44 echo "RT $(basename $file .ogg)" > $FIFO
45 cat $file
46 done | pi_fm_rds -audio - -ctl $fifo -freq ${FM_FREQ:-107.9} \
47 -ps ${RDS_SERVICE:-RASP-PI} -pi ${RDS_ID:-$(printf "%04X" $RANDOM)}
48 rm -f $fifo
49 EOT
50 chmod +x $fs/usr/sbin/pifmogg.sh
51 }