From 6ee05b85ae5d27243d3bacb8ddd739e30cf86140 Mon Sep 17 00:00:00 2001
From: Nathaniel McCallum <nathaniel@themccallums.org>
Date: Sat, 26 Jan 2013 15:16:51 -0500
Subject: [PATCH] make rygel-0.17.7 actually build; add docs subpackage

---
 rygel-0.17.7-typofix.patch | 25 +++++++++++++++++++++++++
 rygel.spec                 | 39 +++++++++++++++++++++++++++++++++++----
 2 files changed, 60 insertions(+), 4 deletions(-)
 create mode 100644 rygel-0.17.7-typofix.patch

diff --git a/rygel-0.17.7-typofix.patch b/rygel-0.17.7-typofix.patch
new file mode 100644
index 0000000..f477630
--- /dev/null
+++ b/rygel-0.17.7-typofix.patch
@@ -0,0 +1,25 @@
+From 145efdc0466e8c2a08426f3c3e7452fc5c8b0416 Mon Sep 17 00:00:00 2001
+From: Nathaniel McCallum <nathaniel@themccallums.org>
+Date: Sat, 26 Jan 2013 14:33:24 -0500
+Subject: [PATCH] fix typo in ug.po
+
+---
+ po/ug.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/po/ug.po b/po/ug.po
+index 0ce1757..af64ced 100644
+--- a/po/ug.po
++++ b/po/ug.po
+@@ -82,7 +82,7 @@ msgstr "UPnP/DLNA مۇلازىمەتلىرى"
+ 
+ #: ../data/rygel.desktop.in.in.h:3
+ msgid "mediaserver;mediarenderer;share;audio;video;pictures;"
+-msgstr "mediaserver;mediarenderer;share;audio;video;pictures;ۋاسىتە مۇلازىمېتىرى؛ۋاسىتە سىزغۇچ؛ھەمبەھىر؛ئۈن؛سىن؛سۈرەت؛"
++msgstr "mediaserver;mediarenderer;share;audio;video;pictures;ۋاسىتە مۇلازىمېتىرى؛ۋاسىتە سىزغۇچ؛ھەمبەھىر؛ئۈن؛سىن؛سۈرەت؛;"
+ 
+ #: ../src/plugins/external/rygel-external-plugin-factory.vala:42
+ #: ../src/plugins/mpris/rygel-mpris-plugin-factory.vala:42
+-- 
+1.8.1
+
diff --git a/rygel.spec b/rygel.spec
index 39c45f6..1505c13 100644
--- a/rygel.spec
+++ b/rygel.spec
@@ -1,6 +1,6 @@
 Name:          rygel
 Version:       0.17.7
-Release:       1%{?dist}
+Release:       2%{?dist}
 Summary:       A collection of UPnP/DLNA services
 
 Group:         Applications/Multimedia
@@ -8,6 +8,9 @@ License:       LGPLv2+
 URL:           http://live.gnome.org/Rygel
 Source0:       ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/0.17/%{name}-%{version}.tar.xz
 
+#Emailed upstream
+Patch1:        rygel-0.17.7-typofix.patch
+
 BuildRequires: dbus-glib-devel
 BuildRequires: desktop-file-utils
 BuildRequires: gstreamer1-devel
@@ -24,6 +27,7 @@ BuildRequires: sqlite-devel
 BuildRequires: tracker-devel
 BuildRequires: intltool
 BuildRequires: gupnp-dlna-devel
+BuildRequires: gtk-doc
 
 %description
 Rygel is a home media solution that allows you to easily share audio, video and
@@ -42,6 +46,15 @@ Requires: pkgconfig
 %description devel
 Files for development with %{name}.
 
+%package docs
+Summary: Development package for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description docs
+Contains developer documentation for %{name}.
+
 %package tracker
 Summary: Tracker plugin for %{name}
 Group: Applications/Multimedia
@@ -53,6 +66,7 @@ A plugin for rygel to use tracker to locate media on the local machine.
 
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 %configure --enable-tracker-plugin --enable-media-export-plugin --enable-external-plugin \
@@ -63,6 +77,11 @@ make %{?_smp_mflags} V=1
 %install
 make install DESTDIR=%{buildroot} INSTALL='install -p'
 
+#Remove rpaths
+find %{buildroot}/%{_libdir} -name '*.so' -exec chrpath -d {} ';'
+chrpath -d %{buildroot}/%{_bindir}/rygel
+chrpath -d %{buildroot}/%{_bindir}/rygel-preferences
+
 #Remove libtool archives.
 find %{buildroot} -name '*.la' -exec rm -f {} ';'
 
@@ -104,9 +123,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/icons/hicolor/*/apps/rygel*
 %{_datadir}/man/man?/rygel*
 
-%files tracker
-%{_libdir}/rygel-2.0/plugins/librygel-tracker.so
-
 %files devel
 %{_libdir}/librygel-*.so
 %{_includedir}/rygel-2.0
@@ -114,7 +130,22 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/vala/vapi/rygel*.deps
 %{_datadir}/vala/vapi/rygel*.vapi
 
+%files docs
+%{_datadir}/gtk-doc/html/lib%{name}-core
+%{_datadir}/gtk-doc/html/lib%{name}-renderer
+%{_datadir}/gtk-doc/html/lib%{name}-renderer-gst
+%{_datadir}/gtk-doc/html/lib%{name}-server
+
+%files tracker
+%{_libdir}/rygel-2.0/plugins/librygel-tracker.so
+
+
 %changelog
+* Sat Jan 26 2013 Nathaniel McCallum <nathaniel@themccallums.org> - 0.17.7-2
+- Add rygel-0.17.7-typofix.patch to fix the build of rygel.desktop
+- Add docs subpackage
+- Remove rpaths
+
 * Sat Jan 26 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.17.7-1
 - 0.17.7 devel release
 - http://ftp.gnome.org/pub/GNOME/sources/rygel/0.17/rygel-0.17.7.news
-- 
1.8.1

