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