From e23ce2a78a3e778e3f0e90434ea52511f342ba74 Mon Sep 17 00:00:00 2001 From: Lucian Langa Date: Jan 10 2010 21:05:47 +0000 Subject: - fix sh script to support multiuser - add dupeID to install --- diff --git a/qle-0.0.18-configlocation.patch b/qle-0.0.18-configlocation.patch index ef44c35..34b9bc5 100644 --- a/qle-0.0.18-configlocation.patch +++ b/qle-0.0.18-configlocation.patch @@ -1,12 +1,61 @@ diff -Naur qle-0.0.18/qle-0.0.18.pl qle-0.0.18-mod/qle-0.0.18.pl --- qle-0.0.18/qle-0.0.18.pl 2009-12-21 19:13:12.000000000 +0200 -+++ qle-0.0.18-mod/qle-0.0.18.pl 2010-01-09 17:30:37.000000000 +0200 -@@ -51,6 +51,7 @@ ++++ qle-0.0.18-mod/qle-0.0.18.pl 2010-01-10 22:52:53.000000000 +0200 +@@ -50,6 +50,7 @@ + # Build name of config file from name of executable file: my ($progName, $pathName, $suffix) = fileparse("$0", qr/\.[^.]*/); - my $configFile; + my $pathName = "/etc/qle/"; + my $configFile; if (File::Spec->file_name_is_absolute($pathName)) { $configFile = "$pathName" . "$progName" . ".conf"; - } else { -diff -Naur qle-0.0.18/qle.sh qle-0.0.18-mod/qle.sh +@@ -883,8 +884,14 @@ + $doScp = process_scp( \@scpArray, $config{masterScp} ); + } + else { +- print "Can't read super check partial file $config{masterScp}\n", +- "No super check partial.\n"; ++ stat ( "/usr/share/qle/$config{masterScp}" ); ++ if ( -r _ ) { ++ $doScp = process_scp( \@scpArray, "/usr/share/qle/$config{masterScp}" ); ++ } ++ else { ++ print "Can't read super check partial file $config{masterScp}\n", ++ "No super check partial.\n"; ++ } + } + + my $scpWindow; +@@ -928,7 +935,13 @@ + \%ituzHash, $config{ctyDat} ); + } + else { +- print "Can't read cty.dat file $config{ctyDat}\n"; ++ stat ( "/usr/share/qle/$config{ctyDat}" ); ++ if (-r _) { ++ process_cty_dat( \%ctyHash, \%contHash, \%cqzHash, ++ \%ituzHash, "/usr/share/qle/$config{ctyDat}" ); ++ } else { ++ print "Can't read cty.dat file $config{ctyDat}\n"; ++ } + } + + # Set up frame, used for entering new QSOs: +@@ -6643,7 +6656,7 @@ + use Tk::Bitmap; + + # use Tk::Image; +- my $kiwi = "kiwi-blk-52x52.xbm"; ++ my $kiwi = "/usr/share/qle/kiwi-blk-52x52.xbm"; + my $image = $window->Bitmap( -file => $kiwi ) + or warn "Image file $kiwi not found :-( \n"; + +@@ -7323,7 +7336,7 @@ + # subroutine process_scp + # + # Purpose: Reads file $config{masterScp}, turning the info into an +-# array. ++# array + # + # Args: + # Reference to super check partial array diff --git a/qle-0.0.18-sh.patch b/qle-0.0.18-sh.patch index 774170e..709eec6 100644 --- a/qle-0.0.18-sh.patch +++ b/qle-0.0.18-sh.patch @@ -1,25 +1,19 @@ +diff -Naur qle-0.0.18/qle-0.0.18.pl qle-0.0.18-mod/qle-0.0.18.pl diff -Naur qle-0.0.18/qle.sh qle-0.0.18-mod/qle.sh --- qle-0.0.18/qle.sh 2009-12-21 19:13:12.000000000 +0200 -+++ qle-0.0.18-mod/qle.sh 2010-01-09 17:35:40.000000000 +0200 -@@ -1,3 +1,4 @@ -+#!/bin/bash - ##################################################################### - # - # Suggested start-up script for qle-.pl -@@ -13,6 +14,7 @@ - ##################################################################### - # - #cd ~/qle-0.0.18 -+cd /usr/share/qle - # - echo qle.sh: trying to kill lingering hamlib 'rigctld' servers: - killall rigctld -@@ -24,7 +26,7 @@ ++++ qle-0.0.18-mod/qle.sh 2010-01-10 23:00:13.000000000 +0200 +@@ -22,9 +22,13 @@ + #rigctld -m314 -s1200 -r/dev/ttyUSB2 & + rigctld -m129 -s4800 -r/dev/ttyUSB1 & # ++ ++test -f foo3.db || cp /usr/share/qle/foo3.db . ++test -f dupeID || cp /usr/share/qle/dupeID . ++ echo qle.sh: starting up the 'qle' logger program: # perl qle-0.0.18.pl -font "-adobe-avant garde gothic-demi-r-normal--0-0-0-0-p-0-iso8859-1" $1 $2 $3 $4 -perl qle-0.0.18.pl -foreground Blue $1 $2 $3 $4 -+perl qle.pl -foreground Blue $1 $2 $3 $4 ++perl /usr/share/qle/qle.pl -foreground Blue $1 $2 $3 $4 # echo qle.sh: killing 'rigctld' server: killall rigctld diff --git a/qle-sh.patch b/qle-sh.patch deleted file mode 100644 index aad1735..0000000 --- a/qle-sh.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- qle-0.0.13/qle.sh 2009-02-08 14:54:19.000000000 +0200 -+++ qle-0.0.13-mod/qle.sh 2009-02-17 10:50:59.000000000 +0200 -@@ -1,3 +1,4 @@ -+#!/bin/bash - ############################################################ - # - # Suggested start-up script for 'qle' -@@ -14,7 +15,7 @@ - # - # Change to working directory if running from somewhere else: - # --#cd ~/qle-0.0.13 -+cd /usr/share/qle - # - # Kill lingering 'rigctld' servers: - # -@@ -31,7 +32,7 @@ - # Suggested other options: - # -font "" - # --perl qle-0.0.13.pl -geometry "800x680+100+20" --debug=0 $1 $2 $3 $4 -+perl qle.pl -geometry "800x680+100+20" --debug=0 $1 $2 $3 $4 - # - # Killing rigctld process: - # diff --git a/qle.spec b/qle.spec index e0db392..8fe0bdb 100644 --- a/qle.spec +++ b/qle.spec @@ -1,6 +1,6 @@ Name: qle Version: 0.0.18 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A QSO Logger and log Editor Group: Applications/Communications @@ -46,8 +46,8 @@ updated accordingly. %prep %setup -q -%patch0 -p1 -%patch1 -p1 +%patch0 -p1 -b .sh +%patch1 -p1 -b .configlocation %build #no build needed @@ -56,6 +56,7 @@ updated accordingly. rm -rf $RPM_BUILD_ROOT install -p -D -m 0644 kiwi-blk-52x52.xbm $RPM_BUILD_ROOT%{_datadir}/%{name}/kiwi-blk-52x52.xbm install -p -D -m 0644 foo3.db $RPM_BUILD_ROOT%{_datadir}/%{name}/foo3.db +install -p -D -m 0644 dupeID $RPM_BUILD_ROOT%{_datadir}/%{name}/dupeID install -p -D -m 0755 adifimport.pl $RPM_BUILD_ROOT%{_datadir}/%{name}/adifimport.pl install -p -D -m 0755 cabrilloimport.pl $RPM_BUILD_ROOT%{_datadir}/%{name}/cabrilloimport.pl install -p -D -m 0755 qle-%{version}.pl $RPM_BUILD_ROOT%{_datadir}/%{name}/qle.pl @@ -86,6 +87,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jan 10 2010 Lucian Langa - 0.0.18-2 +- fix sh script to support multiuser +- add dupeID to install + * Sat Jan 09 2010 Lucian Langa - 0.0.18-1 - new upstream release