rpms/fmtools/F-12 fmtools.desktop, NONE, 1.1 fmtools.patch, NONE, 1.1 import.log, NONE, 1.1 radio.png, NONE, 1.1 tkradio, NONE, 1.1 tkradio-mute, NONE, 1.1 .cvsignore, 1.2, 1.3 fmtools.spec, 1.5, 1.6 sources, 1.2, 1.3

Paulo Roma Cavalcanti roma at fedoraproject.org
Mon Dec 21 11:22:44 UTC 2009


Author: roma

Update of /cvs/pkgs/rpms/fmtools/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3063/F-12

Modified Files:
	.cvsignore fmtools.spec sources 
Added Files:
	fmtools.desktop fmtools.patch import.log radio.png tkradio 
	tkradio-mute 
Log Message:
import of version 2.0


--- NEW FILE fmtools.desktop ---

[Desktop Entry]
Name=tkradio
Comment=Tcl/Tk wrapper for fmtools
Exec=tkradio-mute.tcl
Icon=radio
Terminal=0
Type=Application
StartupNotify=false
StartupWMClass=tkradio
Encoding=UTF-8
Categories=Application;AudioVideo;
X-Desktop-File-Install-Version=0.15

fmtools.patch:
 fmlib.c  |    1 +
 fmscan.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE fmtools.patch ---
diff -Naur fmtools-2.0/fmlib.c fmtools-2.0-new/fmlib.c
--- fmtools-2.0/fmlib.c	2009-12-13 19:27:45.000000000 -0200
+++ fmtools-2.0-new/fmlib.c	2009-12-20 08:15:14.000000000 -0200
@@ -70,6 +70,7 @@
 void
 tuner_open(struct tuner *tuner, const char *device, int index)
 {
+        memset(tuner, 0, sizeof *tuner);
         if (!device)
                 device = "/dev/radio0";
         else if (!strcmp(device, "test") || !strncmp(device, "test ", 5)) {
diff -Naur fmtools-2.0/fmscan.c fmtools-2.0-new/fmscan.c
--- fmtools-2.0/fmscan.c	2009-12-13 19:34:20.000000000 -0200
+++ fmtools-2.0-new/fmscan.c	2009-12-20 08:15:45.000000000 -0200
@@ -151,7 +151,7 @@
 		totsig = 0;
 		for (i = 0; i < tries; i++) {
                         totsig += tuner_get_signal(&tuner);
-			perc = totsig / (65535.0 * i);
+			perc = totsig / (65535.0 * (i + 1));
                         if (!quiet) {
                                 printf("%2.1f: checking: %3.1f%% (%d/%d)"
                                        "    \r",


--- NEW FILE import.log ---
fmtools-2_0-3_fc12:F-12:fmtools-2.0-3.fc12.src.rpm:1261394532


--- NEW FILE tkradio ---
#!/usr/bin/wish
# Matt Willis - simple tk interface to fmtools 
# The radio keeps on after leaving.
# -*- tcl -*-

# These are stations in the Rio de Janeiro area. Customize for your own locale.
set stations \
        "
	MPB          90.3 
        CBN          92.5 
	BandNews     94.9
        PARADISO     95.7
	Nativa       96.5
	98FM         98.0 
	MEC          98.9 
	JBFM         99.7
	O_Dia        100.5
	Transamerica 101.3
	JovenPan     102.1
	Oi           102.9
	Antena1	     103.7
	"

# intial volume
set volume 100
set n [expr [llength $stations]/2]
# default radio station
set radbut 3

# make tuner buttons
frame .labels
for {set i 0} {$i<$n} {incr i 1} {
    radiobutton .r$i -value $i -variable radbut \
	    -text [lindex $stations [expr $i *2]] -command setstation
    pack .r$i -anchor w -in .labels
}

# turns the radio on
eval exec fm on

frame .rhs
scale .vol -orient horizontal -from 0 -to 100 -showvalue 0 \
	-variable volume -label Volume:
entry .stn -bg black -fg yellow -font "-*-helvetica-*-r-*-*-60-*-*-*-*-*-*-*" \
	-width 6 -justify right -state disabled
button .exit -command exit -text exit
pack .vol .stn .exit -in .rhs

pack .labels .rhs -side left
.vol configure -command setvolume

proc setstation {} {
    global stations radbut volume
#   roma 20091221
#   eval exec fm [lindex $stations [expr $radbut*2+1]] $volume
    eval exec fm [lindex $stations [expr $radbut*2+1]]
    eval exec amixer -c 0 set PCM $volume%
    .stn configure -state normal
    .stn delete 0 end
    .stn insert 0  [lindex $stations [expr $radbut*2+1]]
    .stn configure -state disabled
}

proc setvolume {sliderval} {
    setstation
}


--- NEW FILE tkradio-mute ---
#!/usr/bin/wish
# Matt Willis - simple tk interface to fmtools
# mute button added by James Smith
# The radio is turned off after leaving.
# -*- tcl -*-

# These are stations in the Rio de Janeiro area. Customize for your own locale.
set stations \
        "
        MPB          90.3
        CBN          92.5
        BandNews     94.9
        PARADISO     95.7
        Nativa       96.5
        98FM         98.0
        MEC          98.9
        JBFM         99.7
        O_Dia        100.5
        Transamerica 101.3
        JovenPan     102.1
        Oi           102.9
        Antena1      103.7
        "

# initial volume [0,100]
set volume 100
set n [expr [llength $stations]/2]
# default radio station
set radbut 3
set rvol 100
set state 0

# make tuner buttons
frame .labels
for {set i 0} {$i<$n} {incr i 1} {
    radiobutton .r$i -value $i -variable radbut \
     -text [lindex $stations [expr $i *2]] -command setstation
    pack .r$i -anchor w -in .labels
}

# turns the radio on
eval exec fm on

frame .rhs
scale .vol -orient horizontal -from 0 -to 100 -showvalue 0 \
 -variable volume -label Volume:
entry .stn -bg black -fg green -font "-*-helvetica-*-r-*-*-20-*-*-*-*-*-*-*" \
 -width 6 -justify right -state disabled
button .exit -command out -text exit
button .mute -command mute -text mute

pack .vol .stn .exit .mute -in .rhs


pack .labels .rhs -side left
.vol configure -command setvolume

proc setstation {} {
    global stations radbut volume
#   roma 20091221
#   eval exec fm [lindex $stations [expr $radbut*2+1]] $volume
    eval exec fm [lindex $stations [expr $radbut*2+1]]
    eval exec amixer -c 0 set PCM $volume%
    .stn configure -state normal
    .stn delete 0 end
    .stn insert 0  [lindex $stations [expr $radbut*2+1]]
    .stn configure -state disabled
}

proc setvolume {sliderval} {
    setstation
}

proc out {} {
    global stations radbut volume
#   roma 20070217
#   eval exec fm [lindex $stations [expr $radbut*2+1]] 0
    eval exec fm off
    exit
}

proc mute {} {
    global stations radbut volume rvol state
    if {$state==0} {
    set rvol $volume
#   roma 20070217
#   eval exec fm [lindex $stations [expr $radbut*2+1]] 0
    eval exec fm off
    set state 1
    .mute config -text unmute

    } else {
#   eval exec fm [lindex $stations [expr $radbut*2+1]] $volume
    eval exec fm on
    set state 0
    .mute config -text mute
    }
}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/fmtools/F-12/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- .cvsignore	24 Sep 2007 20:31:43 -0000	1.2
+++ .cvsignore	21 Dec 2009 11:22:43 -0000	1.3
@@ -1,2 +1,2 @@
 fmcontrol.tar.gz
-fmtools-1.0.2.tar.gz
+fmtools-2.0.tar.gz


Index: fmtools.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fmtools/F-12/fmtools.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- fmtools.spec	24 Jul 2009 22:58:43 -0000	1.5
+++ fmtools.spec	21 Dec 2009 11:22:43 -0000	1.6
@@ -1,71 +1,109 @@
-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)
+Summary: Simple Video for Linux radio card programs
+Name:    fmtools
+Version: 2.0
+Release: 3%{?dist}
+License: GPLv2+
+Group:   Applications/Multimedia
+URL:     http://www.stanford.edu/~blp/fmtools/
+Source0: http://benpfaff.org/fmtools/fmtools/%{name}-%{version}.tar.gz
+Patch0:  fmtools.patch
+Source1: fmcontrol.tar.gz
+Source2: http://www.stanford.edu/~blp/fmtools/tkradio
+Source3: http://www.stanford.edu/~blp/fmtools/tkradio-mute
+Source4: fmtools.desktop
+Source5: radio.png
+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
+(v4l2) 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
+fm      - a simple tuner
+fmscan  - a simple band scanner
 
-The script fmcontrol is something Adrian Lester put together one evening to 
+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. 
+program from fmtools by Russell Kroll.
 
-The script does not support any of fm's command line options with the 
-exception of volume. 
+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
+%package tkradio
+Summary:       Tcl/Tk wrapper for fmtools
+Group:         Applications/Multimedia
+BuildRequires: desktop-file-utils
+Requires:      %{name} = %{version}
+Requires:      tk, alsa-utils
+BuildArch:     noarch
+
+%description tkradio
+This package contains wrappers for providing a GUI to %{name}.
+The stations are currently hard coded, but it is easy to change 
+them with a simple text editor. 
 
-# 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
+%prep
+%setup -q -a1
+%patch0 -p1 -b .fmtools
 
 # Add shebang to fmcontrol
 sed -i '1i#!/bin/sh' fmcontrol/fmcontrol
 
 %build
-make %{?_smp_mflags}
+%configure
+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}
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+install -pm 0755 %{SOURCE2} %{buildroot}%{_bindir}/tkradio.tcl
+install -pm 0755 %{SOURCE3} %{buildroot}%{_bindir}/tkradio-mute.tcl
+install -pm 0755 fmcontrol/fmcontrol %{buildroot}%{_bindir}
+install -pm 0644 fmcontrol/README README.fmcontrol
+
+# menu entry
+desktop-file-install                                    \
+        --vendor ""                                     \
+        --dir %{buildroot}%{_datadir}/applications      \
+        %{SOURCE4}
+
+install -Dpm 0644 %{SOURCE5} %{buildroot}%{_datadir}/pixmaps/radio.png
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
-%files
+%files 
 %defattr(-,root,root,-)
-%doc CHANGES COPYING README README.fmcontrol fmcontrol/dot.*
-%{_bindir}/*
-%{_mandir}/man1/*
+%doc README COPYING README.fmcontrol fmcontrol/dot.*
+# Executables and man pages
+%{_bindir}/fm
+%{_bindir}/fmscan
+%{_bindir}/fmcontrol
 
+%files tkradio
+%defattr(-,root,root,-)
+%{_bindir}/tkradio*.tcl
+%{_datadir}/applications/fmtools.desktop
+%{_datadir}/pixmaps/radio.png
 
 %changelog
+
+* Sun Dec 20 2009 Paulo Roma <roma at lcg.ufrj.br> 2.0-3
+- Packaging tkradio separately.
+
+* Sun Dec 20 2009 Paulo Roma <roma at lcg.ufrj.br> 2.0-2
+- Patched to make it work.
+- Added desktop entry.
+
+* Sun Dec 13 2009 Paulo Roma <roma at lcg.ufrj.br> 2.0-1
+- Initial v4l2 support provided by version 2.0
+- Included tkradio and fmcontrol.
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.2-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
@@ -75,7 +113,7 @@ rm -rf $RPM_BUILD_ROOT
 * 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
+* Sat Feb 09 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
@@ -87,6 +125,5 @@ rm -rf $RPM_BUILD_ROOT
 * 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 at cs.usm.my>
+* Mon Sep 04 2006 TC Wan <tcwan at cs.usm.my>
 - Built Version 1.0 for FC 5
-


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/fmtools/F-12/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sources	24 Sep 2007 20:31:43 -0000	1.2
+++ sources	21 Dec 2009 11:22:43 -0000	1.3
@@ -1,2 +1,2 @@
 fe40296a7515f506c6b46a0ec7f056eb  fmcontrol.tar.gz
-4bae0e5feeb8cbf4cfcb950301e9509d  fmtools-1.0.2.tar.gz
+807467a8bccae32317c6bdb6c5329ab3  fmtools-2.0.tar.gz




More information about the scm-commits mailing list