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