Blob Blame History Raw
Summary:	Simple Video for Linux radio card programs
Name:		fmtools
Version:	1.0.2
Release:	6%{?dist}
License:	GPLv2+
Group:		Applications/Multimedia
URL:		http://www.stanford.edu/~blp/fmtools/
Source0:	http://www.stanford.edu/~blp/%{name}/%{name}-%{version}.tar.gz
Source1:	fmcontrol.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
This is a pair of hopefully useful control programs for Video for Linux
(v4l) radio card drivers.  The focus is on control, so you may find these
programs a bit unfriendly.  Users are encouraged to investigate the source
and create wrappers or new programs based on this design.

 fm	- a simple tuner
 fmscan	- a simple band scanner

The script fmcontrol is something Adrian Lester put together one evening to 
save from himself having to remember frequencies and volumes when using the fm
program from fmtools by Russell Kroll. 

The script does not support any of fm's command line options with the 
exception of volume. 

All that it does is to tune in to a station specified by name at the
frequency and volume specified in $HOME/.fmrc and $HOME/.radiostations
or the volume given on the command line.

%prep
%setup0 -q
# include fmcontrol script
tar xzvf %{SOURCE1}
install -pm 0644 fmcontrol/README README.fmcontrol

# Fix Makefile
sed -i -e 's|/usr/local/bin|%{_bindir}|' Makefile
sed -i -e 's|/usr/local/man|%{_mandir}|' Makefile
sed -i -e 's|-Wall -O2|$(RPM_OPT_FLAGS)|' Makefile

# Remove header
rm videodev.h
sed -i.header -e 's|"videodev.h"|<linux/videodev.h>|'g fm.c fmscan.c

# Add shebang to fmcontrol
sed -i '1i#!/bin/sh' fmcontrol/fmcontrol

%build
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
install -pm 0755 fmcontrol/fmcontrol $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGES COPYING README README.fmcontrol fmcontrol/dot.*
%{_bindir}/*
%{_mandir}/man1/*


%changelog
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Oct 17 2008 kwizart < kwizart at gmail.com > - 1.0.2-4
- Rebuild for F-10

* Sat Feb  9 2008 kwizart < kwizart at gmail.com > - 1.0.2-3
- Rebuild for gcc43

* Fri Sep 21 2007 kwizart <kwizart at gmail.com > - 1.0.2-2
- Fix shebang
- Fix perm on source
- Fix mixed use of spaces and tabs
- Remove internal header to use it from kernel-headers

* Sun Aug 26 2007 kwizart <kwizart at gmail.com > - 1.0.2-1
- Update to 1.0.2

* Mon Sep  4 2006 TC Wan <tcwan@cs.usm.my>
- Built Version 1.0 for FC 5