Name: c++-gtk-utils
Version: 2.0.16
Release: 2%{?dist}
Summary: A library for GTK+ programming with C++
Group: System Environment/Libraries
License: LGPLv2
URL: http://cxx-gtk-utils.sourceforge.net/
Source0: http://downloads.sourceforge.net/cxx-gtk-utils/%{name}-%{version}.tar.gz
BuildRequires: glib2-devel
# bz 925145
BuildRequires: autoconf, libtool
# X11 tests:
BuildRequires: xorg-x11-server-Xvfb
%description
c++-gtk-utils is a lightweight library containing a number of classes and
functions for programming GTK+ programs using C++ in POSIX (Unix-like)
environments, where the user does not want to use a full-on wrapper such as
gtkmm or wxWidgets, or is concerned about exception safety or thread safety of
the wrapper and their documentation.
%package gtk2
Summary: A library for GTK+ programming with C++ - GTK2 version
BuildRequires: gtk2-devel
%description gtk2
c++-gtk-utils is a lightweight library containing a number of classes and
functions for programming GTK+ programs using C++ in POSIX (Unix-like)
environments, where the user does not want to use a full-on wrapper such as
gtkmm or wxWidgets, or is concerned about exception safety or thread safety of
the wrapper and their documentation.
This version is built against GTK2.
%package gtk3
Summary: A library for GTK+ programming with C++ - GTK3 version
BuildRequires: gtk3-devel
%description gtk3
c++-gtk-utils is a lightweight library containing a number of classes and
functions for programming GTK+ programs using C++ in POSIX (Unix-like)
environments, where the user does not want to use a full-on wrapper such as
gtkmm or wxWidgets, or is concerned about exception safety or thread safety of
the wrapper and their documentation.
This version is built against GTK3.
%package gtk2-devel
Summary: Development files for the c++-gtk-utils library - GTK2 version
Group: Development/Libraries
Requires: %{name}-gtk2%{?_isa} = %{version}-%{release}
%description gtk2-devel
This package contains libraries and header files needed for development of
applications or toolkits which use c++-gtk-utils.
This version is built against GTK2.
%package gtk3-devel
Summary: Development files for the c++-gtk-utils library - GTK3 version
Group: Development/Libraries
Requires: %{name}-gtk3%{?_isa} = %{version}-%{release}
%description gtk3-devel
This package contains libraries and header files needed for development of
applications or toolkits which use c++-gtk-utils.
This version is built against GTK3.
%package devel-doc
Summary: Development documentation for the c++-gtk-utils library
Group: Documentation
BuildArch: noarch
%description devel-doc
This package contains documentation files for development of applications or
toolkits which use c++-gtk-utils.
%prep
%setup -q -n %{name}-%{version} -c
mv %{name}-{,gtk2-}%{version}
cp -a %{name}-gtk{2,3}-%{version}
%build
pushd %{name}-gtk2-%{version}
# autoreconf to update config.guess and config.sub for aarch64 (bz 925145)
autoreconf --force --install
%global _configure ./configure-gtk2
%configure --disable-static
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
make %{?_smp_mflags} V=1
popd
pushd %{name}-gtk3-%{version}
# autoreconf to update config.guess and config.sub for aarch64 (bz 925145)
autoreconf --force --install
%global _configure ./configure-gtk3
%configure --disable-static
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
make %{?_smp_mflags} V=1
popd
%install
pushd %{name}-gtk2-%{version}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.la
popd
pushd %{name}-gtk3-%{version}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.la
popd
%check
# "make test" requires a Unicode LANG.
LANG=en_US.UTF-8
# make test requires an X session, so use Xvfb to provide one.
# Unconditionally non-fatal because of SELinux bug: https://bugzilla.redhat.com/843603
pushd %{name}-gtk2-%{version}
xvfb-run -a make test ||:
popd
pushd %{name}-gtk3-%{version}
xvfb-run -a make test ||:
popd
%post gtk2 -p /sbin/ldconfig
%post gtk3 -p /sbin/ldconfig
%postun gtk2 -p /sbin/ldconfig
%postun gtk3 -p /sbin/ldconfig
%files gtk2
%{_libdir}/libcxx-gtk-utils-2-2.0.so.0*
%dir %{_defaultdocdir}/%{name}
%dir %{_defaultdocdir}/%{name}/2.0
%{_defaultdocdir}/%{name}/2.0/BUGS
%{_defaultdocdir}/%{name}/2.0/COPYING
%{_defaultdocdir}/%{name}/2.0/NEWS
%{_defaultdocdir}/%{name}/2.0/README
%files gtk3
%{_libdir}/libcxx-gtk-utils-3-2.0.so.0*
%dir %{_defaultdocdir}/%{name}
%dir %{_defaultdocdir}/%{name}/2.0
%{_defaultdocdir}/%{name}/2.0/BUGS
%{_defaultdocdir}/%{name}/2.0/COPYING
%{_defaultdocdir}/%{name}/2.0/NEWS
%{_defaultdocdir}/%{name}/2.0/README
%files gtk2-devel
%{_libdir}/pkgconfig/%{name}-2-2.0.pc
%{_libdir}/libcxx-gtk-utils-2-2.0.so
%{_includedir}/%{name}-2-2.0
%files gtk3-devel
%{_libdir}/pkgconfig/%{name}-3-2.0.pc
%{_libdir}/libcxx-gtk-utils-3-2.0.so
%{_includedir}/%{name}-3-2.0
%files devel-doc
%dir %{_defaultdocdir}/%{name}
%dir %{_defaultdocdir}/%{name}/2.0
%{_defaultdocdir}/%{name}/2.0/COPYING
%{_defaultdocdir}/%{name}/2.0/PORTING-TO-2.0
%{_defaultdocdir}/%{name}/2.0/html
%changelog
* Thu Mar 28 2013 Frederik Holden <frederik+fedora@frh.no> - 2.0.16-2
- Temporary fix for bz 925145 (aarch64 support) until new upstream release.
- Changed the build step so it doesn't unnecessarily ./configure twice.
* Wed Mar 13 2013 Frederik Holden <frederik+fedora@frh.no> - 2.0.16-1
- Updated to newest upstream release.
* Thu Feb 28 2013 Frederik Holden <frederik+fedora@frh.no> - 2.0.15-2
- Fixed an error in the package summary.
* Thu Feb 14 2013 Frederik Holden <frederik+fedora@frh.no> - 2.0.15-1
- Updated to newest upstream release.
* Tue Feb 12 2013 Frederik Holden <frederik+fedora@frh.no> - 2.0.14-3
- Built for both GTK2 and GTK3, with separate versions for each one.
* Tue Feb 12 2013 Frederik Holden <frederik+fedora@frh.no> - 2.0.14-2
- Made the build more verbose.
* Fri Feb 08 2013 Frederik Holden <frederik+fedora@frh.no> - 2.0.14-1
- Initial version of the package.