%define ver 2.4

Summary: The C++ interface for the libglade user interface library.
Summary(ja): libglade ライブラリの C++ インターフェイス
Name: libglademm2
Version: 2.6.7
Release: 3%{?_dist_release}
License: LGPL
Group: System Environment/Libraries
URL: http://gtkmm.sourceforge.net/

Source: http://ftp.gnome.org/pub/GNOME/sources/libglademm/2.6/libglademm-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gcc-c++
BuildRequires: libglade2-devel >= 2.6.1
BuildRequires: gtkmm2-devel >= 2.6.0
Requires: libglade2 >= 2.6.1
Requires: gtkmm2 >= 2.6.0

%description
The C++ interface for the libglade user interface library.

%package devel
Summary: Development libraries and headers for libglademm2.
Summary(ja): libglademm2 の開発用ライブラリおよびヘッダファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libglade2-devel >= 2.6.1
Requires: gtkmm2-devel >= 2.6.0

%description devel
Development files for libglademm2, the C++ interface for the libglade user
interface library.

%prep
%setup -q -n libglademm-%{version}

%build
%configure --disable-static --docdir=%{_datadir}/gtk-doc/
make %{?_smp_mflags}

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Fix documentation installation, put everything under gtk-doc
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/libglademm-%{ver}
mv ${RPM_BUILD_ROOT}%{_docdir}/gnomemm-2.6/libglademm-%{ver}/* $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/libglademm-%{ver}/

# devhelp path fix
sed -i 's/..\/..\/..\/doc\/gnomemm-2.6/..\/..\/..\/gtk-doc\/html/g' $RPM_BUILD_ROOT%{_datadir}/devhelp/books/libglademm-%{ver}/libglademm-%{ver}.devhelp
sed -i 's/html\/..\/..\/index\.html/html\/index\.html/g' $RPM_BUILD_ROOT%{_datadir}/devhelp/books/libglademm-%{ver}/libglademm-%{ver}.devhelp

find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_libdir}/*.so.*

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/libglademm-2.4
%{_libdir}/pkgconfig/*.pc
%{_datadir}/devhelp/books/libglademm-2.4
%{_datadir}/gtk-doc/html/*

%changelog
* Tue Nov  4 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 2.6.7-3
- rebuilt on current VineSeed

* Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> - 2.6.7-2
- build with rpm-4.8.1-1 for pkg-config file

* Wed Jun 24 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.7-1
- new upstream release
- spec in UTF-8
- added --disable-static for removing *.a files from devel package

* Sat Apr 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.6-1vl5
- new upstream release
- devel documents are installed into gtk-doc dir
- removed *.la files from devel package

* Sun Jan 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.5-0vl1
- new upstream release

* Fri May 11 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.3-0vl2
- rebuilt with new toolchains

* Mon Apr 30 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.3-0vl1
- new upstream release

* Mon May 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.2-0vl1
- new upstream release

* Fri Sep 23 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.1-0vl1
- new upstream release
- rebuild with gtkmm-2.8.0

* Wed Nov 17 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.4.1-0vl1
- new upstream release
- build with gtkmm-2.4.7
- fixed devhelp path

* Fri Jan 30 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.0.1-2vl1
- rebuild for Vine Linux

* Thu Nov 13 2003 Matthias Saou <http://freshrpms.net/> - 2.0.1-2.fr
- Rebuild for Fedora Core 1.

* Thu May  8 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Initial RPM release.

