1 |
%define qtver 5.13.1 |
2 |
|
3 |
Summary: A professional CAD system |
4 |
Name: qcad |
5 |
Version: 3.23.0.4 |
6 |
Release: %mkrel 2 |
7 |
Group: Graphics/Editors and Converters |
8 |
License: GPLv3 with exceptions or CC-BY or GPLv2+ or LGPLv2+ or BSD |
9 |
URL: http://www.qcad.org |
10 |
Source0: https://github.com/qcad/qcad/archive/v%{version}/%{name}-%{version}.tar.gz |
11 |
Source1: qt-labs-qtscriptgenerator-5.13.1.pro |
12 |
Patch0: qcad-3.19.2.2-use-system-spatialindex.patch |
13 |
|
14 |
# minimal BuildRequires |
15 |
BuildRequires: qttools5 |
16 |
BuildRequires: pkgconfig(Qt5Concurrent) |
17 |
BuildRequires: pkgconfig(Qt5Core) |
18 |
BuildRequires: pkgconfig(Qt5Gui) |
19 |
BuildRequires: pkgconfig(Qt5Designer) |
20 |
BuildRequires: pkgconfig(Qt5Network) |
21 |
BuildRequires: pkgconfig(Qt5OpenGL) |
22 |
BuildRequires: pkgconfig(Qt5PrintSupport) |
23 |
BuildRequires: pkgconfig(Qt5Qml) |
24 |
BuildRequires: pkgconfig(Qt5Quick) |
25 |
BuildRequires: pkgconfig(Qt5Script) |
26 |
BuildRequires: pkgconfig(Qt5Sql) |
27 |
BuildRequires: pkgconfig(Qt5Svg) |
28 |
BuildRequires: pkgconfig(Qt5Xml) |
29 |
BuildRequires: pkgconfig(Qt5XmlPatterns) |
30 |
BuildRequires: pkgconfig(Qt5ScriptTools) |
31 |
BuildRequires: pkgconfig(Qt5Help) |
32 |
BuildRequires: pkgconfig(glu) |
33 |
BuildRequires: spatialindex-devel |
34 |
|
35 |
# extra BuildRequires and simular Requires for additional plugins, which were not installed by BuildRequires above |
36 |
BuildRequires: qtimageformats5 |
37 |
Requires: qtimageformats5 |
38 |
Requires: qttranslations5 |
39 |
|
40 |
%description |
41 |
QCad is a professional CAD System. With QCad you can easily construct |
42 |
and change drawings with ISO-text and many other features and save |
43 |
them as DXF-files. These DXF-files are the interface to many |
44 |
CAD-systems such as AutoCAD(TM) and many others. |
45 |
|
46 |
%prep |
47 |
%autosetup -p1 |
48 |
|
49 |
rm -rf src/3rdparty/spatialindexnavel/include/spatialindex |
50 |
|
51 |
%__mkdir_p %{_builddir}/%{name}-%{version}/src/3rdparty/qt-labs-qtscriptgenerator-%{qtver} |
52 |
cp %{S:1} src/3rdparty/qt-labs-qtscriptgenerator-%{qtver}/qt-labs-qtscriptgenerator-%{qtver}.pro |
53 |
|
54 |
%build |
55 |
%qmake_qt5 |
56 |
|
57 |
%make_build |
58 |
|
59 |
%install |
60 |
# remove project files |
61 |
find . \( -name '*.pri' -or -name '*.pro' -or -name '*.ts' \) -delete |
62 |
find . \( -name 'Makefile*' -or -name '.gitignore' \) -delete |
63 |
|
64 |
install -dm755 %{buildroot}%{_datadir}/%{name} |
65 |
cp -r examples fonts libraries linetypes patterns plugins scripts ts %{buildroot}%{_datadir}/%{name} |
66 |
cp release/* %{buildroot}%{_datadir}/%{name} |
67 |
|
68 |
# qt |
69 |
for sofiles in %{_qt5_plugindir}/imageformats/*.so |
70 |
do |
71 |
ln -sf ${sofiles} %{buildroot}%{_datadir}/%{name}/plugins/imageformats/${sofiles##/*/} |
72 |
done |
73 |
|
74 |
for sofiles in %{_qt5_plugindir}/sqldrivers/*.so |
75 |
do |
76 |
ln -sf ${sofiles} %{buildroot}%{_datadir}/%{name}/plugins/sqldrivers/${sofiles##/*/} |
77 |
done |
78 |
|
79 |
for sofiles in %{_qt5_plugindir}/printsupport/*.so |
80 |
do |
81 |
ln -sf ${sofiles} %{buildroot}%{_datadir}/%{name}/plugins/printsupport/${sofiles##/*/} |
82 |
done |
83 |
|
84 |
install -Dm644 scripts/%{name}_icon.png %{buildroot}%{_iconsdir}/%{name}_icon.png |
85 |
install -Dm644 scripts/%{name}_icon.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}_icon.svg |
86 |
|
87 |
install -dm0755 %{buildroot}%{_bindir} |
88 |
echo -e '#!/bin/sh\ncd %{_datadir}/%{name}\nLD_LIBRARY_PATH=`pwd`:%{_libdir}/%{name}:$LD_LIBRARY_PATH exec ./%{name}-bin' > %{buildroot}%{_bindir}/%{name} |
89 |
chmod 0755 %{buildroot}%{_bindir}/%{name} |
90 |
|
91 |
rm -f %{buildroot}%{_datadir}/%{name}/*.a |
92 |
|
93 |
install -dm0755 %{buildroot}%{_libdir}/%{name} |
94 |
mv %{buildroot}%{_datadir}/%{name}/*.so %{buildroot}%{_libdir}/%{name} |
95 |
|
96 |
# man page |
97 |
install -Dm644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 |
98 |
|
99 |
# documentation for help system |
100 |
install -Dm644 readme.txt %{buildroot}%{_datadir}/%{name}/readme.txt |
101 |
|
102 |
# desktop |
103 |
install -Dm644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop |
104 |
|
105 |
%files |
106 |
%doc readme.txt README.md |
107 |
%license LICENSE.txt gpl-3.0.txt cc-by-3.0.txt gpl-3.0-exceptions.txt |
108 |
%{_bindir}/%{name} |
109 |
%dir %{_libdir}/%{name} |
110 |
%{_libdir}/%{name}/*.so |
111 |
%{_iconsdir}/*.png |
112 |
%{_iconsdir}/hicolor/scalable/apps/*.svg |
113 |
%{_datadir}/%{name}/ |
114 |
%{_datadir}/applications/*.desktop |
115 |
%{_mandir}/man1/%{name}.1.* |