commit 9d6ceeabd45028bf98785e98e66459c13c794532
Author: Elan Ruusamäe <[email protected]>
Date:   Wed Nov 11 21:52:14 2015 +0200

    add pld hook, drop debian and fedora

 fedmsg-notify.spec | 14 ++++++++++----
 pld.patch          | 14 ++++++++++++++
 2 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/fedmsg-notify.spec b/fedmsg-notify.spec
index 55ead8c..f470742 100644
--- a/fedmsg-notify.spec
+++ b/fedmsg-notify.spec
@@ -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
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.")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fedmsg-notify.git/commitdiff/9d6ceeabd45028bf98785e98e66459c13c794532

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to