- %files: less globs, use %license
- tighten subpkg deps
- -devel: use %doc
- use %version in Source URL
- simplify %setup
- %check: make check
This commit is contained in:
Rex Dieter 2016-03-09 10:24:58 -06:00
parent 4f52c5c7be
commit 4bb897c96d
2 changed files with 63 additions and 18 deletions

24
lcms2-2.7-check.patch Normal file
View File

@ -0,0 +1,24 @@
diff -up lcms2-2.7/testbed/Makefile.am.check lcms2-2.7/testbed/Makefile.am
--- lcms2-2.7/testbed/Makefile.am.check 2015-03-17 06:19:51.000000000 -0500
+++ lcms2-2.7/testbed/Makefile.am 2016-03-09 10:17:26.031452857 -0600
@@ -23,7 +23,7 @@ check:
if [ $(top_srcdir) != $(top_builddir) ]; then \
cp $(top_srcdir)/testbed/*.ic? $(top_builddir)/testbed; \
fi
- ./testcms
+ LD_LIBRARY_PATH=$(top_builddir)/src/.libs ./testcms
if [ $(top_srcdir) != $(top_builddir) ]; then \
rm -f $(top_builddir)/testbed/*.ic?; \
fi
diff -up lcms2-2.7/testbed/Makefile.in.check lcms2-2.7/testbed/Makefile.in
--- lcms2-2.7/testbed/Makefile.in.check 2015-03-17 06:19:51.000000000 -0500
+++ lcms2-2.7/testbed/Makefile.in 2016-03-09 10:18:11.521807110 -0600
@@ -541,7 +541,7 @@ check:
if [ $(top_srcdir) != $(top_builddir) ]; then \
cp $(top_srcdir)/testbed/*.ic? $(top_builddir)/testbed; \
fi
- ./testcms
+ LD_LIBRARY_PATH=$(top_builddir)/src/.libs ./testcms
if [ $(top_srcdir) != $(top_builddir) ]; then \
rm -f $(top_builddir)/testbed/*.ic?; \
fi

View File

@ -1,13 +1,17 @@
Name: lcms2
Version: 2.7
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Color Management Engine
Group: System Environment/Libraries
License: MIT
URL: http://www.littlecms.com/
Source0: http://www.littlecms.com/lcms2-2.7.tar.gz
Source0: http://www.littlecms.com/lcms2-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# fix 'make check', see
# https://github.com/mm2/Little-CMS/pull/63
Patch1: lcms2-2.7-check.patch
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: zlib-devel
@ -20,7 +24,7 @@ parallel installed with the original (deprecated) lcms.
%package utils
Summary: Utility applications for %{name}
Group: Applications/Productivity
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description utils
The %{name}-utils package contains utility applications for %{name}.
@ -28,14 +32,18 @@ The %{name}-utils package contains utility applications for %{name}.
%package devel
Summary: Development files for LittleCMS
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: littlecms-devel = %{version}-%{release}
%description devel
Development files for LittleCMS.
%prep
%setup -q -n lcms2-2.7
%setup -q
%patch1 -p1 -b .check
%build
%configure --disable-static --program-suffix=2
@ -48,14 +56,17 @@ make %{?_smp_mflags}
%install
rm -rf ${RPM_BUILD_ROOT}
make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p"
find ${RPM_BUILD_ROOT} -type f -name "*.la" -exec rm -f {} ';'
install -D -m 644 include/lcms2.h $RPM_BUILD_ROOT/usr/include/lcms2.h
install -D -m 644 include/lcms2_plugin.h $RPM_BUILD_ROOT/usr/include/lcms2_plugin.h
# install docs as this is all we've got
install -D -m 644 doc/LittleCMS2.?\ tutorial.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.6/tutorial.pdf
install -D -m 644 doc/LittleCMS2.?\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.6/api.pdf
install -D -m 644 doc/LittleCMS2.?\ Plugin\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.6/plugin-api.pdf
rm -fv ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
# rename docs (for use with %%doc below)
cp -alf doc/LittleCMS2.?\ API.pdf api.pdf
cp -alf doc/LittleCMS2.?\ Plugin\ API.pdf plugin-api.pdf
cp -alf doc/LittleCMS2.?\ tutorial.pdf tutorial.pdf
%check
make check
%clean
rm -rf ${RPM_BUILD_ROOT}
@ -66,8 +77,10 @@ rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%{_libdir}/*.so.*
%doc AUTHORS
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/liblcms2.so.2*
%files utils
%defattr(-,root,root,-)
@ -76,12 +89,20 @@ rm -rf ${RPM_BUILD_ROOT}
%files devel
%defattr(-,root,root,-)
%{_datadir}/doc/lcms2-devel-2.6/*.pdf
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%doc api.pdf plugin-api.pdf tutorial.pdf
%{_includedir}/lcms2*.h
%{_libdir}/liblcms2.so
%{_libdir}/pkgconfig/lcms2.pc
%changelog
* Wed Mar 09 2016 Rex Dieter <rdieter@fedoraproject.org> - 2.7-4
- %%files: less globs, use %%license
- tighten subpkg deps
- -devel: use %%doc
- use %%version in Source URL
- simplify %%setup
- %%check: make check
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild