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