1 |
Summary: A professional CAD system |
2 |
Name: qcad |
3 |
Version: 3.6.2.0 |
4 |
Release: %mkrel 1 |
5 |
Group: Graphics/Editors and Converters |
6 |
License: GPLv3 with exceptions, CC-BY, GPLv2+, LGPLv2.1, BSD |
7 |
URL: http://www.qcad.org |
8 |
#https://github.com/qcad/qcad/archive/v%{version}.zip |
9 |
Source0: qcad-%{version}.zip |
10 |
Patch0: qcad-3.4.6.0-fix-linking.patch |
11 |
|
12 |
BuildRequires: qt4-devel |
13 |
BuildRequires: pkgconfig(QtWebKit) |
14 |
|
15 |
%description |
16 |
QCad is a professional CAD System. With QCad you can easily construct |
17 |
and change drawings with ISO-text and many other features and save |
18 |
them as DXF-files. These DXF-files are the interface to many |
19 |
CAD-systems such as AutoCAD(TM) and many others. |
20 |
|
21 |
%prep |
22 |
%setup -q |
23 |
%patch0 -p0 |
24 |
|
25 |
%build |
26 |
%qmake_qt4 |
27 |
%make |
28 |
|
29 |
%install |
30 |
|
31 |
# remove project files |
32 |
find . \( -name '*.pri' -or -name '.pro' -or -name '*.ts' \) -delete |
33 |
find . \( -name 'Makefile*' -name '.gitignore' \) -delete |
34 |
|
35 |
install -dm755 %{buildroot}%{_datadir}/%{name} |
36 |
cp -r examples fonts libraries patterns plugins scripts ts %{buildroot}%{_datadir}/%{name} |
37 |
cp release/* %{buildroot}%{_datadir}/%{name} |
38 |
|
39 |
# qt |
40 |
for sofiles in %{qt4plugins}/imageformats/*.so |
41 |
do |
42 |
ln -sf ${sofiles} %{buildroot}%{_datadir}/%{name}/plugins/imageformats/${sofiles##/*/} |
43 |
done |
44 |
|
45 |
for sofiles in %{qt4plugins}/sqldrivers/*.so |
46 |
do |
47 |
ln -sf ${sofiles} %{buildroot}%{_datadir}/%{name}/plugins/sqldrivers/${sofiles##/*/} |
48 |
done |
49 |
|
50 |
install -Dm644 scripts/qcad_icon.png %{buildroot}%{_iconsdir}/qcad_icon.png |
51 |
|
52 |
install -dm0755 %{buildroot}%{_bindir} |
53 |
echo -e '#!/bin/sh\ncd %{_datadir}/%{name}\nLD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH exec ./qcad-bin' > %{buildroot}%{_bindir}/%{name} |
54 |
chmod 0755 %{buildroot}%{_bindir}/%{name} |
55 |
|
56 |
rm -f %{buildroot}%{_datadir}/%{name}/*.a |
57 |
|
58 |
install -dm0755 %{buildroot}%{_libdir} |
59 |
mv %{buildroot}%{_datadir}/%{name}/*.so %{buildroot}%{_libdir} |
60 |
|
61 |
# desktop |
62 |
install -m 755 -d %{buildroot}%{_datadir}/applications |
63 |
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop <<EOF |
64 |
[Desktop Entry] |
65 |
Encoding=UTF-8 |
66 |
Name=Qcad |
67 |
Comment=A professional CAD system |
68 |
Comment[ru]=Профессиональная CAD система |
69 |
Exec=%{name} |
70 |
Icon=qcad_icon |
71 |
Terminal=false |
72 |
Type=Application |
73 |
Categories=Office;Chart;Qt; |
74 |
StartupNotify=true |
75 |
EOF |
76 |
|
77 |
%files |
78 |
%doc readme.txt LICENSE.txt README.md gpl-3.0.txt cc-by-3.0.txt gpl-3.0-exceptions.txt |
79 |
%{_bindir}/%{name} |
80 |
%{_libdir}/*.so |
81 |
%{_iconsdir}/*.png |
82 |
%dir %{_datadir}/%{name} |
83 |
%{_datadir}/%{name}/* |
84 |
%{_datadir}/applications/*.desktop |