]>
Commit | Line | Data |
---|---|---|
e08dcf37 | 1 | # |
2c344bb5 JB |
2 | # Conditional build: |
3 | %bcond_with tests # perform "make test" | |
e08dcf37 AM |
4 | # |
5 | Summary: Graphics Transformation Languages | |
2c344bb5 | 6 | Summary(pl.UTF-8): Graphics Transformation Languages - języki przekształceń graficznych |
e08dcf37 AM |
7 | Name: OpenGTL |
8 | Version: 0.9.18 | |
bdc6b261 | 9 | Release: 2 |
2c344bb5 | 10 | License: LGPL v2+ |
e08dcf37 | 11 | Group: Libraries |
e08dcf37 AM |
12 | Source0: http://download.opengtl.org/%{name}-%{version}.tar.bz2 |
13 | # Source0-md5: 8a9673c648ef5af4fcc7f60bb8282811 | |
14 | %{?with_tests:Source1: http://download.opengtl.org/tests-data-%{version}.tar.bz2} | |
2c344bb5 JB |
15 | Patch0: %{name}-llvm-3.3.patch |
16 | Patch1: %{name}-includes.patch | |
17 | Patch2: %{name}-link.patch | |
18 | URL: http://opengtl.org/ | |
e08dcf37 | 19 | BuildRequires: ImageMagick |
2c344bb5 | 20 | BuildRequires: cmake >= 2.6 |
e08dcf37 AM |
21 | BuildRequires: doxygen |
22 | BuildRequires: ghostscript | |
23 | BuildRequires: graphviz | |
24 | BuildRequires: libpng-devel | |
2c344bb5 | 25 | BuildRequires: llvm-devel >= 3.3 |
e08dcf37 AM |
26 | BuildRequires: texlive-dvips |
27 | BuildRequires: texlive-latex | |
7824c5d8 | 28 | BuildRequires: texlive-makeindex |
e08dcf37 AM |
29 | BuildRequires: zlib-devel |
30 | Requires: %{name}-libs = %{version}-%{release} | |
2c344bb5 | 31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
e08dcf37 AM |
32 | |
33 | %description | |
34 | OpenGTL provides tools, languages and libraries to create generic | |
35 | transformations for graphics. These transformations can be used by | |
36 | different programs, e.g. Krita, Gimp, CinePaint, etc. | |
37 | ||
2c344bb5 JB |
38 | %description -l pl.UTF-8 |
39 | OpenGTL udostępnia narzędzia, języki i biblioteka do tworzenia | |
40 | ogólnych przekształceń grafiki. Przekształcenia te mogą być później | |
41 | wykorzystywane przez różne programy, takie jak Krita, Gimp czy | |
42 | CinePaint. | |
43 | ||
e08dcf37 | 44 | %package libs |
2c344bb5 JB |
45 | Summary: Runtime OpenGTL libraries |
46 | Summary(pl.UTF-8): Biblioteki współdzielone OpenGTL | |
47 | Group: Libraries | |
e08dcf37 AM |
48 | |
49 | %description libs | |
2c344bb5 JB |
50 | OpenGTL shared libraries. |
51 | ||
52 | %description libs -l pl.UTF-8 | |
53 | Biblioteki współdzielone OpenGTL. | |
e08dcf37 AM |
54 | |
55 | %package devel | |
2c344bb5 JB |
56 | Summary: Header files for OpenGTL |
57 | Summary(pl.UTF-8): Pliki nagłówkowe OpenGTL | |
e08dcf37 AM |
58 | Group: Development/Languages |
59 | Requires: %{name}-libs = %{version}-%{release} | |
2c344bb5 | 60 | Requires: llvm-devel >= 3.3 |
e08dcf37 AM |
61 | |
62 | %description devel | |
2c344bb5 JB |
63 | This package contains the header files needed to develop new native |
64 | programs that use the OpenGTL libraries. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia nowych | |
68 | programów wykorzystujących biblioteki OpenGTL. | |
e08dcf37 AM |
69 | |
70 | %prep | |
71 | %setup -q %{?with_tests:-a1} | |
2c344bb5 JB |
72 | %patch0 -p1 |
73 | %patch1 -p1 | |
74 | %patch2 -p1 | |
e08dcf37 AM |
75 | |
76 | %build | |
77 | install -d build | |
78 | cd build | |
2c344bb5 JB |
79 | %cmake .. \ |
80 | -DOPENGTL_BUILD_OpenRIJN:BOOL=ON \ | |
81 | -DOPENGTL_BUILD_TESTS:BOOL=ON \ | |
82 | %{?with_tests:-DOPENGTL_TESTS_DATA:PATH=$PWD/../tests-data} | |
e08dcf37 AM |
83 | |
84 | %{__make} | |
85 | ||
86 | cd .. | |
87 | doxygen OpenGTL.doxy | |
88 | ||
89 | %if %{with tests} | |
2c344bb5 | 90 | export PKG_CONFIG_PATH=$RPM_BUILD_ROOT%{_npkgconfigdir}:$RPM_BUILD_ROOT%{_pkgconfigdir} |
e08dcf37 AM |
91 | test "$(pkg-config --modversion GTLCore)" = "%{version}" |
92 | test "$(pkg-config --modversion GTLImageIO)" = "%{version}" | |
93 | test "$(pkg-config --modversion OpenCTL)" = "%{version}" | |
94 | test "$(pkg-config --modversion OpenShiva)" = "%{version}" | |
95 | # some known failures due to missing test data , 17 tests failed out of 189 | |
96 | # *with* test data, down to 2: | |
97 | # The following tests FAILED: | |
98 | # 177 - PerlinNoise.shiva (Failed) | |
99 | # 189 - grayscaliser.shiva (Failed) | |
100 | %{__make} test -C %{_target_platform} ||: | |
101 | %endif | |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} -C build install/fast \ | |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
2c344bb5 JB |
109 | # unpackaged files |
110 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/OpenGTL | |
e08dcf37 AM |
111 | |
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
2c344bb5 JB |
115 | %post libs -p /sbin/ldconfig |
116 | %postun libs -p /sbin/ldconfig | |
117 | ||
e08dcf37 AM |
118 | %files |
119 | %defattr(644,root,root,755) | |
120 | %doc COPYING OpenGTL/README | |
121 | %attr(755,root,root) %{_bindir}/ctli | |
122 | %attr(755,root,root) %{_bindir}/ctltc | |
123 | %attr(755,root,root) %{_bindir}/gtlconvert | |
124 | %attr(755,root,root) %{_bindir}/imagecompare | |
125 | %attr(755,root,root) %{_bindir}/shiva | |
126 | %attr(755,root,root) %{_bindir}/shivacheck | |
127 | %attr(755,root,root) %{_bindir}/shivainfo | |
128 | %attr(755,root,root) %{_bindir}/shivanimator | |
129 | %{_datadir}/OpenGTL | |
130 | ||
e08dcf37 AM |
131 | %files libs |
132 | %defattr(644,root,root,755) | |
2c344bb5 JB |
133 | %attr(755,root,root) %{_libdir}/libGTLCore.so.%{version} |
134 | %attr(755,root,root) %ghost %{_libdir}/libGTLCore.so.0.8 | |
135 | %attr(755,root,root) %{_libdir}/libGTLFragment.so.%{version} | |
136 | %attr(755,root,root) %ghost %{_libdir}/libGTLFragment.so.0.8 | |
137 | %attr(755,root,root) %{_libdir}/libGTLImageIO.so.%{version} | |
138 | %attr(755,root,root) %ghost %{_libdir}/libGTLImageIO.so.0.8 | |
139 | %attr(755,root,root) %{_libdir}/libOpenCTL.so.%{version} | |
140 | %attr(755,root,root) %ghost %{_libdir}/libOpenCTL.so.0.8 | |
141 | %attr(755,root,root) %{_libdir}/libOpenShiva.so.%{version} | |
142 | %attr(755,root,root) %ghost %{_libdir}/libOpenShiva.so.0.8 | |
143 | %dir %{_libdir}/GTLImageIO | |
144 | %dir %{_libdir}/GTLImageIO/Extensions | |
145 | %attr(755,root,root) %{_libdir}/GTLImageIO/Extensions/lib*.so | |
e08dcf37 AM |
146 | |
147 | %files devel | |
148 | %defattr(644,root,root,755) | |
149 | %doc html/* build/OpenShiva/doc/reference/ShivaRef.pdf | |
150 | %attr(755,root,root) %{_bindir}/ctlc | |
151 | %attr(755,root,root) %{_bindir}/shivac | |
152 | %attr(755,root,root) %{_bindir}/shivatester | |
2c344bb5 JB |
153 | %attr(755,root,root) %{_libdir}/libGTLCore.so |
154 | %attr(755,root,root) %{_libdir}/libGTLFragment.so | |
155 | %attr(755,root,root) %{_libdir}/libGTLImageIO.so | |
156 | %attr(755,root,root) %{_libdir}/libOpenCTL.so | |
157 | %attr(755,root,root) %{_libdir}/libOpenShiva.so | |
e08dcf37 AM |
158 | %{_includedir}/GTLCore |
159 | %{_includedir}/GTLFragment | |
160 | %{_includedir}/GTLImageIO | |
161 | %{_includedir}/OpenCTL | |
162 | %{_includedir}/OpenShiva | |
e08dcf37 AM |
163 | %{_pkgconfigdir}/GTLCore.pc |
164 | %{_pkgconfigdir}/GTLImageIO.pc | |
165 | %{_pkgconfigdir}/OpenCTL.pc | |
166 | %{_pkgconfigdir}/OpenShiva.pc |