diff --git a/.gitignore b/.gitignore index e69de29..a6acca6 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/c++-gtk-utils-2.0.15.tar.gz diff --git a/c++-gtk-utils.spec b/c++-gtk-utils.spec new file mode 100644 index 0000000..a00a74e --- /dev/null +++ b/c++-gtk-utils.spec @@ -0,0 +1,176 @@ +Name: c++-gtk-utils +Version: 2.0.15 +Release: 1%{?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 + +# 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: %{summary} - 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: %{summary} - 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 +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 +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} +./bootstrap-gtk2.sh +%configure --disable-static +sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool +make %{?_smp_mflags} V=1 +popd + +pushd %{name}-gtk3-%{version} +./bootstrap-gtk3.sh +%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 Feb 14 2013 Frederik Holden - 2.0.15-1 +- Updated to newest upstream release. + +* Tue Feb 12 2013 Frederik Holden - 2.0.14-3 +- Built for both GTK2 and GTK3, with separate versions for each one. + +* Tue Feb 12 2013 Frederik Holden - 2.0.14-2 +- Made the build more verbose. + +* Fri Feb 08 2013 Frederik Holden - 2.0.14-1 +- Initial version of the package. diff --git a/sources b/sources index e69de29..629cf5d 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b9de1eb63916d167effa76b6e7b180f3 c++-gtk-utils-2.0.15.tar.gz