ffd266
# skip tests known to be problematic in a specific version
ffd266
%global skip_checks_version 0.1.50
ffd266
%ifarch ppc64 ppc64le
ffd266
%global skip_checks chromaticities srgb_to_lab_u8 models float-to-8bit
ffd266
%else
ffd266
%global skip_checks %nil
ffd266
%endif
ffd266
ffd266
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 20 || 0%{?rhel} > 7
ffd266
%global develdocdir %{_docdir}/%{name}-devel/html
ffd266
%else
ffd266
%global develdocdir %{_docdir}/%{name}-devel-%{version}/html
ffd266
%endif
ffd266
ffd266
Summary:	A dynamic, any to any, pixel format conversion library
ffd266
Name:		babl
ffd266
Version:	0.1.52
ffd266
Release:	1%{?dist}
ffd266
ffd266
# Compute some version related macros
ffd266
# Ugly hack, you need to get your quoting backslashes/percent signs straight
ffd266
%global major %(ver=%version; echo ${ver%%%%.*})
ffd266
%global minor %(ver=%version; ver=${ver#%major.}; echo ${ver%%%%.*})
ffd266
%global micro %(ver=%version; ver=${ver#%major.%minor.}; echo ${ver%%%%.*})
ffd266
%global apiver %major.%minor
ffd266
ffd266
# The gggl codes contained in this package are under the GPL, with exceptions allowing their use under libraries covered under the LGPL
ffd266
License:	LGPLv3+ and GPLv3+
ffd266
URL:		http://www.gegl.org/babl/
ffd266
Source0:	https://download.gimp.org/pub/babl/%{apiver}/%{name}-%{version}.tar.bz2
ffd266
ffd266
BuildRequires:	librsvg2
ffd266
BuildRequires:  automake, autoconf
ffd266
BuildRequires:  gcc
ffd266
ffd266
%description
ffd266
Babl is a dynamic, any to any, pixel format conversion library. It
ffd266
provides conversions between the myriad of buffer types images can be
ffd266
stored in. Babl doesn't only help with existing pixel formats, but also
ffd266
facilitates creation of new and uncommon ones.
ffd266
ffd266
%package devel
ffd266
Summary:	Headers for developing programs that will use %{name}
ffd266
Requires:	%{name}%{?_isa} = %{version}-%{release}
ffd266
Requires:	pkgconfig
ffd266
%if ! (0%{?fedora} >= 22 || 0%{?rhel} > 7)
ffd266
# Split off devel docs from 0.1.2-2 on
ffd266
Obsoletes:	%{name}-devel < 0.1.2-2%{?dist}
ffd266
Conflicts:	%{name}-devel < 0.1.2-2%{?dist}
ffd266
%endif
ffd266
ffd266
%description devel
ffd266
This package contains the libraries and header files needed for
ffd266
developing with %{name}.
ffd266
ffd266
%package devel-docs
ffd266
Summary:	Documentation for developing programs that will use %{name}
ffd266
BuildArch:	noarch
ffd266
Requires:	%{name}-devel = %{version}-%{release}
ffd266
# Split off devel docs from 0.1.2-2 on
ffd266
Obsoletes:	%{name}-devel < 0.1.2-2%{?dist}
ffd266
Conflicts:	%{name}-devel < 0.1.2-2%{?dist}
ffd266
ffd266
%description devel-docs
ffd266
This package contains documentation needed for developing with %{name}.
ffd266
ffd266
%prep
ffd266
%autosetup -p1
ffd266
ffd266
%build
ffd266
# use PIC/PIE because babl is likely to deal with data coming from untrusted
ffd266
# sources
ffd266
CFLAGS="-fPIC %optflags -fno-strict-aliasing"
ffd266
LDFLAGS="-pie"
ffd266
%configure --disable-static
ffd266
ffd266
make V=1 %{?_smp_mflags}
ffd266
ffd266
%install
ffd266
make DESTDIR=%{buildroot} install INSTALL='install -p'
ffd266
ffd266
mkdir -p "%{buildroot}/%{develdocdir}"
ffd266
cp -pr docs/graphics docs/*.html docs/babl.css "%{buildroot}/%{develdocdir}"
ffd266
rm -rf "%{buildroot}/%{develdocdir}"/graphics/Makefile*
ffd266
ffd266
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
ffd266
ffd266
%check
ffd266
# skip tests known to be problematic in a specific version
ffd266
%if "%version" == "%skip_checks_version"
ffd266
pushd tests
ffd266
for problematic in %skip_checks; do
ffd266
    rm -f "$problematic"
ffd266
    cat << EOF > "$problematic"
ffd266
#!/bin/sh
ffd266
echo Skipping test "$problematic"
ffd266
EOF
ffd266
    chmod +x "$problematic"
ffd266
done
ffd266
popd
ffd266
%endif
ffd266
make check
ffd266
ffd266
%ldconfig_scriptlets
ffd266
ffd266
%files
ffd266
%doc AUTHORS COPYING README NEWS
ffd266
%{_libdir}/*.so.*
ffd266
%{_libdir}/babl-%{apiver}/
ffd266
ffd266
%files devel
ffd266
%{_includedir}/babl-%{apiver}/
ffd266
%{_libdir}/*.so
ffd266
%{_libdir}/pkgconfig/%{name}.pc
ffd266
ffd266
%files devel-docs
ffd266
%doc %{develdocdir}
ffd266
ffd266
%changelog
ffd266
* Thu Jul 05 2018 Nils Philippsen <nils@tiptoe.de> - 0.1.51-1
ffd266
- version 0.1.52
ffd266
ffd266
* Mon May 21 2018 Nils Philippsen <nils@tiptoe.de> - 0.1.50-3
ffd266
- et tu, ppc64?
ffd266
ffd266
* Mon May 21 2018 Nils Philippsen <nils@tiptoe.de> - 0.1.50-2
ffd266
- skip more problematic tests on ppc64le
ffd266
ffd266
* Mon May 21 2018 Josef Ridky <jridky@redhat.com> - 0.1.50-1
ffd266
- New upstream release 0.1.50
ffd266
ffd266
* Thu May 17 2018 Debarshi Ray <rishi@fedoraproject.org> - 0.1.48-1
ffd266
- version 0.1.48
ffd266
ffd266
* Wed Apr 25 2018 Josef Ridky <jridky@redhat.com> - 0.1.46-1
ffd266
- New upstream release 0.1.46
ffd266
ffd266
* Tue Mar 27 2018 Nils Philippsen <nils@tiptoe.de> - 0.1.44-1
ffd266
- version 0.1.44
ffd266
ffd266
* Tue Feb 20 2018 Josef Ridky <jridky@redhat.com> - 0.1.42-4
ffd266
- add gcc requirement
ffd266
ffd266
* Wed Feb 14 2018 Josef Ridky <jridky@redhat.com> - 0.1.42-3
ffd266
- cleanup spec file (remove Group tag, apply new scriptlets)
ffd266
ffd266
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.42-2
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ffd266
ffd266
* Wed Jan 24 2018 Debarshi Ray <rishi@fedoraproject.org> - 0.1.42-1
ffd266
- version 0.1.42
ffd266
ffd266
* Wed Jan 17 2018 Debarshi Ray <rishi@fedoraproject.org> - 0.1.40-1
ffd266
- version 0.1.40
ffd266
ffd266
* Thu Nov 16 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.38-1
ffd266
- version 0.1.38
ffd266
ffd266
* Sat Nov 11 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.36-1
ffd266
- version 0.1.36
ffd266
ffd266
* Tue Oct 17 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.34-1
ffd266
- version 0.1.34
ffd266
ffd266
* Tue Oct 03 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.32-1
ffd266
- version 0.1.32
ffd266
ffd266
* Fri Aug 25 2017 Nils Philippsen <nils@tiptoe.de> - 0.1.30-1
ffd266
- version 0.1.30
ffd266
ffd266
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.28-3
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ffd266
ffd266
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.28-2
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ffd266
ffd266
* Wed Jun 21 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.28-1
ffd266
- version 0.1.28
ffd266
ffd266
* Mon May 15 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.26-1
ffd266
- version 0.1.26
ffd266
ffd266
* Tue Feb 07 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.24-1
ffd266
- version 0.1.24
ffd266
ffd266
* Thu Jan 26 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.22-1
ffd266
- version 0.1.22
ffd266
ffd266
* Thu Jan 12 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.1.20-1
ffd266
- version 0.1.20
ffd266
ffd266
* Fri Jun 17 2016 Debarshi Ray <rishi@fedoraproject.org> - 0.1.18-1
ffd266
- version 0.1.18
ffd266
ffd266
* Sun Feb 14 2016 Debarshi Ray <rishi@fedoraproject.org> - 0.1.16-1
ffd266
- version 0.1.16
ffd266
ffd266
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.14-2
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ffd266
ffd266
* Mon Nov 23 2015 Nils Philippsen <nils@redhat.com> - 0.1.14-1
ffd266
- version 0.1.14
ffd266
ffd266
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.12-3
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ffd266
ffd266
* Fri Feb 13 2015 Nils Philippsen <nils@redhat.com> - 0.1.12-2
ffd266
- fix failing (crashing) concurrency stress test
ffd266
ffd266
* Thu Feb 05 2015 Debarshi Ray <rishi@fedoraproject.org> - 0.1.12-1
ffd266
- version 0.1.12
ffd266
ffd266
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-12
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ffd266
ffd266
* Tue Aug 05 2014 Nils Philippsen <nils@redhat.com> - 0.1.10-11
ffd266
- update source URL
ffd266
ffd266
* Tue Jul 29 2014 Nils Philippsen <nils@redhat.com> - 0.1.10-10
ffd266
- drop obsoletes in future Fedora and EL versions (#1002080)
ffd266
ffd266
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-9
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ffd266
ffd266
* Wed Aug 07 2013 Nils Philippsen <nils@redhat.com> - 0.1.10-8
ffd266
- use unversioned docdir from Fedora 20 on (#993679)
ffd266
ffd266
* Tue Jul 30 2013 Nils Philippsen <nils@redhat.com> - 0.1.10-7
ffd266
- don't require w3m for building
ffd266
ffd266
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-6
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ffd266
ffd266
* Sat Oct 20 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-5
ffd266
- report problematic checks being skipped
ffd266
ffd266
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-4
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ffd266
ffd266
* Tue Apr 03 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-3
ffd266
- prevent problematic check from being rebuilt
ffd266
ffd266
* Tue Apr 03 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-2
ffd266
- fix typo which caused problematic check not to be skipped
ffd266
ffd266
* Tue Apr 03 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-1
ffd266
- version 0.1.10
ffd266
- skip check known to be problematic: concurrency-stress-test
ffd266
ffd266
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 0.1.6-2
ffd266
- rebuild for gcc 4.7
ffd266
ffd266
* Tue Dec 13 2011 Nils Philippsen <nils@redhat.com> - 0.1.6-1
ffd266
- version 0.1.6
ffd266
ffd266
* Tue Feb 22 2011 Nils Philippsen <nils@redhat.com> - 0.1.4-1
ffd266
- version 0.1.4
ffd266
- correct source URL
ffd266
ffd266
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-5
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ffd266
ffd266
* Wed Jun 23 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-4
ffd266
- use PIC/PIE because babl is likely to deal with data coming from untrusted
ffd266
  sources
ffd266
ffd266
* Wed Jun 23 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-3
ffd266
- build with -fno-strict-aliasing
ffd266
ffd266
* Mon Jun 14 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-2
ffd266
- split off devel-docs subpackage to make package multi-lib compliant (#477807)
ffd266
- let devel package require correct arch of base package
ffd266
ffd266
* Thu Jan 21 2010 Deji Akingunola <dakingun@gmail.com> - 0.1.2-1
ffd266
- Update to 0.1.2
ffd266
ffd266
* Fri Dec 18 2009 Deji Akingunola <dakingun@gmail.com> - 0.1.0-5
ffd266
- Remove the *.la files
ffd266
ffd266
* Thu Aug 13 2009 Nils Philippsen <nils@redhat.com>
ffd266
- explain patch status
ffd266
ffd266
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-4
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ffd266
ffd266
* Mon Jul 06 2009 Nils Philippsen <nils@redhat.com> - 0.1.0-3
ffd266
- revert using "--disable-gtk-doc" as this doesn't work with babl (#477807)
ffd266
ffd266
* Thu Jul 02 2009 Nils Philippsen <nils@redhat.com>
ffd266
- use "--disable-gtk-doc" to avoid rebuilding documentation (#477807)
ffd266
- fix source URL
ffd266
ffd266
* Thu Jun 25 2009 Nils Philippsen <nils@redhat.com> - 0.1.0-2
ffd266
- fix timestamps of built documentation for multilib (#477807)
ffd266
ffd266
* Fri May 22 2009 Deji Akingunola <dakingun@gmail.com> - 0.1.0-1
ffd266
- Update to latest release (0.1.0)
ffd266
ffd266
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.22-3
ffd266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ffd266
ffd266
* Tue Sep  2 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 0.0.22-2
ffd266
- Include /usr/include/babl-0.0 directory
ffd266
ffd266
* Thu Jul 10 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.22-1
ffd266
- Update to latest release
ffd266
ffd266
* Thu Feb 28 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.20-1
ffd266
- New release
ffd266
ffd266
* Thu Jan 17 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.18-2
ffd266
- Apply patch to fix extensions loading on 64bit systems
ffd266
ffd266
* Thu Jan 10 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.18-1
ffd266
- Update to 0.0.18
ffd266
ffd266
* Mon Nov 26 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.16-1
ffd266
- Update to 0.0.16 release 
ffd266
- License change from GPLv2+ to GPLv3+
ffd266
ffd266
* Mon Oct 22 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.5.20071011svn
ffd266
- Update the License field 
ffd266
ffd266
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.4.20071011svn
ffd266
- Package the extension libraries in the main package
ffd266
- Run 'make check' 
ffd266
ffd266
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.3.20071011svn
ffd266
- Ensure timestamps are kept during install
ffd266
ffd266
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.2.20071011svn
ffd266
- Remove the use of inexistent source url (Package reviews)
ffd266
- Package the html docs
ffd266
ffd266
* Thu Oct 11 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.1.20071011svn
ffd266
- Initial packaging for Fedora