]>
Commit | Line | Data |
---|---|---|
86fd4aa9 | 1 | # |
4977361f | 2 | # TODO: create lcms2.spec |
3 | # | |
86fd4aa9 JB |
4 | # Conditional build: |
5 | %bcond_without python # don't build python bindings | |
6 | # | |
914017f0 | 7 | Summary: Little CMS - a library to transform between colour profiles |
ba784bd7 | 8 | Summary(pl.UTF-8): Little CMS - biblioteka do konwersji między profilami kolorów |
914017f0 | 9 | Name: lcms |
4977361f | 10 | Version: 1.19 |
11 | Release: 1 | |
896f7926 | 12 | License: MIT |
914017f0 | 13 | Group: Libraries |
4977361f | 14 | Source0: http://downloads.sourceforge.net/lcms/%{name}-%{version}.tar.gz |
15 | # Source0-md5: 8af94611baf20d9646c7c2c285859818 | |
14847a72 | 16 | Patch0: %{name}-python.patch |
914017f0 | 17 | URL: http://www.littlecms.com/ |
429231dc | 18 | BuildRequires: autoconf >= 2.57 |
63b969c4 | 19 | BuildRequires: automake >= 1:1.7.2 |
38ffa639 | 20 | BuildRequires: libjpeg-devel |
429231dc | 21 | BuildRequires: libstdc++-devel |
38ffa639 | 22 | BuildRequires: libtiff-devel |
429231dc | 23 | BuildRequires: libtool >= 1:1.4.2-9 |
4af9957c | 24 | BuildRequires: sed >= 4.0 |
64ad2df3 | 25 | %if %{with python} |
14847a72 | 26 | BuildRequires: python-devel >= 2.2 |
4bb6fa74 | 27 | BuildRequires: python-modules |
28 | BuildRequires: rpm-pythonprov | |
14847a72 | 29 | BuildRequires: swig-python >= 1.3.30 |
64ad2df3 | 30 | %endif |
38ffa639 | 31 | BuildRequires: zlib-devel |
914017f0 JB |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | # There is no pretty description in source archive... use these. | |
35 | ||
36 | %description | |
37 | lcms does not allow to write profiles, and profile manipulation is not | |
38 | its goal. Instead, lcms focus on implement fast transforms between | |
39 | profiles. | |
40 | ||
b3bff7a9 JR |
41 | %description -l pl.UTF-8 |
42 | lcms nie pozwala na tworzenie profili i obróbka profili nie jest celem | |
43 | tej biblioteki. Natomiast lcms skupia się na implementacji szybkiej | |
44 | konwersji między profilami. | |
914017f0 JB |
45 | |
46 | %package devel | |
47 | Summary: Little CMS - header files and developer's documentation | |
ba784bd7 | 48 | Summary(pl.UTF-8): Little CMS - pliki nagłówkowe i dokumentacja |
914017f0 | 49 | Group: Development/Libraries |
d4a273c7 | 50 | Requires: %{name} = %{version}-%{release} |
914017f0 JB |
51 | |
52 | %description devel | |
53 | Header files needed to compile programs with liblcms and some | |
54 | documentation useful for programmers. | |
55 | ||
b3bff7a9 JR |
56 | %description devel -l pl.UTF-8 |
57 | Pliki nagłówkowe potrzebne do konsolidacji z liblcms oraz dokumentacja | |
58 | dla programistów. | |
914017f0 JB |
59 | |
60 | %package static | |
61 | Summary: Little CMS - static library | |
ba784bd7 | 62 | Summary(pl.UTF-8): Little CMS - biblioteka statyczna |
914017f0 | 63 | Group: Development/Libraries |
d4a273c7 | 64 | Requires: %{name}-devel = %{version}-%{release} |
914017f0 JB |
65 | |
66 | %description static | |
67 | Static version of liblcms. | |
68 | ||
b3bff7a9 | 69 | %description static -l pl.UTF-8 |
914017f0 JB |
70 | Statyczna biblioteka liblcms. |
71 | ||
38ffa639 JB |
72 | %package progs |
73 | Summary: Example and demonstration programs for Little CMS | |
ba784bd7 | 74 | Summary(pl.UTF-8): Programy przykładowe i demonstracyjne do Little CMS |
38ffa639 | 75 | Group: Applications/Graphics |
d4a273c7 | 76 | Requires: %{name} = %{version}-%{release} |
38ffa639 JB |
77 | |
78 | %description progs | |
79 | Example and demonstration programs for Little CMS. | |
80 | ||
b3bff7a9 JR |
81 | %description progs -l pl.UTF-8 |
82 | Programy przykładowe i demonstracyjne do Little CMS. | |
38ffa639 | 83 | |
429231dc JB |
84 | %package -n python-lcms |
85 | Summary: Little CMS module for Python | |
ba784bd7 | 86 | Summary(pl.UTF-8): Moduł Little CMS dla Pythona |
429231dc | 87 | Group: Libraries/Python |
d4a273c7 | 88 | Requires: %{name} = %{version}-%{release} |
429231dc JB |
89 | %pyrequires_eq python |
90 | ||
91 | %description -n python-lcms | |
92 | Little CMS module for Python. | |
93 | ||
b3bff7a9 JR |
94 | %description -n python-lcms -l pl.UTF-8 |
95 | Moduł Little CMS dla Pythona. | |
429231dc | 96 | |
914017f0 JB |
97 | %prep |
98 | %setup -q | |
4977361f | 99 | %undos configure.ac |
14847a72 | 100 | %patch0 -p1 |
914017f0 JB |
101 | |
102 | %build | |
14847a72 JB |
103 | # rebuild using newer swig (needed for g++ 4/python 2.5) |
104 | cd python | |
105 | rm -f lcms.py lcms_wrap.cxx | |
106 | swig -python -c++ -I../include lcms.i | |
107 | cd .. | |
5ec09a5a | 108 | %{__libtoolize} |
109 | %{__aclocal} | |
110 | %{__autoconf} | |
111 | %{__automake} | |
429231dc | 112 | %configure \ |
64ad2df3 | 113 | --with%{!?with_python:out}-python |
5ec09a5a | 114 | |
429231dc | 115 | %{__make} |
914017f0 JB |
116 | |
117 | %install | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
5ec09a5a | 120 | %{__make} install \ |
121 | DESTDIR=$RPM_BUILD_ROOT | |
914017f0 | 122 | |
38ffa639 JB |
123 | install samples/{icctrans,wtpt} tifficc/tifficc $RPM_BUILD_ROOT%{_bindir} |
124 | ||
429231dc JB |
125 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{a,la} |
126 | ||
914017f0 JB |
127 | %clean |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %post -p /sbin/ldconfig | |
131 | %postun -p /sbin/ldconfig | |
132 | ||
133 | %files | |
134 | %defattr(644,root,root,755) | |
896f7926 | 135 | %doc AUTHORS COPYING NEWS README.1ST |
14847a72 | 136 | %attr(755,root,root) %{_libdir}/liblcms.so.*.*.* |
f723569a | 137 | %attr(755,root,root) %ghost %{_libdir}/liblcms.so.1 |
914017f0 JB |
138 | |
139 | %files devel | |
140 | %defattr(644,root,root,755) | |
44e323b4 | 141 | %doc doc/* |
14847a72 JB |
142 | %attr(755,root,root) %{_libdir}/liblcms.so |
143 | %{_libdir}/liblcms.la | |
429231dc | 144 | %{_includedir}/*.h |
14847a72 | 145 | %{_pkgconfigdir}/lcms.pc |
914017f0 JB |
146 | |
147 | %files static | |
148 | %defattr(644,root,root,755) | |
14847a72 | 149 | %{_libdir}/liblcms.a |
38ffa639 JB |
150 | |
151 | %files progs | |
152 | %defattr(644,root,root,755) | |
153 | %attr(755,root,root) %{_bindir}/* | |
02971f77 | 154 | %{_mandir}/man1/*.1* |
429231dc | 155 | |
64ad2df3 | 156 | %if %{with python} |
429231dc JB |
157 | %files -n python-lcms |
158 | %defattr(644,root,root,755) | |
159 | %attr(755,root,root) %{py_sitedir}/_lcms.so | |
160 | %{py_sitedir}/lcms.py | |
64ad2df3 | 161 | %endif |