[hamradio-commits] [pydxcluster] 05/08: Corrects manpage, correctly relocates all configuration files under a new directory.

Ana Custura ana.c-guest at moszumanska.debian.org
Thu Jun 2 19:26:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

ana.c-guest pushed a commit to branch master
in repository pydxcluster.

commit a36be7928f8afa586141a158b34823d3538c68cd
Author: Ana C. Custura <ana at netstat.org.uk>
Date:   Sun May 29 17:47:28 2016 +0100

    Corrects manpage, correctly relocates all configuration files under a new directory.
---
 debian/patches/01-file-loc.diff | 42 +++++++++++++++++++++++++++++++----------
 debian/pydxcluster.1            |  2 +-
 debian/pydxcluster.install      |  1 -
 3 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/debian/patches/01-file-loc.diff b/debian/patches/01-file-loc.diff
index 8b0a372..203986f 100644
--- a/debian/patches/01-file-loc.diff
+++ b/debian/patches/01-file-loc.diff
@@ -1,6 +1,14 @@
 --- a/pyDxCluster_v2_21.py
 +++ b/pyDxCluster_v2_21.py
-@@ -15,34 +15,34 @@
+@@ -12,37 +12,42 @@
+ 
+ from tkColorChooser import askcolor 
+ from math import pi, sin, cos, atan2, sqrt, radians, log, tan, degrees
++#debian additions
++from os.path import expanduser
++path=expanduser("~/.pydxcluster")
++if not os.path.exists(path):
++    os.mkdir(path)
  
  version="v2.21"
  pygame.mixer.init()
@@ -10,17 +18,17 @@
  
  try: 
 -	f = open("pydxcluster.cfg","r")
-+	f = open("~/.pydxclusterrc","r")
++	f = open(expanduser("~/.pydxcluster/pydxcluster.cfg"),"r")
  	settings = eval(f.read())
  	f.close()
  except:
  	settings = {"host": "", "port": "", "user":"","password":"","ch2200":"1","ch660":"1","ch160":"1","ch80":"1","ch60":"1","ch40":"1","ch30":"1","ch20":"1","ch17":"1","ch15":"1","ch12":"1","ch10":"1","ch6":"1","ch4":"1","ch2":"1","ch70":"1","mainwindowx":0,"mainwindowy":25,"detailwindowx":572,"detailwindowy":274,"viewdetails":1,"consolewindowx":0,"consolewindowy":443,"viewconsole":1,"qrzuser":"","qrzpasswd":"","viewobserver":1,"observerwindowx":569,"observerwindowy":497,"obs1":"","obs2":"" [...]
 -	f = open("pydxcluster.cfg", "w")
-+	f = open("~/.pydxclusterrc", "w")
++	f = open(expanduser("~/.pydxcluster/pydxcluster.cfg"), "w")
  	f.write(str(settings))
  	f.close()
 -	f = open("pydxcluster.cfg","r")
-+	f = open("~/.pydxclusterrc","r")
++	f = open(expanduser("~/.pydxcluster/pydxcluster.cfg"),"r")
  	settings = eval(f.read())
  	f.close()
  	
@@ -28,31 +36,45 @@
  ################################# color map load ####################################
  try: 
 -	fc = open("default.col","r")
-+	fc = open("/usr/share/pydxcluster/default.col","r")
++	fc = open(expanduser("~/.pydxcluster/default.col"),"r")
  	colorsettings = eval(fc.read())
  	fc.close()
  except:
  	colorsettings = {"clusterbg":"white","clusterfg":"black","consolebg":"black","consolefg":"#dbff12","spotbg":"#a6f687","spotfg":"black","detailbg":"white","detailfg":"black","detailcall":"brown","detailcountry":"red","call1bg":"red","call1fg":"yellow","call2bg":"blue","call2fg":"yellow","call3bg":"darkgreen","call3fg":"yellow","call4bg":"black","call4fg":"yellow","call5bg":"orange","call5fg":"black","call6bg":"yellow","call6fg":"black","call7bg":"lightblue","call7fg":"black","call8bg":" [...]
 -	fc = open("default.col", "w")
-+	fc = open("/usr/share/pydxcluster/default.col", "w")
++	fc = open(expanduser("~/.pydxcluster/default.col"), "w")
  	fc.write(str(colorsettings))
  	fc.close()
 -	fc = open("default.col","r")
-+	fc = open("/usr/share/pydxcluster/default.col","r")
++	fc = open(expanduser("~/.pydxcluster/default.col"),"r")
  	colorsettings = eval(fc.read())
  	fc.close()
  #####################################################################################	
-@@ -341,11 +341,11 @@
+@@ -98,11 +103,11 @@
+ call10fg=colorsettings["call10fg"]
+ ######################### load LICENSE.txt ##########################################
+ try:
+-	lic = open("LICENSE.txt","r")
++	lic = open("/usr/share/common-licenses/GPL-3","r")
+ 	licence = lic.read()
+ 	lic.close()	
+ except:
+-	licence="LICENCE.txt is not read...\nPresent in deirectory?"
++	licence="/usr/share/common-licenses/GPL-3 is not read...\nPresent in deirectory?"
+ #####################################################################################
+ 
+ rootposition="805x440"+"+"+str(settings["mainwindowx"])+"+"+str(settings["mainwindowy"])
+@@ -341,11 +346,11 @@
  
  	if rbkapcs==1: reversebeacon=1
  	settings = {"host": HOST, "port": str(PORT), "user":user,"password":password,"ch2200":str(ch2200.get()),"ch660":str(ch660.get()),"ch160":str(ch160.get()),"ch80":str(ch80.get()),"ch60":str(ch60.get()),"ch40":str(ch40.get()),"ch30":str(ch30.get()),"ch20":str(ch20.get()),"ch17":str(ch17.get()),"ch15":str(ch15.get()),"ch12":str(ch12.get()),"ch10":str(ch10.get()),"ch6":str(ch6.get()),"ch4":str(ch4.get()),"ch2":str(ch2.get()),"ch70":str(ch70.get()),"mainwindowx":x,"mainwindowy":y,"detailwind [...]
 -	f = open("pydxcluster.cfg", "w")
-+	f = open("~/.pydxclusterrc", "w")
++	f = open(expanduser("~/.pydxcluster/pydxcluster.cfg"), "w")
  	f.write(str(settings))
  	f.close()	
  	colorsettings = {"clusterbg":clusterbg,"clusterfg":clusterfg,"consolebg":consolebg,"consolefg":consolefg,"spotbg":spotbg,"spotfg":spotfg,"detailbg":detailbg,"detailfg":detailfg,"detailcall":detailcall,"detailcountry":detailcountry,"call1bg":call1bg,"call1fg":call1fg,"call2bg":call2bg,"call2fg":call2fg,"call3bg":call3bg,"call3fg":call3fg,"call4bg":call4bg,"call4fg":call4fg,"call5bg":call5bg,"call5fg":call5fg,"call6bg":call6bg,"call6fg":call6fg,"call7bg":call7bg,"call7fg":call7fg,"call8b [...]
 -	fc = open("default.col", "w")
-+	fc = open("/usr/share/pydxcluster/default.col", "w")
++	fc = open(expanduser("~/.pydxcluster/default.col"), "w")
  	fc.write(str(colorsettings))
  	fc.close()
  
diff --git a/debian/pydxcluster.1 b/debian/pydxcluster.1
index e730757..c6ea09b 100644
--- a/debian/pydxcluster.1
+++ b/debian/pydxcluster.1
@@ -4,7 +4,7 @@
 .\" First parameter, NAME, should be all caps
 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
 .\" other parameters are allowed: see man(7), man(1)
-.TH Vor 1 "May 29 2016"
+.TH pydxcluster 1 "May 29 2016"
 .\" Please adjust this date whenever revising the manpage.
 .\"
 .\" Some roff macros, for reference:
diff --git a/debian/pydxcluster.install b/debian/pydxcluster.install
index df7fba1..76c99ed 100644
--- a/debian/pydxcluster.install
+++ b/debian/pydxcluster.install
@@ -1,3 +1,2 @@
 pydxcluster /usr/bin
 bell.wav /usr/share/pydxcluster
-default.col /usr/share/pydxcluster

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/pydxcluster.git



More information about the pkg-hamradio-commits mailing list