## don't replace ltmain.sh
%define __libtoolize :

%define glib2_version 2.32.0
%define gtk3_version 3.4.0
%define startup_notification_version 0.10

Summary: Window Navigator Construction Kit
Name: libwnck3
Version: 3.14.0
Release: 1%{?_dist_release}
URL: ftp://ftp.gnome.org
Source0: http://ftp.gnome.org/pub/GNOME/sources/libwnck/3.14/libwnck-%{version}.tar.xz
License: LGPLv2+
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-root

# follow 3lines was added 2.26.2-2
Vendor:		Project Vine	
Distribution:	Vine Linux
Packager:	Takemikaduchi

Requires: glib2 >= %{glib2_version}
Requires: gtk3 >= %{gtk3_version}
Requires: startup-notification >= %{startup_notification_version}
Requires: libXres

BuildRequires:	glib2-devel >= %{glib2_version}
BuildRequires:	gtk3-devel >= %{gtk3_version}
BuildRequires:  startup-notification-devel >= %{startup_notification_version}
BuildRequires:  perl-XML-Parser gettext
BuildRequires:	libXres-devel
BuildRequires:	gobject-introspection-devel

# Conflicts: libwnck < 2.31

Patch1: libwnck-2.18.0-above.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=459984
Patch2: crash-on-shutdown.patch

%description

libwnck3 (pronounced "libwink") is used to implement pagers, tasklists, 
and other such things. It allows applications to monitor information 
about open windows, workspaces, their names/icons, and so forth.

%package devel
Summary: Libraries and headers for libwnck
Group: Development/Libraries
Requires: %{name} = %{version}

Requires: glib2-devel >= %{glib2_version}
Requires: gtk3-devel >= %{gtk3_version}
Requires: pkgconfig
# added 2.26.2-2
Requires: startup-notification-devel >= %{startup_notification_version}
Requires: libXres-devel

# Conflicts: libwnck-devel < 2.31

%description devel

libwnck3 (pronounced "libwink") is used to implement pagers, tasklists, 
and other such things. It allows applications to monitor information 
about open windows, workspaces, their names/icons, and so forth.

You should install the libwnck-devel package if you would like to
compile applications that use libwnck. You don't need libwnck-devel 
just to use precompiled applications.


%prep
%setup -q -n libwnck-%{version}
#patch0 -p1 -b .appearance
%patch1 -p1 -b .above
%patch2 -p1 -b .crash-on-shutdown

%build
%configure --disable-static --enable-introspection=yes
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%find_lang libwnck-3.0

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -f libwnck-3.0.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/*
%{_libdir}/lib*.so.*
%{_libdir}/girepository-1.0

%files devel
%defattr(-,root,root)
#{_libdir}/lib*.a
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_datadir}/gtk-doc
%{_datadir}/gir-1.0

%changelog
* Sat Oct 31 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.0-1
- update to 3.14.0

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.9-1
- new upstream release

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.7-2
- rebuild with VineSeed environment

* Tue Aug 27 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.7-1
- new upstream release

* Sun Aug 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.6-1
- new upstream release

* Sun Feb 17 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.5-1
- new upstream release

* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
- new upstream release

* Sun May 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
- new upstream release

* Sun Apr 01 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.0-1
- new upstream release

* Fri Oct 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Wed Sep 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.92-1
- new upstream release

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90-1
- new upstream release

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.5-1
- new upstream release

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.2-1
- initial build for Vine Linux

