Name:           libxfce4ui
Version:        4.12.1
Release:        1%{?_dist_release}
Summary:        Commonly used Xfce widgets
Summary(ja):    Xfce の共用ウィジェット

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://xfce.org/

Source0:        http://archive.xfce.org/src/xfce/%{name}/4.12/%{name}-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  gettext
BuildRequires:  glib2-devel >= 2.30.0
BuildRequires:  gtk-doc
BuildRequires:  gtk2-devel >= 2.24.0
BuildRequires:  gtk3-devel >= 3.2.0
BuildRequires:  intltool
BuildRequires:  libSM-devel
BuildRequires:  libxfce4util-devel >= 4.12.0
BuildRequires:  startup-notification-devel >= 0.4
BuildRequires:  xfconf-devel >= 4.12.0
BuildRequires:  perl

Obsoletes:	xfce-utils < 4.9

Vendor: 	Project Vine
Distribution: 	Vine Linux

%description
Libxfce4ui is used to share commonly used Xfce widgets among the Xfce applications.

%package        devel
Summary:        Development files for %{name}
Summary(ja):    %{name} の開発用ファイル
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
# FIXME: Enable libglade again one day
#Requires:       glade3-libgladeui-devel
Requires:       pkgconfig

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q

%build
# FIXME: Enable libglade again one day
%configure --enable-gtk-doc --disable-static --disable-gladeui
# Remove rpaths
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

# The LD_LIBRARY_PATH hack is needed for --enable-gtk-doc
# because lt-libxfce4ui-scan is linked against libxfce4ui
export LD_LIBRARY_PATH=$( pwd )/libxfce4ui/.libs

make %{?_smp_mflags} V=1


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%find_lang %{name}


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database %{_datadir}/applications &> /dev/null || :

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
    gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :



%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README THANKS
%config(noreplace) %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
%{_bindir}/xfce4-about
%{_libdir}/*.so.*
%{_datadir}/applications/xfce4-about.desktop
%{_datadir}/icons/hicolor/48x48/apps/xfce4-logo.png

%files devel
%defattr(-,root,root,-)
%doc TODO
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%doc %{_datadir}/gtk-doc/

%changelog
* Thu Mar 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 4.12.1-1
- new upstream release

* Sat Feb 28 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 4.12.0-1
- new upstream release

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 4.10.0-2
- rebuild with VineSeed environment

* Wed Jun 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 4.10.0-1
- new upstream release
- remove Patch0
- add Obsoletes: xfce-utils < 4.9

* Mon Mar 28 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.8.0-6
- Initial build for Vine Linux

* Wed Mar 16 2011 Christoph Wickert <cwickert@fedoraproject.org> - 4.8.0-5
- Remove requirements for libxfcegui4-devel now that glade support was omitted

* Tue Feb 22 2011 Rakesh Pandit <rakesh@fedoraproject.org> - 4.8.0-4
- Disable glade as it still uses old API

* Tue Feb 22 2011 Rakesh Pandit <rakesh@fedoraproject.org> - 4.8.0-3
- Rebuild for new glade

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Jan 16 2011 Kevin Fenzi <kevin@tummy.com> - 4.8.0-1
- Update to 4.8.0 final. 

* Sun Jan 02 2011 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.6-1
- Update to 4.7.6

* Mon Nov 29 2010 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.5-1
- Update to 4.7.5

* Mon Nov 08 2010 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.4-1
- Update to 4.7.4

* Sun Sep 05 2010 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.3-1
- Update to 4.7.3
- Drop dependency on gtk-doc (#604399)

* Tue Jul 27 2010 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.2-2
- Fix file conflict with libxfce4gui (#618719)

* Fri May 21 2010 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.2-1
- Update to 4.7.2

* Wed May 19 2010 Kevin Fenzi <kevin@tummy.com> - 4.7.1-3
- Rebuild for new glade version. 

* Tue Jan 12 2010 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.1-2
- Fix license tag
- Build gtk-doc

* Tue Jan 05 2010 Christoph Wickert <cwickert@fedoraproject.org> - 4.7.1-1
- Initial spec file, based on libxfcegui4.spec