summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog4
-rw-r--r--debian/chirp.pyinstall1
-rw-r--r--debian/control2
-rw-r--r--debian/install1
-rw-r--r--debian/patches/remove-desktop-popup.patch33
-rw-r--r--debian/patches/remove-future.patch14
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/wxui-chirp-share.patch181
8 files changed, 41 insertions, 196 deletions
diff --git a/debian/changelog b/debian/changelog
index 52fed3f..d45f8d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ chirp (1:20240827-1) UNRELEASED; urgency=medium
* New Upstream import
* Patches refreshed
+ * Added d/chirp.pyinstall
+ - This removes the need to patch around chirp.share module for more
+ sustainable packaging in future
+ * Added remove-desktop-popup.patch to stop the annoying nag on startup
-- Dave Hibberd <hibby@debian.org> Tue, 27 Aug 2024 23:18:55 +0100
diff --git a/debian/chirp.pyinstall b/debian/chirp.pyinstall
new file mode 100644
index 0000000..fecc84e
--- /dev/null
+++ b/debian/chirp.pyinstall
@@ -0,0 +1 @@
+chirp/share/* chirp.share
diff --git a/debian/control b/debian/control
index 204ce86..990d437 100644
--- a/debian/control
+++ b/debian/control
@@ -12,9 +12,11 @@ Build-Depends:
python3-requests,
python3-serial,
python3-six,
+ python3-suds,
python3-yattag,
wxpython-tools,
python3-setuptools
+X-Python3-Version: >= 3.10, << 4.0
Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/debian-hamradio-team/chirp
Vcs-Git: https://salsa.debian.org/debian-hamradio-team/chirp.git
diff --git a/debian/install b/debian/install
index af982ac..9b1d71b 100644
--- a/debian/install
+++ b/debian/install
@@ -1,5 +1,4 @@
chirp/share/chirp.png /usr/share/pixmaps
chirp/share/chirp.desktop /usr/share/applications
-chirp/share/*.png /usr/share/chirp
chirp/locale/* /usr/lib/python3/dist-packages/chirp/locale
chirp/stock_configs /usr/lib/python3/dist-packages/chirp
diff --git a/debian/patches/remove-desktop-popup.patch b/debian/patches/remove-desktop-popup.patch
new file mode 100644
index 0000000..f14cab7
--- /dev/null
+++ b/debian/patches/remove-desktop-popup.patch
@@ -0,0 +1,33 @@
+Description: Remove popup bugging user to install desktop icon
+Author: Dave Hibberd <hibby@debian.org>
+Forwarded: no
+Last-Update: 2024-09-02
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/chirp/wxui/__init__.py
++++ b/chirp/wxui/__init__.py
+@@ -118,13 +118,6 @@
+ desktop = parser.add_mutually_exclusive_group()
+ parser.add_argument('--no-linux-gdk-backend', action='store_true',
+ help='Do not force GDK_BACKEND=x11')
+- desktop.add_argument('--install-desktop-app', action='store_true',
+- default=False,
+- help=('Install a desktop icon even if it was '
+- 'previously refused'))
+- desktop.add_argument('--no-install-desktop-app', action='store_true',
+- default=False,
+- help='Do not prompt to install a desktop icon')
+ logger.add_arguments(parser)
+ args = parser.parse_args()
+ logger.handle_options(args)
+@@ -242,10 +235,4 @@
+ report.check_for_updates(
+ lambda ver: wx.CallAfter(main.display_update_notice, ver))
+
+- if sys.platform == 'linux':
+- try:
+- maybe_install_desktop(args, mainwindow)
+- except Exception as e:
+- LOG.exception('Failed to run linux desktop installer: %s', e)
+-
+ app.MainLoop()
diff --git a/debian/patches/remove-future.patch b/debian/patches/remove-future.patch
deleted file mode 100644
index 7e41bb0..0000000
--- a/debian/patches/remove-future.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Replacement for python3-future.
-Author: Yogeswaran Umasankar <kd8mbd@gmail.com>
-Last-Update: 2024-02-24
-
---- a/test-requirements.txt
-+++ b/test-requirements.txt
-@@ -5,7 +5,6 @@
- six
- pep8
- pyserial
--future
- requests
- pyyaml
- pywin32; platform_system=="Windows"
diff --git a/debian/patches/series b/debian/patches/series
index 94a6c0c..5a7facf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+remove-desktop-popup.patch
desktop-file.patch
02-fix-setup-py.patch
distutils-migration.patch
diff --git a/debian/patches/wxui-chirp-share.patch b/debian/patches/wxui-chirp-share.patch
deleted file mode 100644
index 1062559..0000000
--- a/debian/patches/wxui-chirp-share.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-Description: A patch to direct chirp on startup to /usr/share for images, icons etc
- and to remove the desktop-install feature shipped with chirp
-Author: Dave Hibberd <hibby@debian.org>
-Last-Update: 2024-04-16
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/chirp/wxui/__init__.py
-+++ b/chirp/wxui/__init__.py
-@@ -25,60 +25,60 @@
- return CONF.get('developer_mode', 'state') == CHIRP_VERSION
-
-
--def maybe_install_desktop(args):
-- local = os.path.join(os.path.expanduser('~'), '.local')
-- desktop_path = os.path.join(local, 'share',
-- 'applications', 'chirp.desktop')
-- with resources.as_file(
-- resources.files('chirp.share').joinpath('chirp.desktop')
-- ) as desktop_src:
-- with open(desktop_src) as f:
-- desktop_content = f.readlines()
-- with resources.as_file(
-- resources.files('chirp.share').joinpath('chirp.ico')) as p:
-- icon_path = str(p)
--
-- # If asked not to do this, always bail
-- if args.no_install_desktop_app:
-- return
--
-- # Already exists, don't prompt user
-- if os.path.exists(desktop_path):
-- LOG.debug('Desktop file exists')
-- return
--
-- # If already asked and not explicitly opted-in, stop nagging
-- if (CONF.get_bool('offered_desktop', 'state') and not
-- args.install_desktop_app):
-- LOG.debug('Desktop file missing but user previously offered')
-- return
--
-- import wx
-- r = wx.MessageBox(
-- _('Would you like CHIRP to install a desktop icon for you?'),
-- _('Install desktop icon?'), style=wx.YES_NO)
-- if r != wx.YES:
-- CONF.set_bool('offered_desktop', True, 'state')
-- return
--
-- os.makedirs(os.path.dirname(desktop_path), exist_ok=True)
--
-- # Try to run chirp by name from ~/.local/bin
-- exec_path = os.path.join(local, 'bin', 'chirp')
-- if not os.path.exists(exec_path):
-- # If that doesn't work, then just run it with our python via
-- # module, which should always work
-- exec_path = '%s -mchirp.wxui' % sys.executable
-- with open(desktop_path, 'w') as f:
-- for line in desktop_content:
-- if line.startswith('Exec'):
-- f.write('Exec=%s\n' % exec_path)
-- elif line.startswith('Icon'):
-- f.write('Icon=%s\n' % icon_path)
-- else:
-- f.write(line)
-- LOG.debug('Wrote %s with exec=%r icon=%r' % (
-- f.name, exec_path, icon_path))
-+#def maybe_install_desktop(args):
-+# local = os.path.join(os.path.expanduser('~'), '.local')
-+# desktop_path = os.path.join(local, 'share',
-+# 'applications', 'chirp.desktop')
-+# with resources.as_file(
-+# resources.files('chirp.share').joinpath('chirp.desktop')
-+# ) as desktop_src:
-+# with open(desktop_src) as f:
-+# desktop_content = f.readlines()
-+# with resources.as_file(
-+# resources.files('chirp.share').joinpath('chirp.ico')) as p:
-+# icon_path = str(p)
-+#
-+# # If asked not to do this, always bail
-+# if args.no_install_desktop_app:
-+# return
-+#
-+# # Already exists, don't prompt user
-+# if os.path.exists(desktop_path):
-+# LOG.debug('Desktop file exists')
-+# return
-+#
-+# # If already asked and not explicitly opted-in, stop nagging
-+# if (CONF.get_bool('offered_desktop', 'state') and not
-+# args.install_desktop_app):
-+# LOG.debug('Desktop file missing but user previously offered')
-+# return
-+
-+# import wx
-+# r = wx.MessageBox(
-+# _('Would you like CHIRP to install a desktop icon for you?'),
-+# _('Install desktop icon?'), style=wx.YES_NO)
-+# if r != wx.YES:
-+# CONF.set_bool('offered_desktop', True, 'state')
-+# return
-+
-+# os.makedirs(os.path.dirname(desktop_path), exist_ok=True)
-+
-+# # Try to run chirp by name from ~/.local/bin
-+# exec_path = os.path.join(local, 'bin', 'chirp')
-+# if not os.path.exists(exec_path):
-+# # If that doesn't work, then just run it with our python via
-+# # module, which should always work
-+# exec_path = '%s -mchirp.wxui' % sys.executable
-+# with open(desktop_path, 'w') as f:
-+# for line in desktop_content:
-+# if line.startswith('Exec'):
-+# f.write('Exec=%s\n' % exec_path)
-+# elif line.startswith('Icon'):
-+# f.write('Icon=%s\n' % icon_path)
-+# else:
-+# f.write(line)
-+# LOG.debug('Wrote %s with exec=%r icon=%r' % (
-+# f.name, exec_path, icon_path))
-
-
- def chirpmain():
-@@ -242,10 +242,10 @@
- report.check_for_updates(
- lambda ver: wx.CallAfter(main.display_update_notice, ver))
-
-- if sys.platform == 'linux':
-- try:
-- maybe_install_desktop(args)
-- except Exception as e:
-- LOG.exception('Failed to run linux desktop installer: %s', e)
-+# if sys.platform == 'linux':
-+# try:
-+# maybe_install_desktop(args)
-+# except Exception as e:
-+# LOG.exception('Failed to run linux desktop installer: %s', e)
-
- app.MainLoop()
---- a/chirp/wxui/main.py
-+++ b/chirp/wxui/main.py
-@@ -371,10 +371,7 @@
-
- vbox = wx.BoxSizer(wx.VERTICAL)
- self.SetSizer(vbox)
-- with resources.as_file(
-- resources.files('chirp.share').joinpath('welcome_screen.png')
-- ) as welcome:
-- bmp = wx.Bitmap(str(welcome))
-+ bmp = wx.Bitmap(str('/usr/share/chirp/welcome_screen.png'))
- width, height = self.GetSize()
- img = wx.StaticBitmap(self, wx.ID_ANY, bmp)
- vbox.Add(img, 1, flag=wx.EXPAND)
-@@ -449,10 +446,7 @@
- self.add_tab_panel = wx.Panel(self, pos=(0, 0), size=(600, 600))
- self.add_tab_panel.Hide()
-
-- with resources.as_file(
-- resources.files('chirp.share').joinpath('plus-icon.png')
-- ) as icon:
-- self.add_tab_bm = wx.Bitmap(str(icon), wx.BITMAP_TYPE_ANY)
-+ self.add_tab_bm = wx.Bitmap(str('/usr/share/chirp/plus-icon.png'), wx.BITMAP_TYPE_ANY)
-
- self.add_tab_panel.Bind(wx.EVT_PAINT, self._paint_add_tab_panel)
-
-@@ -516,14 +510,7 @@
- self.PopupMenu(menu)
-
- def set_icon(self):
-- if sys.platform == 'win32':
-- icon = 'chirp.ico'
-- else:
-- icon = 'chirp.png'
-- with resources.as_file(
-- resources.files('chirp.share').joinpath(icon)
-- ) as path:
-- self.SetIcon(wx.Icon(str(path)))
-+ self.SetIcon(wx.Icon(str('/usr/share/chirp/chirp.png')))
-
- @property
- def current_editorset(self):