[gnome-shell-search-fedora-packages] Total rewrite as a dbus daemon for gnome-shell >= 3.6

Ralph Bean ralph at fedoraproject.org
Thu Nov 1 14:54:09 UTC 2012


commit 21426feffa02ac5f964a685c40112f6bf1fda322
Author: Ralph Bean <rbean at redhat.com>
Date:   Thu Nov 1 10:54:00 2012 -0400

    Total rewrite as a dbus daemon for gnome-shell >= 3.6

 .gitignore                              |    1 +
 gnome-shell-search-fedora-packages.spec |  113 +++++++++++++++++++++---------
 sources                                 |    2 +-
 3 files changed, 81 insertions(+), 35 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 164d9c1..aaaf61e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /gnome-shell-search-fedora-packages-0.1.tar.gz
+/gnome-shell-search-fedora-packages-1.0.0b.tar.gz
diff --git a/gnome-shell-search-fedora-packages.spec b/gnome-shell-search-fedora-packages.spec
index cb024e8..0247bbe 100644
--- a/gnome-shell-search-fedora-packages.spec
+++ b/gnome-shell-search-fedora-packages.spec
@@ -1,55 +1,100 @@
-%if 0%{?fedora} >= 17
-%global _gnomesearchdir %{_datadir}/gnome-shell/open-search-providers
-%else
-%global _gnomesearchdir %{_datadir}/gnome-shell/search_providers
-%endif
-
-Name:       gnome-shell-search-fedora-packages
-Version:    0.1
-Release:    5%{?dist}
-Summary:    Search the fedora-packages webapp from the gnome-shell
-
-Group:      User Interface/Desktops
-License:    GPLv3
-URL:        http://threebean.org/%{name}-%{version}.tar.gz
-Source0:    http://threebean.org/%{name}-%{version}.tar.gz
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
+
+%global modname gs_search_fedora_packages
+%global busname org.fedoraproject.fedorapackages.search
+
+Name:           gnome-shell-search-fedora-packages
+Version:        1.0.0b
+Release:        1%{?dist}
+Summary:        Search the Fedora Packages webapp from the gnome-shell
+
+License:        GPLv3+
+URL:            https://github.com/ralphbean/gnome-shell-search-fedora-packages
+Source0:        https://pypi.python.org/packages/source/g/%{name}/%{name}-%{version}.tar.gz
 
 BuildArch:      noarch
 
-Requires:       gnome-shell
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools-devel
+BuildRequires:  pygobject3
 
+Requires:       gnome-shell
+Requires:       pygobject3
+Requires:       python-pkgwat-api
 
 %description
-Search the fedora-packages webapp from the gnome-shell
+gnome-shell-search-fedora-packages provides a dbus daemon that returns results
+from the https://apps.fedoraproject.org/packages webapp to the gnome-shell
+search process.
 
 %prep
-%setup -q -n %{name}
+%setup -q
+
 
 %build
-# nothing to build
+%{__python} setup.py build
+
 
 %install
+%{__python} setup.py install -O1 --skip-build \
+    --install-data=%{_datadir} --root %{buildroot}
+
+# Search provider definition
+mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers
+install -m 0644 conf/%{busname}.ini %{buildroot}%{_datadir}/gnome-shell/search-providers/
+
+# DBus configuration
+mkdir -p %{buildroot}%{_datadir}/dbus-1/services/
+install -m 0644 conf/%{busname}.service \
+    %{buildroot}%{_datadir}/dbus-1/services/%{busname}.service
+mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
+install -m 0644 conf/%{busname}.conf \
+    %{buildroot}%{_sysconfdir}/dbus-1/system.d/%{busname}.conf
+
+# GSettings schema
+mkdir -p %{buildroot}%{_datadir}/glib-2.0/schemas
+install -m 0644 conf/%{busname}.gschema.xml %{buildroot}%{_datadir}/glib-2.0/schemas
+
+%postun
+if [ $1 -eq 0 ]; then
+    glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
+
+%posttrans
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 
-mkdir -p $RPM_BUILD_ROOT/%{_gnomesearchdir}
-cp fedora-packages.xml $RPM_BUILD_ROOT/%{_gnomesearchdir}/.
 
 %files
-%{_gnomesearchdir}/fedora-packages.xml
+%doc README.md LICENSE
+%{_bindir}/%{name}-daemon
+
+%{python_sitelib}/%{modname}/
+%{python_sitelib}/gnome_shell_search_fedora_packages-%{version}-py%{pyver}.egg-info/
+
+%{_datadir}/gnome-shell/search-providers/%{busname}.ini
+%{_datadir}/dbus-1/services/%{busname}.service
+%{_sysconfdir}/dbus-1/system.d/%{busname}.conf
+%{_datadir}/glib-2.0/schemas/%{busname}.gschema.xml
+
 
 %changelog
-* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+* Thu Nov 01 2012 Ralph Bean <rbean at redhat.com> - 1.0.0b-1
+- Got it basically working now.
+
+* Wed Oct 31 2012 Ralph Bean <rbean at redhat.com> - 1.0.0a-1
+- Forked from fedmsg-notify to create gnome-shell-search-fedora-packages.
 
-* Thu May 24 2012 Ralph Bean <rbean at redhat.com> - 0.1-4
-- Re-added mkdir -p in %%install
-- Removed BuildRequires for gnome-shell
+* Tue Oct 30 2012 Luke Macken <lmacken at redhat.com> - 0.3.1-1
+- Update our gsettings schema to enable the service once installed.
 
-* Thu May 24 2012 Ralph Bean <rbean at redhat.com> - 0.1-3
-- Change providers_dir macro to full path _gnomesearchdir
-- Removed mkdir -p in %%install
+* Wed Oct 24 2012 Luke Macken <lmacken at redhat.com> - 0.3.0-1
+- 0.3.0
+- Require fedmsg > 0.5.5 for fedmsg.text.make_processors
 
-* Thu May 24 2012 Ralph Bean <rbean at redhat.com> - 0.1-2
-Support F16 with providers_dir global
+* Thu Oct 06 2012 Luke Macken <lmacken at redhat.com> - 0.2.1-1
+- 0.2.1 release
+- Add the GSettings schema
 
-* Thu May 24 2012 Ralph Bean <rbean at redhat.com> - 0.1-1
-Initial packaging for Fedora
+* Thu Oct 04 2012 Luke Macken <lmacken at redhat.com> - 0.2.0-1
+- Initial package.
diff --git a/sources b/sources
index 18676a2..d2f22e5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0557c90f5a9e4142c555836dd6a5d80e  gnome-shell-search-fedora-packages-0.1.tar.gz
+23d66dfc8986fd33c351d9b94384ff0e  gnome-shell-search-fedora-packages-1.0.0b.tar.gz


More information about the scm-commits mailing list