summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYurii Kolesnykov2020-06-06 23:16:48 +0300
committerYurii Kolesnykov2020-06-06 23:16:48 +0300
commit8af5c60ff37f0f040ca57c57a57cfcf1fdcfd1e3 (patch)
tree1f70375d909a6f2450fbff5dc4fe64c207cf7159
parent468a19f996b920b3e6205df037731e7e55e2d87c (diff)
downloadaur-8af5c60ff37f0f040ca57c57a57cfcf1fdcfd1e3.tar.gz
ports from debian
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
-rw-r--r--.SRCINFO35
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD64
-rw-r--r--configparser_api_changes.patch46
-rw-r--r--configparser_use_old_version.patch11
-rw-r--r--fix-PyGIWarnings.patch109
-rw-r--r--setlocale.patch25
-rw-r--r--version.patch9
8 files changed, 227 insertions, 75 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 37b3698b693..287277f55bf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,41 +1,28 @@
pkgbase = kazam
- pkgdesc = A screencasting program with design in mind
+ pkgdesc = Screencast and screenshot application created with design in mind
pkgver = 1.4.5
- pkgrel = 7
+ pkgrel = 8
url = https://launchpad.net/kazam
arch = any
license = GPL
- depends = python
depends = python-cairo
- depends = python-xdg
depends = python-dbus
- depends = python-distutils-extra
depends = python-gobject
- depends = gobject-introspection
+ depends = python-xdg
depends = gstreamer
depends = gst-plugins-base
- depends = gtk3
- depends = pango
- depends = gdk-pixbuf2
+ depends = gst-libav
depends = libwnck3
- depends = ffmpeg
- depends = libmatroska
- depends = libtheora
- depends = gnome-desktop
+ depends = libcanberra
optdepends = libkeybinder3: hotkeys support
- optdepends = libappindicator3: indicator on Unity panel support
- conflicts = kazam-bzr
- conflicts = kazam-stable-bzr
source = https://launchpad.net/kazam/stable/1.4.5/+download/kazam-1.4.5.tar.gz
- source = version.patch
source = configparser_api_changes.patch
- source = configparser34.py
- source = configparser_use_old_version.patch
- md5sums = 522ac80fef7123875271b30298ed6877
- md5sums = 847ae2478ae5e35f6e1af49aa9fb3fa9
- md5sums = 8e751e821558c989ac02ef687a7b7339
- md5sums = 9974105c95473b9d39c705780367879a
- md5sums = 4e59fc27cd4cd5ca1fe1aa379009c31e
+ source = fix-PyGIWarnings.patch
+ source = setlocale.patch
+ sha256sums = 8e4868c09c4b0ad55b3c72407a26ef94020dc1b95ac31dfdea112b5377b6cfe3
+ sha256sums = 5dd8d693437377b0e9bcd600cc9fd700c855b9b861ed51f3cd061ab0f52d9988
+ sha256sums = 1e886d680bcc09bd90b45d294496d948fceccae0813cbea5273dc8b493d4e324
+ sha256sums = 9309d29b33ca78b6c3e3e74222346a0a02068a37c7bf7bf8ce0b50fd79706b82
pkgname = kazam
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..5c262cdf325
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.tar.*
+*.pkg.*
+*.log
diff --git a/PKGBUILD b/PKGBUILD
index ff874c0a644..9f612f992a4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,54 @@
+# Maintainer: Yurii Kolesykov <root@yurikoles.com>
+
pkgname=kazam
pkgver=1.4.5
-pkgrel=7
-pkgdesc="A screencasting program with design in mind"
+pkgrel=8
+pkgdesc="Screencast and screenshot application created with design in mind"
arch=('any')
url="https://launchpad.net/kazam"
license=('GPL')
-groups=()
-depends=('python' 'python-cairo' 'python-xdg' 'python-dbus' 'python-distutils-extra' 'python-gobject' 'gobject-introspection' 'gstreamer' 'gst-plugins-base' 'gtk3' 'pango' 'gdk-pixbuf2' 'libwnck3' 'ffmpeg' 'libmatroska' 'libtheora' 'gnome-desktop')
-optdepends=('libkeybinder3: hotkeys support' 'libappindicator3: indicator on Unity panel support')
-conflicts=('kazam-bzr' 'kazam-stable-bzr')
-source=("https://launchpad.net/${pkgname}/stable/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"
- 'version.patch'
- 'configparser_api_changes.patch'
- 'configparser34.py'
- 'configparser_use_old_version.patch')
-md5sums=('522ac80fef7123875271b30298ed6877'
- '847ae2478ae5e35f6e1af49aa9fb3fa9'
- '8e751e821558c989ac02ef687a7b7339'
- '9974105c95473b9d39c705780367879a'
- '4e59fc27cd4cd5ca1fe1aa379009c31e')
+depends=(
+ 'python-cairo'
+ 'python-dbus'
+ 'python-gobject'
+ 'python-xdg'
+ 'gstreamer'
+ 'gst-plugins-base'
+ 'gst-libav'
+ 'libwnck3'
+ 'libcanberra'
+)
+optdepends=(
+ 'libkeybinder3: hotkeys support'
+)
+
+source=(
+ "https://launchpad.net/${pkgname}/stable/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"
+ configparser_api_changes.patch
+ fix-PyGIWarnings.patch
+ setlocale.patch
+)
+sha256sums=('8e4868c09c4b0ad55b3c72407a26ef94020dc1b95ac31dfdea112b5377b6cfe3'
+ '5dd8d693437377b0e9bcd600cc9fd700c855b9b861ed51f3cd061ab0f52d9988'
+ '1e886d680bcc09bd90b45d294496d948fceccae0813cbea5273dc8b493d4e324'
+ '9309d29b33ca78b6c3e3e74222346a0a02068a37c7bf7bf8ce0b50fd79706b82')
+
+_srcname=${pkgname}-${pkgver}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- cp "${srcdir}/configparser34.py" "${srcdir}/$pkgname-$pkgver/$pkgname/backend/"
- patch -p1 < "${srcdir}/version.patch"
- patch -p1 < "${srcdir}/configparser_api_changes.patch"
- patch -p1 < "${srcdir}/configparser_use_old_version.patch"
+ cd "${_srcname}"
+
+ local src
+ for src in "${source[@]}"; do
+ src="${src%%::*}"
+ src="${src##*/}"
+ [[ $src = *.patch ]] || continue
+ echo "Applying patch $src..."
+ patch -Np1 < "../$src"
+ done
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${_srcname}"
python3 setup.py install --root ${pkgdir}
}
diff --git a/configparser_api_changes.patch b/configparser_api_changes.patch
index 04b46d9b8f2..9463840efb0 100644
--- a/configparser_api_changes.patch
+++ b/configparser_api_changes.patch
@@ -1,21 +1,49 @@
From: Andrew Starr-Bochicchio <asb@debian.org>
+Date: Tue, 4 Jun 2019 15:33:36 +0300
Subject: Update for changes in ConfigParser api.
-Bug: https://bugs.launchpad.net/kazam/+bug/1500083
-Index: kazam/kazam/backend/config.py
-===================================================================
---- kazam.orig/kazam/backend/config.py 2013-03-13 20:25:20.917993000 -0400
-+++ kazam/kazam/backend/config.py 2015-10-12 21:25:30.355157111 -0400
-@@ -98,9 +98,10 @@
+Bug: #801203, #916416, LP: #1500083
+Forwarded: https://github.com/hzbd/kazam/pull/21
+Author: Andrew Starr-Bochicchio <asb@debian.org>
+Author: Sergey Spitsyn <sswebcoder@gmail.com>
+Reviewed-by: Nicolas Braud-Santoni <nicoo@debian.org>
+---
+ kazam/backend/config.py | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/kazam/backend/config.py b/kazam/backend/config.py
+index 59a6c5a..2274435 100644
+--- a/kazam/backend/config.py
++++ b/kazam/backend/config.py
+@@ -73,7 +73,7 @@ class KazamConfig(ConfigParser):
+ CONFIGFILE = os.path.join(CONFIGDIR, "kazam.conf")
+
+ def __init__(self):
+- ConfigParser.__init__(self, self.DEFAULTS[0]['keys'])
++ super().__init__(self)
+ if not os.path.isdir(self.CONFIGDIR):
+ os.makedirs(self.CONFIGDIR)
+ if not os.path.isfile(self.CONFIGFILE):
+@@ -98,9 +98,9 @@ class KazamConfig(ConfigParser):
if d_key == key:
return d_section["keys"][key]
- def get(self, section, key):
-+ def get(self, section, key, raw=True, fallback=None):
++ def get(self, section, key, **kwargs):
try:
- return ConfigParser.get(self, section, key)
-+ return super(KazamConfig, self).get(section,
-+ key, raw=True, fallback=fallback)
++ return super(KazamConfig, self).get(section, key, **kwargs)
except NoSectionError:
default = self.find_default(section, key)
self.set(section, key, default)
+@@ -122,9 +122,7 @@ class KazamConfig(ConfigParser):
+ def set(self, section, option, value):
+ # If the section referred to doesn't exist (rare case),
+ # then create it
+- if not self.has_section(section):
+- self.add_section(section)
+- ConfigParser.set(self, section, option, str(value))
++ super().set(section, option, str(value))
+
+ def write(self):
+ file_ = open(self.CONFIGFILE, "w")
diff --git a/configparser_use_old_version.patch b/configparser_use_old_version.patch
deleted file mode 100644
index 5b4d3d87ae1..00000000000
--- a/configparser_use_old_version.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- /tmp/old.py 2018-12-26 22:30:26.097501431 +0800
-+++ kazam/kazam/backend/config.py 2018-12-26 22:30:43.520834893 +0800
-@@ -21,7 +21,7 @@
- # MA 02110-1301, USA.
-
- import os
--from configparser import ConfigParser, NoSectionError, NoOptionError
-+from kazam.backend.configparser34 import ConfigParser, NoSectionError, NoOptionError
- from xdg.BaseDirectory import xdg_config_home
-
-
diff --git a/fix-PyGIWarnings.patch b/fix-PyGIWarnings.patch
new file mode 100644
index 00000000000..06d15e54f04
--- /dev/null
+++ b/fix-PyGIWarnings.patch
@@ -0,0 +1,109 @@
+From: Andrew Starr-Bochicchio <asb@debian.org>
+Date: Sat, 8 Jun 2019 11:01:45 +0300
+Subject: Properly import from PyGI by setting require_version
+
+---
+ bin/kazam | 2 ++
+ kazam/backend/gstreamer.py | 2 ++
+ kazam/frontend/indicator.py | 6 +++++-
+ kazam/frontend/window_area.py | 2 ++
+ 4 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/bin/kazam b/bin/kazam
+index fb4073b..2382974 100755
+--- a/bin/kazam
++++ b/bin/kazam
+@@ -22,6 +22,7 @@
+ # MA 02110-1301, USA.
+
+ import os
++import gi
+ import sys
+ import dbus
+ import logging
+@@ -29,6 +30,7 @@ import dbus.service
+ from argparse import ArgumentParser
+ from dbus.mainloop.glib import DBusGMainLoop
+
++gi.require_version('Gtk', '3.0')
+ from gi.repository import Gtk
+
+ class KazamService(dbus.service.Object):
+diff --git a/kazam/backend/gstreamer.py b/kazam/backend/gstreamer.py
+index 8e35db7..f10bd10 100644
+--- a/kazam/backend/gstreamer.py
++++ b/kazam/backend/gstreamer.py
+@@ -20,6 +20,7 @@
+ # MA 02110-1301, USA.
+
+ import os
++import gi
+ import logging
+ logger = logging.getLogger("GStreamer")
+
+@@ -32,6 +33,7 @@ import multiprocessing
+ os.environ["GST_DEBUG_DUMP_DOT_DIR"] = "/tmp"
+ os.putenv("GST_DEBUG_DUMP_DOT_DIR", "/tmp")
+
++gi.require_version('Gst', '1.0')
+ from gi.repository import GObject, Gst
+
+ from kazam.backend.prefs import *
+diff --git a/kazam/frontend/indicator.py b/kazam/frontend/indicator.py
+index d214f9b..97a3885 100644
+--- a/kazam/frontend/indicator.py
++++ b/kazam/frontend/indicator.py
+@@ -24,6 +24,7 @@ import logging
+ logger = logging.getLogger("Indicator")
+
+ from gettext import gettext as _
++import gi
+ from gi.repository import Gtk, GObject, GLib
+
+ from kazam.backend.prefs import *
+@@ -94,6 +95,8 @@ class KazamSuperIndicator(GObject.GObject):
+ # Setup keybindings - Hardcore way
+ #
+ try:
++ import gi
++ gi.require_version('Keybinder', '3.0')
+ from gi.repository import Keybinder
+ logger.debug("Trying to bind hotkeys.")
+ Keybinder.init()
+@@ -145,6 +148,7 @@ class KazamSuperIndicator(GObject.GObject):
+ self.emit("indicator-quit-request")
+
+ try:
++ gi.require_version('AppIndicator3', '0.1')
+ from gi.repository import AppIndicator3
+
+ class KazamIndicator(KazamSuperIndicator):
+@@ -219,7 +223,7 @@ try:
+ if not self.silent:
+ self.indicator.set_status(AppIndicator3.IndicatorStatus.ATTENTION)
+
+-except ImportError:
++except (ImportError, ValueError):
+ #
+ # AppIndicator failed to import, not running Ubuntu?
+ # Fallback to Gtk.StatusIcon.
+diff --git a/kazam/frontend/window_area.py b/kazam/frontend/window_area.py
+index 0024afb..2d3487b 100644
+--- a/kazam/frontend/window_area.py
++++ b/kazam/frontend/window_area.py
+@@ -19,6 +19,7 @@
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ # MA 02110-1301, USA.
+
++import gi
+ import time
+ import cairo
+ import math
+@@ -27,6 +28,7 @@ logger = logging.getLogger("Window Select")
+
+ from gettext import gettext as _
+
++gi.require_version('Wnck', '3.0')
+ from gi.repository import Gtk, GObject, Gdk, Wnck, GdkX11
+
+ from kazam.backend.prefs import *
diff --git a/setlocale.patch b/setlocale.patch
new file mode 100644
index 00000000000..7c8b8339a4e
--- /dev/null
+++ b/setlocale.patch
@@ -0,0 +1,25 @@
+From: Mikhail Novosyolov <mikhailnov@dumalogiya.ru>
+Date: Thu, 20 Sep 2018 00:18:04 +0300
+Subject: Fix setting the locale of Kazam UI
+
+---
+ kazam/app.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/kazam/app.py b/kazam/app.py
+index d14face..e4e3182 100644
+--- a/kazam/app.py
++++ b/kazam/app.py
+@@ -821,8 +821,11 @@ class KazamApp(GObject.GObject):
+ def setup_translations(self):
+ gettext.bindtextdomain("kazam", "/usr/share/locale")
+ gettext.textdomain("kazam")
++ locale.bindtextdomain("kazam", "/usr/share/locale")
++ locale.textdomain("kazam")
++ currentLocale = locale.getlocale()
+ try:
+- locale.setlocale(locale.LC_ALL, "")
++ locale.setlocale(locale.LC_ALL, currentLocale)
+ except Exception as e:
+ logger.exception("EXCEPTION: Setlocale failed, no language support.")
+
diff --git a/version.patch b/version.patch
deleted file mode 100644
index dbc8fc8e50b..00000000000
--- a/version.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -urbN a/kazam/version.py b/kazam/version.py
---- a/kazam/version.py 2013-06-10 10:32:59.000000000 +0300
-+++ b/kazam/version.py 2013-06-10 10:37:42.000000000 +0300
-@@ -1,3 +1,3 @@
--DISTRO='Ubuntu'
--RELEASE='14.04'
-+DISTRO='Archlinux'
-+RELEASE='rolling'
-