]> git.pld-linux.org Git - packages/fedmsg-notify.git/commitdiff
add pld hook, drop debian and fedora
authorElan Ruusamäe <glen@delfi.ee>
Wed, 11 Nov 2015 19:52:14 +0000 (21:52 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 11 Nov 2015 19:52:14 +0000 (21:52 +0200)
fedmsg-notify.spec
pld.patch [new file with mode: 0644]

index 55ead8c730ef6d0e34fe39bf55cb5fdc20a1ad12..f470742bc5e7afe8bad35f25df54d7b4eb43f08e 100644 (file)
@@ -1,11 +1,12 @@
 Summary:       Fedmsg Desktop Notifications
 Name:          fedmsg-notify
 Version:       0.5.5
-Release:       0.1
+Release:       0.2
 License:       GPL v3+
 Group:         X11/Applications/Networking
 Source0:       https://github.com/fedora-infra/fedmsg-notify/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: fc6fe17a2c385c99e0165df5b0a7560e
+Patch0:                pld.patch
 URL:           https://github.com/fedora-infra/fedmsg-notify
 BuildRequires: desktop-file-utils
 BuildRequires: python-devel
@@ -31,11 +32,17 @@ to enable/disable the service.
 
 %prep
 %setup -q
+%patch0 -p1
+
+# install pld
+touch fedmsg_notify/distro_specific/_pld.py
+# skip fedora and debian
+mv fedmsg_notify/distro_specific/_debian.py .
+mv fedmsg_notify/distro_specific/_fedora.py .
 
 %build
 %{__python} setup.py build
 
-
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__python} setup.py install \
@@ -96,6 +103,5 @@ fi
 %{py_sitescriptdir}/fedmsg_notify/*.py[co]
 %dir %{py_sitescriptdir}/fedmsg_notify/distro_specific
 %{py_sitescriptdir}/fedmsg_notify/distro_specific/__init__.py[co]
-%{py_sitescriptdir}/fedmsg_notify/distro_specific/_debian.py[co]
-%{py_sitescriptdir}/fedmsg_notify/distro_specific/_fedora.py[co]
+%{py_sitescriptdir}/fedmsg_notify/distro_specific/_pld.py[co]
 %{py_sitescriptdir}/fedmsg_notify-%{version}-py*.egg-info
diff --git a/pld.patch b/pld.patch
new file mode 100644 (file)
index 0000000..d60ddb6
--- /dev/null
+++ b/pld.patch
@@ -0,0 +1,14 @@
+--- fedmsg-notify-0.5.5/fedmsg_notify/distro_specific/__init__.py~     2014-12-17 20:56:07.000000000 +0200
++++ fedmsg-notify-0.5.5/fedmsg_notify/distro_specific/__init__.py      2015-11-11 21:48:02.038752091 +0200
+@@ -32,6 +32,11 @@
+     pass
+ try:
++    from ._pld import *
++except ImportError:
++    pass
++
++try:
+     get_installed_packages
+ except NameError:
+     log.warn("Could not import distro-specific packages. Stubbing out the package management functions.")
This page took 0.068478 seconds and 4 git commands to generate.