Name: twcw Version: 1.3 Release: 1%{?dist} Summary: A program to send Morse Code Group: Applications/Communications License: GPLv2+ URL: http://wa0eir.home.mchsi.com/ Source0: http://wa0eir.home.mchsi.com/src/%{name}-%{version}.src.tar.gz #launcher script to ensure user settings dir is created Source1: twcw-launcher.in #desktop entry Source2: twcw-desktop.in #fix installpath Patch0: twcw-1.3-makefile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: lesstif-devel, libXpm-devel BuildRequires: desktop-file-utils #Requires: %description Twcw will send Morse Code. Audio is available from your soundcard or the PC speaker. Your transmitter can be keyed with the PC's serial port. %prep %setup -q %patch0 -p1 %build %configure make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT #move original binary to datadir mkdir $RPM_BUILD_ROOT%{_libexecdir} mv $RPM_BUILD_ROOT%{_bindir}/twcw $RPM_BUILD_ROOT%{_libexecdir}/twcw-bin #install user settings for use in launcher script install -dD src/twcwDIR $RPM_BUILD_ROOT%{_datadir}/twcw/twcwDIR for f in `find src/twcwDIR -type f` do install $f $RPM_BUILD_ROOT%{_datadir}/twcw/twcwDIR/`echo $f | cut -d '/' -f3` done #install launcher scipt, enter path to original twcw binary cat %{SOURCE1} | sed s,TWCWBIN,%{_libexecdir}/twcw-bin, > $RPM_BUILD_ROOT%{_bindir}/twcw chmod 0755 $RPM_BUILD_ROOT%{_bindir}/twcw #install menu entry install -D -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/twcw.desktop #fix permissions chmod 0644 $RPM_BUILD_ROOT%{_datadir}/X11/app-defaults/Twcw chmod 0644 $RPM_BUILD_ROOT%{_datadir}/twcw/twcwHelp desktop-file-install --vendor fedora --delete-original \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --remove-category Application \ $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING README THANKS %{_bindir}/* %{_libexecdir}/* %{_datadir}/twcw %{_datadir}/X11/app-defaults/Twcw %{_datadir}/applications/* %changelog * Mon Dec 10 2007 Sindre Pedersen Bjørdal - 1.3-1 - Initial build