Accepting request 84486 from home:jengelh:bl-new

- Implement shlib package (libfam0-gamin)
- Resolve build error due to source disabling deprecated contructs
  that it used

OBS-URL: https://build.opensuse.org/request/show/84486
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gamin?expand=0&rev=2
This commit is contained in:
Jan Engelhardt 2011-10-02 11:43:54 +00:00 committed by Git OBS Bridge
parent 4a80f113fa
commit a2ebd18112
4 changed files with 125 additions and 23 deletions

66
gamin-obsol-glib.diff Normal file
View File

@ -0,0 +1,66 @@
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-09-22 13:34:35.152493695 +0200
Well guess what, there is a -DG_DISABLE_DEPRECATED in Makefile.am,
but the source code uses the deprecated G_CONST_RETURN.
Substitute it...
---
server/gam_node.c | 2 +-
server/gam_node.h | 2 +-
server/gam_subscription.c | 2 +-
server/gam_subscription.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
Index: gamin-0.1.10/server/gam_node.c
===================================================================
--- gamin-0.1.10.orig/server/gam_node.c
+++ gamin-0.1.10/server/gam_node.c
@@ -122,7 +122,7 @@ gam_node_set_is_dir(GamNode * node, gboo
* it has finished with the string. If it must keep it longer, it
* should makes its own copy. The returned string must not be freed.
*/
-G_CONST_RETURN char *
+const char *
gam_node_get_path(GamNode * node)
{
g_assert(node);
Index: gamin-0.1.10/server/gam_node.h
===================================================================
--- gamin-0.1.10.orig/server/gam_node.h
+++ gamin-0.1.10/server/gam_node.h
@@ -58,7 +58,7 @@ gboolean gam_node_is_dir
void gam_node_set_is_dir (GamNode *node,
gboolean is_dir);
-G_CONST_RETURN char *gam_node_get_path (GamNode *node);
+const char *gam_node_get_path (GamNode *node);
GList *gam_node_get_subscriptions (GamNode *node);
Index: gamin-0.1.10/server/gam_subscription.c
===================================================================
--- gamin-0.1.10.orig/server/gam_subscription.c
+++ gamin-0.1.10/server/gam_subscription.c
@@ -141,7 +141,7 @@ gam_subscription_pathlen(GamSubscription
* @param sub the GamSubscription
* @returns The path being monitored. It should not be freed.
*/
-G_CONST_RETURN char *
+const char *
gam_subscription_get_path(GamSubscription * sub)
{
if (sub == NULL)
Index: gamin-0.1.10/server/gam_subscription.h
===================================================================
--- gamin-0.1.10.orig/server/gam_subscription.h
+++ gamin-0.1.10/server/gam_subscription.h
@@ -21,7 +21,7 @@ int gam_subscription_pa
int gam_subscription_get_reqno (GamSubscription *sub);
-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub);
+const char *gam_subscription_get_path (GamSubscription *sub);
GamListener *gam_subscription_get_listener (GamSubscription *sub);

11
gamin-rpmlintrc Normal file
View File

@ -0,0 +1,11 @@
#
# rpmlint says:
#
# libfam0-gamin.x86_64: E: shlib-policy-name-error (Badness: 10000) libfam0
# Your package contains a single shared library but is not named after its
# SONAME.
#
# We have to use libfam0-gamin, since libfam0 is already taken by
# the original FAM.
#
addFilter("shlib-policy-name-error")

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 22 11:36:52 UTC 2011 - jengelh@medozas.de
- Implement shlib package (libfam0-gamin)
- Resolve build error due to source disabling deprecated contructs
that it used
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 1 00:00:00 UTC 2009 - pascal.bleser@opensuse.org Tue Sep 1 00:00:00 UTC 2009 - pascal.bleser@opensuse.org

View File

@ -4,32 +4,44 @@ Name: gamin
Version: 0.1.10 Version: 0.1.10
Release: 0 Release: 0
Summary: Library providing the FAM File Alteration Monitor API Summary: Library providing the FAM File Alteration Monitor API
License: GNU Library General Public License version 2 (LGPL v2) License: LGPL-2.1
Group: System/Daemons Group: System/Daemons
URL: http://www.gnome.org/~veillard/gamin/ URL: http://www.gnome.org/~veillard/gamin/
# http://www.gnome.org/~veillard/gamin/sources/%{name}-%{version}.tar.gz # http://www.gnome.org/~veillard/gamin/sources/%{name}-%{version}.tar.gz
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source2: %name-rpmlintrc
Patch0: gamin-return.patch Patch0: gamin-return.patch
Patch1: gamin-fam_abi_compatibility_FamErrlist.patch Patch1: gamin-fam_abi_compatibility_FamErrlist.patch
Patch2: gamin-fix_python_main.patch Patch2: gamin-fix_python_main.patch
Provides: fam Patch3: gamin-obsol-glib.diff
Provides: libfam0 #Provides: fam
Provides: libgamin1_0 = %{version}-%{release}
Requires: gamin-server = %{version}-%{release} Requires: gamin-server = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: glib2-devel python-devel gcc gcc-c++ libstdc++-devel make pkgconfig BuildRequires: glib2-devel python-devel gcc gcc-c++ libstdc++-devel make pkgconfig
%description %description
This C library provides an API and ABI compatible file alteration This C library provides an API and ABI compatible file alteration
monitor mechanism compatible with FAM but not dependent on a system wide monitor mechanism compatible with FAM, but not dependent on a system wide
daemon. daemon.
%package -n libgamin-1-0
Summary: Library providing the FAM File Alteration Monitor API
Group: System/Libraries
%description -n libgamin-1-0
This C library provides an API and ABI compatible file alteration
monitor mechanism compatible with FAM, but not dependent on a system wide
daemon.
%package -n libfam0-gamin
Summary: Library providing the FAM File Alteration Monitor API
Group: System/Libraries
Conflicts: libfam0
Authors: %description -n libfam0-gamin
-------- This C library provides an API and ABI compatible file alteration
Daniel Veillard <veillard@redhat.com> monitor mechanism compatible with FAM, but not dependent on a system wide
daemon.
%package server %package server
Summary: Server for the Library providing the FAM File Alteration Monitor API Summary: Server for the Library providing the FAM File Alteration Monitor API
@ -43,8 +55,9 @@ It is split off into its own subpackage to void file conflicts when both
%package devel %package devel
Summary: Libraries and includes to build against the Gamin library Summary: Libraries and includes to build against the Gamin library
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release} Requires: libgamin-1-0 = %version, libfam0-gamin = %version
Provides: fam-devel # Both have libfam.so
Conflicts: fam-devel
%description devel %description devel
Libraries, includes, etc. to use and build against the Gamin library. Libraries, includes, etc. to use and build against the Gamin library.
@ -67,12 +80,12 @@ of the gamin package.
%patch0 -p0 %patch0 -p0
%patch1 %patch1
%patch2 %patch2
%patch -P 3 -p1
%build %build
%configure \ %configure \
--disable-static --disable-static
make %{?_smp_mflags}
%__make %{?jobs:-j%{jobs}}
%install %install
%makeinstall %makeinstall
@ -82,25 +95,30 @@ of the gamin package.
%__mkdir_p .rpmdoc/python %__mkdir_p .rpmdoc/python
%__mv doc/python.html .rpmdoc/python/doc.html %__mv doc/python.html .rpmdoc/python/doc.html
%clean %post -n libgamin-1-0 -p /sbin/ldconfig
%{?buildroot:%__rm -rf "%{buildroot}"}
%post -p /sbin/ldconfig %postun -n libgamin-1-0 -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files %post -n libfam0-gamin -p /sbin/ldconfig
%postun -n libfam0-gamin -p /sbin/ldconfig
%files -n libgamin-1-0
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README Copyright TODO %doc AUTHORS ChangeLog NEWS README Copyright TODO
%doc doc/*.html
%doc doc/*.gif
%doc doc/*.txt
%{_libdir}/libfam.so.0.*.*
%{_libdir}/libfam.so.0
%{_libdir}/libgamin-1.so.0 %{_libdir}/libgamin-1.so.0
%{_libdir}/libgamin-1.so.0.*.* %{_libdir}/libgamin-1.so.0.*.*
%files -n libfam0-gamin
%defattr(-,root,root)
%{_libdir}/libfam.so.0.*.*
%{_libdir}/libfam.so.0
%files server %files server
%defattr(-, root, root) %defattr(-, root, root)
%doc doc/*.html
%doc doc/*.gif
%doc doc/*.txt
%{_libexecdir}/gam_server %{_libexecdir}/gam_server
%files devel %files devel