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