- fix building with python 3.8
[packages/ka5-cantor.git] / ka5-cantor.spec
1 #
2 # Conditional build:
3 %bcond_without  luajit          # build without luajit
4 #
5 %ifarch x32
6 %undefine       with_luajit
7 %endif
8
9 %define         kdeappsver      19.04.1
10 %define         kframever       5.56.0
11 %define         qtver           5.9.0
12 %define         kaname          cantor
13 Summary:        Cantor
14 Name:           ka5-%{kaname}
15 Version:        19.04.1
16 Release:        3
17 License:        GPL v2+/LGPL v2.1+
18 Group:          X11/Libraries
19 Source0:        http://download.kde.org/stable/applications/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
20 # Source0-md5:  0a2d78da9b7a785adeddd1094e9bbe67
21 Patch0:         python-3.8.patch
22 URL:            http://www.kde.org/
23 BuildRequires:  Qt5Core-devel >= %{qtver}
24 BuildRequires:  Qt5Gui-devel
25 BuildRequires:  Qt5Network-devel >= 5.11.1
26 BuildRequires:  Qt5PrintSupport-devel
27 BuildRequires:  Qt5Svg-devel
28 BuildRequires:  Qt5Test-devel
29 BuildRequires:  Qt5Widgets-devel
30 BuildRequires:  Qt5Xml-devel
31 BuildRequires:  Qt5XmlPatterns-devel
32 BuildRequires:  R
33 BuildRequires:  cmake >= 2.8.12
34 BuildRequires:  gettext-devel
35 BuildRequires:  ka5-analitza-devel
36 BuildRequires:  kf5-extra-cmake-modules >= %{kframever}
37 BuildRequires:  kf5-karchive-devel >= %{kframever}
38 BuildRequires:  kf5-kcompletion-devel >= %{kframever}
39 BuildRequires:  kf5-kconfig-devel >= %{kframever}
40 BuildRequires:  kf5-kcoreaddons-devel >= %{kframever}
41 BuildRequires:  kf5-kcrash-devel >= %{kframever}
42 BuildRequires:  kf5-kdoctools-devel >= %{kframever}
43 BuildRequires:  kf5-ki18n-devel >= %{kframever}
44 BuildRequires:  kf5-kiconthemes-devel >= %{kframever}
45 BuildRequires:  kf5-kio-devel >= %{kframever}
46 BuildRequires:  kf5-knewstuff-devel >= %{kframever}
47 BuildRequires:  kf5-kparts-devel >= %{kframever}
48 BuildRequires:  kf5-kpty-devel >= %{kframever}
49 BuildRequires:  kf5-ktexteditor-devel >= %{kframever}
50 BuildRequires:  kf5-ktextwidgets-devel >= %{kframever}
51 BuildRequires:  kf5-kxmlgui-devel >= %{kframever}
52 BuildRequires:  kf5-syntax-highlighting-devel >= %{kframever}
53 BuildRequires:  libmarkdown-devel
54 BuildRequires:  libqalculate-devel >= 2.8.2
55 %{?with_luajit:BuildRequires:   luajit-devel}
56 BuildRequires:  ninja
57 BuildRequires:  qt5-build >= %{qtver}
58 BuildRequires:  rpmbuild(macros) >= 1.164
59 BuildRequires:  shared-mime-info
60 BuildRequires:  tar >= 1:1.22
61 BuildRequires:  xz
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 Cantor is a KDE Application aimed to provide a nice Interface for
66 doing Mathematics and Scientific Computing. It doesn't implement its
67 own Computation Logic, but instead is built around different Backends.
68
69 Available Backends
70 - Julia Programming Language: http://julialang.org/
71 - KAlgebra for Calculation and Plotting: http://edu.kde.org/kalgebra/
72 %{?with_luajit:- Lua Programming Language: http://lua.org/}
73 - Maxima Computer Algebra System: http://maxima.sourceforge.net/
74 - Octave for Numerical Computation: https://gnu.org/software/octave/
75 - Python 2 Programming Language: http://python.org/
76 - Python 3 Programming Language: http://python.org/
77 - Qalculate Desktop Calculator: http://qalculate.sourceforge.net/
78 - R Project for Statistical Computing: http://r-project.org/
79 - Sage Mathematics Software: http://sagemath.org/
80 - Scilab for Numerical Computation: http://scilab.org/
81
82 %package devel
83 Summary:        Header files for %{kaname} development
84 Summary(pl.UTF-8):      Pliki nagłówkowe dla programistów używających %{kpname}
85 Group:          X11/Development/Libraries
86 Requires:       %{name} = %{version}-%{release}
87
88 %description devel
89 Header files for %{kaname} development.
90
91 %description devel -l pl.UTF-8
92 Pliki nagłówkowe dla programistów używających %{kaname}.
93
94 %prep
95 %setup -q -n %{kaname}-%{version}
96 %patch0 -p1
97
98 %build
99 install -d build
100 cd build
101 %cmake \
102         -G Ninja \
103         -DHTML_INSTALL_DIR=%{_kdedocdir} \
104         -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
105         ..
106 %ninja_build
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 %ninja_install -C build
111
112 %find_lang %{kaname} --all-name --with-kde
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %files -f %{kaname}.lang
121 %defattr(644,root,root,755)
122 /etc/xdg/cantor.knsrc
123 /etc/xdg/cantor_kalgebra.knsrc
124 %{?with_luajit:/etc/xdg/cantor_lua.knsrc}
125 /etc/xdg/cantor_maxima.knsrc
126 /etc/xdg/cantor_octave.knsrc
127 /etc/xdg/cantor_python2.knsrc
128 /etc/xdg/cantor_python3.knsrc
129 /etc/xdg/cantor_qalculate.knsrc
130 /etc/xdg/cantor_r.knsrc
131 /etc/xdg/cantor_sage.knsrc
132 /etc/xdg/cantor_scilab.knsrc
133 %attr(755,root,root) %{_bindir}/cantor
134 %attr(755,root,root) %{_bindir}/cantor_python2server
135 %attr(755,root,root) %{_bindir}/cantor_python3server
136 %attr(755,root,root) %{_bindir}/cantor_rserver
137 %attr(755,root,root) %{_bindir}/cantor_scripteditor
138 %attr(755,root,root) %{_libdir}/libcantor_config.so
139 %attr(755,root,root) %{_libdir}/libcantor_pythonbackend.so
140 %attr(755,root,root) %ghost %{_libdir}/libcantorlibs.so.20
141 %attr(755,root,root) %{_libdir}/libcantorlibs.so.*.*.*
142 %dir %{_libdir}/qt5/plugins/cantor
143 %dir %{_libdir}/qt5/plugins/cantor/assistants
144 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_advancedplotassistant.so
145 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_creatematrixassistant.so
146 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_differentiateassistant.so
147 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_eigenvaluesassistant.so
148 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_eigenvectorsassistant.so
149 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_importpackageassistant.so
150 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_integrateassistant.so
151 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_invertmatrixassistant.so
152 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_plot2dassistant.so
153 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_plot3dassistant.so
154 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_qalculateplotassistant.so
155 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_runscriptassistant.so
156 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/assistants/cantor_solveassistant.so
157 %dir %{_libdir}/qt5/plugins/cantor/backends
158 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_kalgebrabackend.so
159 %{?with_luajit:%attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_luabackend.so}
160 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_maximabackend.so
161 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_nullbackend.so
162 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_octavebackend.so
163 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_python2backend.so
164 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_python3backend.so
165 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_qalculatebackend.so
166 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_rbackend.so
167 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_sagebackend.so
168 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/backends/cantor_scilabbackend.so
169 %dir %{_libdir}/qt5/plugins/cantor/panels
170 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/panels/cantor_helppanelplugin.so
171 %attr(755,root,root) %{_libdir}/qt5/plugins/cantor/panels/cantor_variablemanagerplugin.so
172 %attr(755,root,root) %{_libdir}/qt5/plugins/libcantorpart.so
173 %{_desktopdir}/org.kde.cantor.desktop
174 %{_datadir}/cantor
175 %{_datadir}/config.kcfg/cantor.kcfg
176 %{_datadir}/config.kcfg/cantor_libs.kcfg
177 %{_datadir}/config.kcfg/kalgebrabackend.kcfg
178 %{_datadir}/config.kcfg/maximabackend.kcfg
179 %{_datadir}/config.kcfg/octavebackend.kcfg
180 %{_datadir}/config.kcfg/python2backend.kcfg
181 %{_datadir}/config.kcfg/python3backend.kcfg
182 %{_datadir}/config.kcfg/qalculatebackend.kcfg
183 %{_datadir}/config.kcfg/rserver.kcfg
184 %{_datadir}/config.kcfg/sagebackend.kcfg
185 %{_datadir}/config.kcfg/scilabbackend.kcfg
186 %{_iconsdir}/hicolor/128x128/apps/cantor.png
187 %{_iconsdir}/hicolor/16x16/apps/cantor.png
188 %{_iconsdir}/hicolor/22x22/apps/cantor.png
189 %{_iconsdir}/hicolor/32x32/apps/cantor.png
190 %{_iconsdir}/hicolor/48x48/apps/cantor.png
191 %{_iconsdir}/hicolor/48x48/apps/juliabackend.png
192 %{_iconsdir}/hicolor/48x48/apps/kalgebrabackend.png
193 %{?with_luajit:%{_iconsdir}/hicolor/48x48/apps/luabackend.png}
194 %{_iconsdir}/hicolor/48x48/apps/maximabackend.png
195 %{_iconsdir}/hicolor/48x48/apps/octavebackend.png
196 %{_iconsdir}/hicolor/48x48/apps/pythonbackend.png
197 %{_iconsdir}/hicolor/48x48/apps/qalculatebackend.png
198 %{_iconsdir}/hicolor/48x48/apps/rbackend.png
199 %{_iconsdir}/hicolor/48x48/apps/sagebackend.png
200 %{_iconsdir}/hicolor/48x48/apps/scilabbackend.png
201 %{_iconsdir}/hicolor/64x64/apps/cantor.png
202 %dir %{_datadir}/kxmlgui5/cantor
203 %{_datadir}/kxmlgui5/cantor/cantor_part.rc
204 %{_datadir}/kxmlgui5/cantor/cantor_scripteditor.rc
205 %{_datadir}/kxmlgui5/cantor/cantor_shell.rc
206 %{_datadir}/kxmlgui5/cantor/cantor_advancedplot_assistant.rc
207 %{_datadir}/kxmlgui5/cantor/cantor_create_matrix_assistant.rc
208 %{_datadir}/kxmlgui5/cantor/cantor_differentiate_assistant.rc
209 %{_datadir}/kxmlgui5/cantor/cantor_eigenvalues_assistant.rc
210 %{_datadir}/kxmlgui5/cantor/cantor_eigenvectors_assistant.rc
211 %{_datadir}/kxmlgui5/cantor/cantor_import_package_assistant.rc
212 %{_datadir}/kxmlgui5/cantor/cantor_integrate_assistant.rc
213 %{_datadir}/kxmlgui5/cantor/cantor_invert_matrix_assistant.rc
214 %{_datadir}/kxmlgui5/cantor/cantor_plot2d_assistant.rc
215 %{_datadir}/kxmlgui5/cantor/cantor_plot3d_assistant.rc
216 %{_datadir}/kxmlgui5/cantor/cantor_qalculateplotassistant.rc
217 %{_datadir}/kxmlgui5/cantor/cantor_runscript_assistant.rc
218 %{_datadir}/kxmlgui5/cantor/cantor_solve_assistant.rc
219 %{_datadir}/metainfo/org.kde.cantor.appdata.xml
220 %{?with_luajit:%{_datadir}/config.kcfg/luabackend.kcfg}
221
222 %files devel
223 %defattr(644,root,root,755)
224 %{_includedir}/cantor
225 %attr(755,root,root) %{_libdir}/libcantorlibs.so
226 %{_libdir}/cmake/Cantor
This page took 0.141509 seconds and 3 git commands to generate.