--- gresistor-0.0.1.orig/debian/README.source +++ gresistor-0.0.1/debian/README.source @@ -0,0 +1,3 @@ +This package uses dpatch in order to apply patches to the upstream +source. Please check /usr/share/doc/dpatch/README.source.gz +for further information. --- gresistor-0.0.1.orig/debian/manpages +++ gresistor-0.0.1/debian/manpages @@ -0,0 +1 @@ +debian/gresistor.1 --- gresistor-0.0.1.orig/debian/compat +++ gresistor-0.0.1/debian/compat @@ -0,0 +1 @@ +5 --- gresistor-0.0.1.orig/debian/copyright +++ gresistor-0.0.1/debian/copyright @@ -0,0 +1,63 @@ +Format-Specification: + http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=178 +Upstream-Name: gResistor +Upstream-Maintainer: Gheorghe Pop +Upstream-Source: http://minipop.org/index.php?file=gresistor + +Files: SimpleGladeApp.py +Copyright: Copyright 2004 Sandino Flores Moreno +License: LGPL-2.1+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. + If not, see . + + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/LGPL-2.1'. + +Files: * +Copyright: Copyright 2005 Gheorghe Pop +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-3'. + +Files: debian/* +Copyright: Copyright 2008 Aanjhan Ranganathan +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-3'. --- gresistor-0.0.1.orig/debian/control +++ gresistor-0.0.1/debian/control @@ -0,0 +1,22 @@ +Source: gresistor +Section: electronics +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Aanjhan Ranganathan +Build-Depends: cdbs (>= 0.4.90~), debhelper (>= 5.0.38), python (>= 2.6.6-3~), dpatch +XS-Python-Version: >=2.6 +Homepage: http://www.gnomefiles.org/app.php/gResistor +Standards-Version: 3.8.4 + +Package: gresistor +Architecture: all +Depends: python-gtk2, ${python:Depends}, ${misc:Depends} +Description: resistor color code calculator + To allow for identification, resistors are usually marked + with colored bands. Often refered to as color codes, these + markings are indicative of their resistance, tolerance and + temperature coefficient. gResistor helps you translate + resistor color codes into a readable value. All you have to + do is watch the colors on the resistor and then enter them + in the program. As you enter colours you'll see that the + resistor value is changing accordingly. --- gresistor-0.0.1.orig/debian/gresistor.1 +++ gresistor-0.0.1/debian/gresistor.1 @@ -0,0 +1,19 @@ +.TH gresistor 1 "July 2008" +.SH NAME +gresistor - a resistor colour code calculator + +.SH SYNOPSIS +.B gresistor [No Options] + +.SH DESCRIPTION +To allow for identification, resistors are usually marked +with colored bands. Often refereed to as color codes, these +markings are indicative of their resistance, tolerance and +temperature coefficient. gResistor helps you translate +resistor color codes into a readable value. All you have to +do is watch the colors on the resistor and then enter them +in the program. As you enter you'll see that the resistor +value is changing according to the selected color. + +.SH AUTHOR Aanjhan Ranganathan +E-mail: aanjhan@tuxmaniac.com --- gresistor-0.0.1.orig/debian/menu +++ gresistor-0.0.1/debian/menu @@ -0,0 +1,6 @@ +?package(gresistor):needs="X11" \ + section="Applications/Education" \ + hints="GNOME" \ + title="gResistor" \ + longtitle="resistor color code calculator " \ + command="/usr/bin/gresistor" --- gresistor-0.0.1.orig/debian/changelog +++ gresistor-0.0.1/debian/changelog @@ -0,0 +1,33 @@ +gresistor (0.0.1-0ubuntu3) oneiric; urgency=low + + * Apply patches from Markus Kolb adding i18n support. (LP: #601196) + * Convert to dh_python2. + + -- Daniel T Chen Mon, 08 Aug 2011 21:19:57 -0400 + +gresistor (0.0.1-0ubuntu2) maverick; urgency=low + + [ Bhavani Shankar ] + * debian/control: + + Bump up debhelper version to >= 5.0.38 as per policy + + Bump up Standards-Version to 3.8.4 + + Update Homepage to reflect new homepage + * debian/menu: + + (New file) Install under Applications/Education LP: #371076 + * debian/source/format: + + (New file) Specify the format as 1.0 + * Update watch file to reflect changed download location + * Update desktop file category + + [ Stefano Rivera ] + * Install SimpleGladeApp (that really should be packaged separately) in + /usr/share/gresistor + + -- Bhavani Shankar Fri, 25 Jun 2010 12:28:07 +0530 + +gresistor (0.0.1-0ubuntu1) jaunty; urgency=low + + * Initial release (LP: #251919) + * patches/01_fix_desktop_file: Removed gResistor entry. + + -- Aanjhan Ranganathan Thu, 22 Jan 2009 22:42:45 +0100 --- gresistor-0.0.1.orig/debian/watch +++ gresistor-0.0.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.roroid.ro/progs/gresistor/gresistor-(.*)\.tar\.gz --- gresistor-0.0.1.orig/debian/rules +++ gresistor-0.0.1/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +DEB_PYTHON2_MODULE_PACKAGES = gresistor + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/dpatch.mk + +DEB_PYTHON_INSTALL_ARGS_ALL += --install-lib=/usr/share/gresistor --- gresistor-0.0.1.orig/debian/source/format +++ gresistor-0.0.1/debian/source/format @@ -0,0 +1 @@ +1.0 --- gresistor-0.0.1.orig/debian/patches/02_private_module.dpatch +++ gresistor-0.0.1/debian/patches/02_private_module.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_private_module.dpatch by Stefano Rivera +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: We store our libraries in /usr/share/gresistor + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' gresistor-0.0.1~/gresistor gresistor-0.0.1/gresistor +--- gresistor-0.0.1~/gresistor 2005-10-16 16:25:17.000000000 +0200 ++++ gresistor-0.0.1/gresistor 2010-06-25 00:00:03.860152746 +0200 +@@ -14,6 +14,9 @@ + + import pango + ++import sys ++sys.path.insert(0, '/usr/share/gresistor') ++ + from SimpleGladeApp import SimpleGladeApp + from SimpleGladeApp import bindtextdomain + --- gresistor-0.0.1.orig/debian/patches/00list +++ gresistor-0.0.1/debian/patches/00list @@ -0,0 +1,4 @@ +01_fix_desktop_file +02_private_module +03_add_de_to_desktop_file.dpatch +04_support_translation.dpatch --- gresistor-0.0.1.orig/debian/patches/04_support_translation.dpatch +++ gresistor-0.0.1/debian/patches/04_support_translation.dpatch @@ -0,0 +1,142 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_support_translation.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Map colors by combobox index for translated colors. + +@DPATCH@ +diff -urNad gresistor-0.0.1~/gresistor gresistor-0.0.1/gresistor +--- gresistor-0.0.1~/gresistor 2005-10-16 16:25:17.000000000 +0200 ++++ gresistor-0.0.1/gresistor 2010-07-02 21:50:24.000000000 +0200 +@@ -21,7 +21,7 @@ + app_version = "0.0.1" + + glade_dir = os.path.join('/usr', 'share', 'gresistor') +-locale_dir = "" ++locale_dir = "/usr/share/locale" + + bindtextdomain(app_name, locale_dir) + +@@ -139,12 +139,12 @@ + bg_color = gtk.gdk.color_parse('#BD987F') + self.bg_gc.set_rgb_fg_color(bg_color) + self.fg_gc.set_rgb_fg_color(fg_color) +- self.setcolor(1,self.combobox2.get_active_text()) +- self.setcolor(2,self.combobox3.get_active_text()) +- self.setcolor(3,self.combobox4.get_active_text()) +- self.setcolor(4,self.combobox5.get_active_text()) +- self.setcolor(5,self.combobox6.get_active_text()) +- self.setcolor(6,self.combobox7.get_active_text()) ++ self.setcolor(1,self.getcolor_by_index(1,self.combobox2.get_active())) ++ self.setcolor(2,self.getcolor_by_index(2,self.combobox3.get_active())) ++ self.setcolor(3,self.getcolor_by_index(3,self.combobox4.get_active())) ++ self.setcolor(4,self.getcolor_by_index(4,self.combobox5.get_active())) ++ self.setcolor(5,self.getcolor_by_index(5,self.combobox6.get_active())) ++ self.setcolor(6,self.getcolor_by_index(6,self.combobox7.get_active())) + #-- Gresistor.new } + + #-- Gresistor custom methods { +@@ -153,25 +153,48 @@ + + #-- Gresistor.on_combobox1_changed { + ++ def getcolor_by_index(self,x,i): ++ color_list = [] ++ color = None ++ if (x==1): ++ color_list = ['black','brown','red','orange','yellow','green','blue','violet','gray','white'] ++ elif (x==2): ++ color_list = ['black','brown','red','orange','yellow','green','blue','violet','gray','white'] ++ elif (x==3): ++ color_list = ['black','brown','red','orange','yellow','green','blue','violet','gray','white'] ++ elif (x==4): ++ color_list = ['black','brown','red','orange','yellow','green','blue','violet'] ++ #if (i==7): # Sylver ++ # color_list[i] = '#CDD5DE' ++ elif (x==5): ++ color_list = ['#BD987F','brown','red','green','blue','violet','gold','#CDD5DE'] ++ if (i<0): # no selection ++ i = 0 ++ elif (x==6): ++ color_list = ['#BD987F','brown','red','orange','yellow'] ++ if (i<0): # no selection ++ i = 0 ++ return color_list[i] ++ ++ + def setcolor(self,x,a): + if (x==1): + self.bg_gc1.set_rgb_fg_color(gtk.gdk.color_parse(a)) +- if (x==2): ++ elif (x==2): + self.bg_gc2.set_rgb_fg_color(gtk.gdk.color_parse(a)) +- +- if (x==3): ++ elif (x==3): + self.bg_gc3.set_rgb_fg_color(gtk.gdk.color_parse(a)) +- if (x==4): ++ elif (x==4): + if (a=='Sylver'): + a='#CDD5DE' + self.bg_gc4.set_rgb_fg_color(gtk.gdk.color_parse(a)) +- if (x==5): ++ elif (x==5): + if (a=='Sylver'): + a='#CDD5DE' + elif (a=='None'): + a='#BD987F' + self.bg_gc5.set_rgb_fg_color(gtk.gdk.color_parse(a)) +- if (x==6): ++ elif (x==6): + if (a=='None'): + a='#BD987F' + self.bg_gc6.set_rgb_fg_color(gtk.gdk.color_parse(a)) +@@ -205,42 +228,42 @@ + + #-- Gresistor.on_combobox2_changed { + def on_combobox2_changed(self, widget, *args): +- self.setcolor(1,self.combobox2.get_active_text()) ++ self.setcolor(1,self.getcolor_by_index(1,self.combobox2.get_active())) + self.drawingarea1.queue_draw () + self.getvalue(index,self.combobox2.get_active(),self.combobox3.get_active(),self.combobox4.get_active(),self.combobox5.get_active(),self.combobox6.get_active(),self.combobox7.get_active()) + #-- Gresistor.on_combobox2_changed } + + #-- Gresistor.on_combobox3_changed { + def on_combobox3_changed(self, widget, *args): +- self.setcolor(2,self.combobox3.get_active_text()) ++ self.setcolor(2,self.getcolor_by_index(2,self.combobox3.get_active())) + self.drawingarea1.queue_draw () + self.getvalue(index,self.combobox2.get_active(),self.combobox3.get_active(),self.combobox4.get_active(),self.combobox5.get_active(),self.combobox6.get_active(),self.combobox7.get_active()) + #-- Gresistor.on_combobox3_changed } + + #-- Gresistor.on_combobox4_changed { + def on_combobox4_changed(self, widget, *args): +- self.setcolor(3,self.combobox4.get_active_text()) ++ self.setcolor(3,self.getcolor_by_index(3,self.combobox4.get_active())) + self.drawingarea1.queue_draw () + self.getvalue(index,self.combobox2.get_active(),self.combobox3.get_active(),self.combobox4.get_active(),self.combobox5.get_active(),self.combobox6.get_active(),self.combobox7.get_active()) + #-- Gresistor.on_combobox4_changed } + + #-- Gresistor.on_combobox5_changed { + def on_combobox5_changed(self, widget, *args): +- self.setcolor(4,self.combobox5.get_active_text()) ++ self.setcolor(4,self.getcolor_by_index(4,self.combobox5.get_active())) + self.drawingarea1.queue_draw () + self.getvalue(index,self.combobox2.get_active(),self.combobox3.get_active(),self.combobox4.get_active(),self.combobox5.get_active(),self.combobox6.get_active(),self.combobox7.get_active()) + #-- Gresistor.on_combobox5_changed } + + #-- Gresistor.on_combobox6_changed { + def on_combobox6_changed(self, widget, *args): +- self.setcolor(5,self.combobox6.get_active_text()) ++ self.setcolor(5,self.getcolor_by_index(5,self.combobox6.get_active())) + self.drawingarea1.queue_draw () + self.getvalue(index,self.combobox2.get_active(),self.combobox3.get_active(),self.combobox4.get_active(),self.combobox5.get_active(),self.combobox6.get_active(),self.combobox7.get_active()) + #-- Gresistor.on_combobox6_changed } + + #-- Gresistor.on_combobox7_changed { + def on_combobox7_changed(self, widget, *args): +- self.setcolor(6,self.combobox7.get_active_text()) ++ self.setcolor(6,self.getcolor_by_index(6,self.combobox7.get_active())) + self.drawingarea1.queue_draw () + self.getvalue(index,self.combobox2.get_active(),self.combobox3.get_active(),self.combobox4.get_active(),self.combobox5.get_active(),self.combobox6.get_active(),self.combobox7.get_active()) + #-- Gresistor.on_combobox7_changed } --- gresistor-0.0.1.orig/debian/patches/01_fix_desktop_file.dpatch +++ gresistor-0.0.1/debian/patches/01_fix_desktop_file.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_fix_desktop_file.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Removed encoding. Added Categories Science and Electronics. + +@DPATCH@ +diff -urNad gresistor-0.0.1~/gresistor.desktop gresistor-0.0.1/gresistor.desktop +--- gresistor-0.0.1~/gresistor.desktop 2009-01-22 22:53:16.000000000 +0100 ++++ gresistor-0.0.1/gresistor.desktop 2009-01-22 22:54:43.000000000 +0100 +@@ -1,14 +1,12 @@ + [Desktop Entry] + Version=0.1.2 +-Encoding=UTF-8 + Name=gResistor + Comment=Resistor color code calculator + Icon=/usr/share/gresistor/icon.png + Exec=/usr/bin/gresistor + Terminal=false + Type=Application +-MimeType=application/x-glade; +-Categories=Application;Utility;gResistor ++Categories=Science;Education;Electronics; + Name[ro]=gResistor + Comment[ro]=Calculator pentru formule electrice + Name[ro_RO]=gResistor --- gresistor-0.0.1.orig/debian/patches/03_add_de_to_desktop_file.dpatch +++ gresistor-0.0.1/debian/patches/03_add_de_to_desktop_file.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_add_de_to_desktop_file.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add German menu entries. + +@DPATCH@ +diff -urNad gresistor-0.0.1~/gresistor.desktop gresistor-0.0.1/gresistor.desktop +--- gresistor-0.0.1~/gresistor.desktop 2010-07-02 19:47:26.000000000 +0200 ++++ gresistor-0.0.1/gresistor.desktop 2010-07-02 19:49:17.000000000 +0200 +@@ -7,6 +7,8 @@ + Terminal=false + Type=Application + Categories=Science;Education;Electronics; ++Name[de]=gResistor ++Comment[de]=Widerstand Farbcode Rechner + Name[ro]=gResistor + Comment[ro]=Calculator pentru formule electrice + Name[ro_RO]=gResistor