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