]> git.pld-linux.org Git - packages/SoQt.git/blob - SoQt.spec
- updated to 1.6.2, added qt6 bcond
[packages/SoQt.git] / SoQt.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  static_libs     # static library
5 %bcond_with     qt4             # Qt4 instead of Qt5
6 %bcond_without  qt5             # Qt5 (default)
7 %bcond_with     qt6             # Qt6 instead of Qt5
8
9 %if %{with qt4} || %{with qt6}
10 %undefine       with_qt5
11 %endif
12 %if %{without qt4} && %{without qt5} && %{without qt6}
13 %{error: at least one Qt version must be enabled}
14 %endif
15
16 Summary:        Qt GUI component toolkit library for Coin
17 Summary(pl.UTF-8):      Biblioteka komponentu graficznego interfejsu Qt dla biblioteki Coin
18 Name:           SoQt
19 Version:        1.6.2
20 Release:        1
21 License:        BSD
22 Group:          X11/Libraries
23 #Source0Download: https://github.com/coin3d/soqt/releases
24 Source0:        https://github.com/coin3d/soqt/releases/download/v%{version}/soqt-%{version}-src.tar.gz
25 # Source0-md5:  70ef0990e009d806c59941d819a62c98
26 Patch0:         %{name}-pc.patch
27 URL:            https://github.com/coin3d/soqt
28 BuildRequires:  Coin-devel >= 4.0.0
29 BuildRequires:  OpenGL-GLX-devel
30 %if %{with qt4}
31 BuildRequires:  QtCore-devel >= 4
32 BuildRequires:  QtGui-devel >= 4
33 BuildRequires:  QtOpenGL-devel >= 4
34 %endif
35 %if %{with qt5}
36 BuildRequires:  Qt5Core-devel >= 5
37 BuildRequires:  Qt5Gui-devel >= 5
38 BuildRequires:  Qt5OpenGL-devel >= 5
39 BuildRequires:  Qt5Widgets-devel >= 5
40 %endif
41 %if %{with qt6}
42 BuildRequires:  Qt6Core-devel >= 6
43 BuildRequires:  Qt6Gui-devel >= 6
44 BuildRequires:  Qt6OpenGL-devel >= 6
45 BuildRequires:  Qt6Widgets-devel >= 6
46 %endif
47 BuildRequires:  cmake >= 3.0
48 %{?with_apidocs:BuildRequires:  doxygen}
49 BuildRequires:  libstdc++-devel
50 BuildRequires:  pkgconfig
51 %if %{with qt4}
52 BuildRequires:  qt4-build >= 4
53 %endif
54 %if %{with qt5}
55 BuildRequires:  qt5-build >= 5
56 %endif
57 %if %{with qt6}
58 BuildRequires:  qt6-build >= 6
59 %endif
60 BuildRequires:  rpmbuild(macros) >= 1.752
61 BuildRequires:  xorg-lib-libX11-devel
62 BuildRequires:  xorg-lib-libXext-devel
63 BuildRequires:  xorg-lib-libXmu-devel
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %description
67 SoQt is a Qt GUI component toolkit library for Coin. It is also
68 compatible with SGI and TGS Open Inventor, and the API is based on the
69 API of the InventorXt GUI component toolkit.
70
71 %description -l pl.UTF-8
72 SoQt to biblioteka toolkitu komponentu graficznego interfejsu
73 użytkownika (GUI) Qt dla biblioteki Coin. Jest zgodna także z
74 biblioteką SGI i TGS Open Inventor, a API jest oparte na API toolkitu
75 komponentu graficznego interfejsu użytkownika InventorXt.
76
77 %package devel
78 Summary:        Header files for SoQt library
79 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki SoQt
80 Group:          X11/Development/Libraries
81 Requires:       %{name} = %{version}-%{release}
82 Requires:       Coin-devel >= 4.0.0
83 %if %{with qt4}
84 Requires:       QtCore-devel >= 4
85 Requires:       QtGui-devel >= 4
86 Requires:       QtOpenGL-devel >= 4
87 %endif
88 %if %{with qt5}
89 Requires:       Qt5Core-devel >= 5
90 Requires:       Qt5Gui-devel >= 5
91 Requires:       Qt5OpenGL-devel >= 5
92 Requires:       Qt5Widgets-devel >= 5
93 %endif
94 %if %{with qt6}
95 Requires:       Qt6Core-devel >= 6
96 Requires:       Qt6Gui-devel >= 6
97 Requires:       Qt6OpenGL-devel >= 6
98 Requires:       Qt6Widgets-devel >= 6
99 %endif
100
101 %description devel
102 Header files for SoQt library.
103
104 %description devel -l pl.UTF-8
105 Pliki nagłówkowe biblioteki SoQt.
106
107 %package static
108 Summary:        Static SoQt library
109 Summary(pl.UTF-8):      Statyczna biblioteka SoQt
110 Group:          X11/Development/Libraries
111 Requires:       %{name} = %{version}-%{release}
112
113 %description static
114 Static SoQt library.
115
116 %description static -l pl.UTF-8
117 Statyczna biblioteka SoQt.
118
119 %package apidocs
120 Summary:        API documentation for SoQt library
121 Summary(pl.UTF-8):      Dokumentacja API biblioteki SoQt
122 Group:          Documentation
123 BuildArch:      noarch
124
125 %description apidocs
126 API documentation for SoQt library.
127
128 %description apidocs -l pl.UTF-8
129 Dokumentacja API biblioteki SoQt.
130
131 %prep
132 %setup -q -n soqt
133 %patch0 -p1
134
135 %build
136 install -d builddir
137 cd builddir
138 %cmake .. \
139 %if %{with apidocs}
140         -DSOQT_BUILD_DOCUMENTATION=ON \
141         -DSOQT_BUILD_DOC_MAN=ON \
142 %endif
143         %{!?with_qt5:-DSOQT_USE_QT5=OFF} \
144         %{!?with_qt6:-DSOQT_USE_QT6=OFF}
145
146 %{__make}
147 cd ..
148
149 %if %{with static_libs}
150 install -d builddir-static
151 cd builddir-static
152 %cmake .. \
153         -DSOQT_BUILD_SHARED_LIBS=OFF \
154         %{!?with_qt5:-DSOQT_USE_QT5=OFF} \
155         %{!?with_qt6:-DSOQT_USE_QT6=OFF}
156
157 %{__make}
158 cd ..
159 %endif
160
161 %install
162 rm -rf $RPM_BUILD_ROOT
163
164 %if %{with static_libs}
165 %{__make} -C builddir-static install \
166         DESTDIR=$RPM_BUILD_ROOT
167 %endif
168
169 %{__make} -C builddir install \
170         DESTDIR=$RPM_BUILD_ROOT
171
172 %if %{with apidocs}
173 # packaged as %doc
174 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
175 # to common names etc.
176 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/{_*_,components,devices,misc,viewers}.3
177 %endif
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post   -p /sbin/ldconfig
183 %postun -p /sbin/ldconfig
184
185 %files
186 %defattr(644,root,root,755)
187 %doc AUTHORS BUGS.txt COPYING ChangeLog FAQ NEWS README
188 %attr(755,root,root) %{_libdir}/libSoQt.so.*.*.*
189 %attr(755,root,root) %ghost %{_libdir}/libSoQt.so.20
190 %{_datadir}/SoQt
191
192 %files devel
193 %defattr(644,root,root,755)
194 %attr(755,root,root) %{_libdir}/libSoQt.so
195 %{_includedir}/Inventor/Qt
196 %{_pkgconfigdir}/SoQt.pc
197 %{_libdir}/cmake/SoQt-%{version}
198 %if %{with apidocs}
199 %{_mandir}/man3/SoQt*.3*
200 %endif
201
202 %if %{with static_libs}
203 %files static
204 %defattr(644,root,root,755)
205 %{_libdir}/libSoQt.a
206 %endif
207
208 %if %{with apidocs}
209 %files apidocs
210 %defattr(644,root,root,755)
211 %doc builddir/html/*.{css,html,js,png}
212 %endif
This page took 0.042112 seconds and 3 git commands to generate.