wok-6.x annotate pifmrds/receipt @ rev 23183
updated mm-common (0.9.12 -> 1.0.0)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Mar 19 16:54:07 2020 +0100 (2020-03-19) |
parents | 88c057127e4a |
children | 89c8d8b6cf48 |
rev | line source |
---|---|
pascal@16718 | 1 # SliTaz package receipt. |
pascal@16718 | 2 |
pascal@16718 | 3 PACKAGE="pifmrds" |
pascal@16718 | 4 GITHASH="c67306ea9b8d827f45e0d90279d367e97119bcb1" |
pascal@16718 | 5 VERSION=${GITHASH:0:7} |
pascal@16718 | 6 CATEGORY="system-tools" |
pascal@16718 | 7 SHORT_DESC="FM-RDS transmitter using the Raspberry Pi's PWM." |
pascal@16718 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@16718 | 9 LICENSE="GPL3" |
pascal@16718 | 10 WEB_SITE="https://github.com/ChristopheJacquet/PiFmRds" |
pascal@16718 | 11 TARBALL="$PACKAGE-$VERSION.zip" |
pascal@16718 | 12 WGET_URL="$WEB_SITE/archive/$GITHASH.zip" |
pascal@16718 | 13 HOST_ARCH="arm" |
pascal@16718 | 14 TAGS="radio FM RDS" |
pascal@16718 | 15 SUGGESTED="sox" |
pascal@16718 | 16 |
pascal@16718 | 17 DEPENDS="libsndfile" |
pascal@16718 | 18 BUILD_DEPENDS="wget libsndfile-dev" |
pascal@16718 | 19 |
pascal@16718 | 20 # Rules to configure and make the package. |
pascal@16718 | 21 compile_rules() |
pascal@16718 | 22 { |
pascal@16718 | 23 cd $src/src |
pascal@16721 | 24 sed -i 's|^CC|# &|;/^ifeq/d;/^else/,/^endif/d;s|-march.*$||' Makefile |
pascal@16718 | 25 make |
pascal@16718 | 26 } |
pascal@16718 | 27 |
pascal@16718 | 28 # SliTaz package testsuite |
pascal@16718 | 29 testsuite() { |
pascal@16721 | 30 readelf -Ah $src/src/pi_fm_rds |
pascal@16718 | 31 } |
pascal@16718 | 32 |
pascal@16718 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@16718 | 34 genpkg_rules() |
pascal@16718 | 35 { |
pascal@16721 | 36 mkdir -p $fs/usr/sbin |
pascal@16721 | 37 cp $src/src/pi_fm_rds $fs/usr/sbin |
pascal@16718 | 38 cat > $fs/usr/sbin/pifmogg.sh <<EOT |
pascal@16718 | 39 #!/bin/sh |
pascal@16718 | 40 |
pascal@16718 | 41 fifo=/tmp/pifmogg$$ |
pascal@16718 | 42 mkfifo $fifo |
pascal@16718 | 43 find $@ -name '*.ogg' -or -name '*.wav' -print | while read file ; do |
pascal@16718 | 44 echo "RT $(basename $file .ogg)" > $FIFO |
pascal@16718 | 45 cat $file |
pascal@16718 | 46 done | pi_fm_rds -audio - -ctl $fifo -freq ${FM_FREQ:-107.9} \ |
pascal@16718 | 47 -ps ${RDS_SERVICE:-RASP-PI} -pi ${RDS_ID:-$(printf "%04X" $RANDOM)} |
pascal@16718 | 48 rm -f $fifo |
pascal@16718 | 49 EOT |
pascal@16718 | 50 chmod +x $fs/usr/sbin/pifmogg.sh |
pascal@16718 | 51 } |