File libwnck.spec of Package libwnck

#
# spec file for package libwnck (Version 2.28.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libwnck
BuildRequires:  fdupes
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  licenses
# bug437293
%ifarch ppc64
Obsoletes:      libwnck-64bit
%endif
#
License:        LGPL v2.1 or later
Group:          Development/Libraries/GNOME
Version:        2.28.0
Release:        2
# WARNING: After changing versions please call Re or rpmbuild to auto-update spec file:
#%(sh %{_sourcedir}/%{name}_spec-update.sh %{_sourcedir} %{name} libwnck-1)
%define libwnck-1_name 22
Summary:        Window Navigator Construction Kit (Library Package)
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}_spec-update.sh
# PATCH-FIX-UPSTREAM libwnck-fix-bindings.patch vuntz@opensuse.org -- Taken from upstream
Patch0:         libwnck-fix-bindings.patch
Requires:       libwnck-1-22 = %{version} licenses
Requires:       %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The Window Navigator Construction Kit is a library that can be used to
write task lists, pagers, and similar GNOME programs.

%package -n libwnck-1-22
License:        LGPL v2.1 or later
Summary:        Window Navigator Construction Kit (Library Package)
Group:          Development/Libraries/GNOME
# Require translation package (%{name}) not older than the library:
Requires:       %{name}-lang = %{version}
# bug437293
%ifarch ppc64
Obsoletes:      libwnck-64bit
%endif
#

%description -n libwnck-1-22
The Window Navigator Construction Kit is a library that can be used to
write task lists, pagers, and similar GNOME programs.

%package devel
License:        GPL v2 or later
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/GNOME
Requires:       %{name} = %{version} glib2-devel gtk2-devel
# bug437293
%ifarch ppc64
Obsoletes:      libwnck-devel-64bit
%endif
Obsoletes:      libwnck-doc <= %{version}
Provides:       libwnck-doc = %{version}

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%lang_package
%prep
%setup -q
%patch0 -p1
# rpmlint note: libwnck has a separate translation for both Bengali and Bengali India

%build
# needed for libwnck-2.19.4:
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure\
	--disable-static
%__make %{?jobs:-j%jobs}

%install
%makeinstall
rm $RPM_BUILD_ROOT/%{_libdir}/*.*a
%find_lang %{name}
LIBNAME="$(echo $RPM_BUILD_ROOT%{_libdir}/%{name}-*.so.?? | sed 's/.*\///;s/\.so\./-/;s/\./_/')"
if test "$LIBNAME" != libwnck-1-22 ; then
    echo "Library version does not match package name. It should be $LIBNAME."
    exit 1
fi
for FILE in COPYING ; do
    MD5SUM=$(md5sum $FILE | sed 's/ .*//')
    if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then
        ln -sf /usr/share/doc/licenses/md5/$MD5SUM $FILE
    fi
done
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libwnck-1-22 -p /sbin/ldconfig

%postun -n libwnck-1-22 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING README NEWS ChangeLog
%{_bindir}/wnck-urgency-monitor
%{_bindir}/wnckprop

%files lang -f %{name}.lang

%files -n libwnck-1-22
%defattr(-,root,root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/libwnck-1.0
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/*

%changelog
openSUSE Build Service is sponsored by