Name:           xfconf
Summary:        Hierarchical configuration system for Xfce
Version:        4.10.0
Release:        2%{?_dist_release}

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

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

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  chrpath
BuildRequires:  dbus-devel >= 1.0.0
BuildRequires:  dbus-glib-devel >= 0.72
BuildRequires:  gettext
BuildRequires:  glib2-devel >= 2.18.0
BuildRequires:  intltool
BuildRequires:  libxfce4util-devel >= 4.10.0
BuildRequires:  perl-ExtUtils-Depends >= 0.300
BuildRequires:  perl-ExtUtils-PkgConfig >= 1.000
BuildRequires:  perl-Glib >= 1.020
BuildRequires:  pkgconfig

Obsoletes: libxfce4mcs < 4.4.3-3

Vendor: Project Vine
Distribution: Vine Linux

%description
Xfconf is a hierarchical (tree-like) configuration system where the
immediate child nodes of the root are called "channels".  All settings
beneath the channel nodes are called "properties."

%package devel
Summary: Development tools for xfconf
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: glib2-devel >= 2.12.0
Requires: dbus-devel >= 1.0.0
Requires: dbus-glib-devel >= 0.72
Obsoletes: libxfce4mcs-devel < 4.4.3-3
Obsoletes: xfce-mcs-manager-devel < 4.4.3-3

%description devel
This package includes the libraries and header files you will need
to compile applications for xfconf.

%package perl
Summary: Perl modules for xfconf
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description perl
This package includes the perl modules and files you will need to 
interact with xfconf using perl. 

%prep
%setup -q

%build
%configure --disable-static --with-perl-options=INSTALLDIRS="vendor"
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

make %{?_smp_mflags}

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

chrpath --delete $RPM_BUILD_ROOT%{_libdir}/xfce4/xfconf/xfconfd

# remove unneeded la files. 
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
# remove perl temp file
rm -f $RPM_BUILD_ROOT/%{perl_archlib}/perllocal.pod
# remove unneeded dynloader bootstrap file
rm -f $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Xfce4/Xfconf/Xfconf.bs
# remove .packlist files. 
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
# fix permissions on the .so file
chmod 755 $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Xfce4/Xfconf/Xfconf.so

%find_lang %{name}

# we need to own
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/xfce4/
mkdir -p ${RPM_BUILD_ROOT}%{_libexecdir}/xfce4/

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog NEWS TODO COPYING
%{_libdir}/lib*.so.*
%{_libdir}/xfce4/xfconf/xfconfd
%{_bindir}/xfconf-query
%{_datadir}/dbus-1/services/org.xfce.Xfconf.service
%ghost %dir %{_libdir}/xfce4/
%ghost %dir %{_libexecdir}/xfce4/

%files devel
%defattr(-,root,root,-)
%doc %{_datadir}/gtk-doc/html/xfconf
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/xfce4/xfconf-0

%files perl
%defattr(-,root,root,-)
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Xfce4
%{_mandir}/man3/*.3*

%changelog
* 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

* Mon Mar 28 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.8.0-1
- new upstream release

* Wed Sep 22 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.2-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sun May 23 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.6.2-1
- new upstream release
- built with new toolchain

* Fri May 22 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.6.1-2
- initial build for Vine

* Sun Apr 19 2009 Kevin Fenzi <kevin@tummy.com> - 4.6.1-1
- Update to 4.6.1

* Mon Mar 02 2009 Christoph Wickert <cwickert@fedoraproject.org> - 4.6.0-2
- Fix directory ownership problems
- Move gtk-doc into devel package and mark it %%doc
- Make devel package require gtk-doc

* Thu Feb 26 2009 Kevin Fenzi <kevin@tummy.com> - 4.6.0-1
- Update to 4.6.0

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.99.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Jan 26 2009 Kevin Fenzi <kevin@tummy.com> - 4.5.99.1-1
- Update to 4.5.99.1

* Thu Jan 22 2009 Christoph Wickert <cwickert@fedoraproject.org> - 4.5.93-3
- Let xfce4-settings Obsolete mcs manager and plugin packages

* Thu Jan 22 2009 Christoph Wickert <cwickert@fedoraproject.org> - 4.5.93-2
- Add Obsoletes for mcs devel package

* Tue Jan 13 2009 Kevin Fenzi <kevin@tummy.com> - 4.5.93-1
- Update to 4.5.93

* Fri Jan 02 2009 Kevin Fenzi <kevin@tummy.com> - 4.5.92-4
- Add Obsoletes for mcs packages

* Mon Dec 22 2008 Kevin Fenzi <kevin@tummy.com> - 4.5.92-3
- Fixes for review ( bug 477732 )

* Mon Dec 22 2008 Kevin Fenzi <kevin@tummy.com> - 4.5.92-2
- Add gettext BuildRequires

* Sun Dec 21 2008 Kevin Fenzi <kevin@tummy.com> - 4.5.92-1
- Initial version for Fedora