]>
Commit | Line | Data |
---|---|---|
e08dcf37 AM |
1 | # |
2 | %bcond_with tests | |
3 | # | |
4 | Summary: Graphics Transformation Languages | |
5 | Name: OpenGTL | |
6 | Version: 0.9.18 | |
7 | Release: 0.1 | |
8 | License: LGPLv2 | |
9 | Group: Libraries | |
10 | URL: http://opengtl.org/ | |
11 | Source0: http://download.opengtl.org/%{name}-%{version}.tar.bz2 | |
12 | # Source0-md5: 8a9673c648ef5af4fcc7f60bb8282811 | |
13 | %{?with_tests:Source1: http://download.opengtl.org/tests-data-%{version}.tar.bz2} | |
14 | BuildRequires: ImageMagick | |
15 | BuildRequires: cmake | |
16 | BuildRequires: doxygen | |
17 | BuildRequires: ghostscript | |
18 | BuildRequires: graphviz | |
19 | BuildRequires: libpng-devel | |
20 | BuildRequires: llvm-devel >= 3.0 | |
21 | BuildRequires: texlive-dvips | |
22 | BuildRequires: texlive-latex | |
23 | BuildRequires: zlib-devel | |
24 | Requires: %{name}-libs = %{version}-%{release} | |
25 | ||
26 | %description | |
27 | OpenGTL provides tools, languages and libraries to create generic | |
28 | transformations for graphics. These transformations can be used by | |
29 | different programs, e.g. Krita, Gimp, CinePaint, etc. | |
30 | ||
31 | %package libs | |
32 | ###### Unknown group! | |
33 | Summary: Runtime libraries for %{name} | |
34 | Group: System Environment/Libraries | |
35 | Requires: %{name} = %{version}-%{release} | |
36 | ||
37 | %description libs | |
38 | OpenGTL libraries. | |
39 | ||
40 | %package devel | |
41 | Summary: Libraries and header files for %{name} | |
42 | Group: Development/Languages | |
43 | Requires: %{name}-libs = %{version}-%{release} | |
44 | Requires: llvm-devel | |
45 | ||
46 | %description devel | |
47 | This package contains library and header files needed to develop new | |
48 | native programs that use the OpenGTL libraries. | |
49 | ||
50 | %prep | |
51 | %setup -q %{?with_tests:-a1} | |
52 | ||
53 | %build | |
54 | install -d build | |
55 | cd build | |
56 | %cmake \ | |
57 | -DOPENGTL_BUILD_TESTS:BOOL=ON \ | |
58 | %{?with_tests:-DOPENGTL_TESTS_DATA:PATH=$PWD/../tests-data} \ | |
59 | .. | |
60 | ||
61 | %{__make} | |
62 | ||
63 | cd .. | |
64 | doxygen OpenGTL.doxy | |
65 | ||
66 | %if %{with tests} | |
67 | export PKG_CONFIG_PATH=$RPM_BUILD_ROOT%{_npkgconfigdir}:%{buildroot}%{_pkgconfigdir} | |
68 | test "$(pkg-config --modversion GTLCore)" = "%{version}" | |
69 | test "$(pkg-config --modversion GTLImageIO)" = "%{version}" | |
70 | test "$(pkg-config --modversion OpenCTL)" = "%{version}" | |
71 | test "$(pkg-config --modversion OpenShiva)" = "%{version}" | |
72 | # some known failures due to missing test data , 17 tests failed out of 189 | |
73 | # *with* test data, down to 2: | |
74 | # The following tests FAILED: | |
75 | # 177 - PerlinNoise.shiva (Failed) | |
76 | # 189 - grayscaliser.shiva (Failed) | |
77 | %{__make} test -C %{_target_platform} ||: | |
78 | %endif | |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %{__make} -C build install/fast \ | |
84 | DESTDIR=$RPM_BUILD_ROOT | |
85 | ||
86 | ## unpackaged files | |
87 | rm -rf $RPM_BUILD_ROOT%{_docdir}/OpenGTL | |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %files | |
93 | %defattr(644,root,root,755) | |
94 | %doc COPYING OpenGTL/README | |
95 | %attr(755,root,root) %{_bindir}/ctli | |
96 | %attr(755,root,root) %{_bindir}/ctltc | |
97 | %attr(755,root,root) %{_bindir}/gtlconvert | |
98 | %attr(755,root,root) %{_bindir}/imagecompare | |
99 | %attr(755,root,root) %{_bindir}/shiva | |
100 | %attr(755,root,root) %{_bindir}/shivacheck | |
101 | %attr(755,root,root) %{_bindir}/shivainfo | |
102 | %attr(755,root,root) %{_bindir}/shivanimator | |
103 | %{_datadir}/OpenGTL | |
104 | ||
105 | %post libs -p /sbin/ldconfig | |
106 | %postun libs -p /sbin/ldconfig | |
107 | ||
108 | %files libs | |
109 | %defattr(644,root,root,755) | |
110 | %{_libdir}/libGTLCore.so.%{version} | |
111 | %{_libdir}/libGTLFragment.so.%{version} | |
112 | %{_libdir}/libGTLImageIO.so.%{version} | |
113 | %{_libdir}/libOpenCTL.so.%{version} | |
114 | %{_libdir}/libOpenShiva.so.%{version} | |
115 | %{_libdir}/libGTLCore.so.0.8 | |
116 | %{_libdir}/libGTLFragment.so.0.8 | |
117 | %{_libdir}/libGTLImageIO.so.0.8 | |
118 | %{_libdir}/libOpenCTL.so.0.8 | |
119 | %{_libdir}/libOpenShiva.so.0.8 | |
120 | %{_libdir}/GTLImageIO | |
121 | ||
122 | %files devel | |
123 | %defattr(644,root,root,755) | |
124 | %doc html/* build/OpenShiva/doc/reference/ShivaRef.pdf | |
125 | %attr(755,root,root) %{_bindir}/ctlc | |
126 | %attr(755,root,root) %{_bindir}/shivac | |
127 | %attr(755,root,root) %{_bindir}/shivatester | |
128 | %{_includedir}/GTLCore | |
129 | %{_includedir}/GTLFragment | |
130 | %{_includedir}/GTLImageIO | |
131 | %{_includedir}/OpenCTL | |
132 | %{_includedir}/OpenShiva | |
133 | %{_libdir}/libGTLCore.so | |
134 | %{_libdir}/libGTLFragment.so | |
135 | %{_libdir}/libGTLImageIO.so | |
136 | %{_libdir}/libOpenCTL.so | |
137 | %{_libdir}/libOpenShiva.so | |
138 | %{_pkgconfigdir}/GTLCore.pc | |
139 | %{_pkgconfigdir}/GTLImageIO.pc | |
140 | %{_pkgconfigdir}/OpenCTL.pc | |
141 | %{_pkgconfigdir}/OpenShiva.pc |