]>
Commit | Line | Data |
---|---|---|
cd307a29 ER |
1 | # |
2 | # Conditional build: | |
35570a78 | 3 | %bcond_without tests # build with tests |
7c812244 | 4 | %bcond_without qt5 |
9d3a487c AM |
5 | |
6 | %define qtver %{?with_qt5:5}%{!?with_qt5:4} | |
cd307a29 | 7 | |
cd307a29 | 8 | Summary: The Programmers Solid 3D CAD Modeller |
a4cd6760 | 9 | Name: openscad |
9ef24798 JR |
10 | Version: 2019.05 |
11 | Release: 0.1 | |
a4cd6760 AM |
12 | # COPYING contains a linking exception for CGAL |
13 | # Appdata file is CC0 | |
14 | # Examples are CC0 | |
15 | License: GPLv2 with exceptions and CC0 | |
16 | Group: Applications/Engineering | |
9ef24798 JR |
17 | Source0: http://files.openscad.org/%{name}-%{version}.src.tar.gz |
18 | # Source0-md5: 2b63e249d56e2eba62ed5b042e1d82bc | |
a4cd6760 | 19 | Patch0: %{name}-polyclipping.patch |
35570a78 | 20 | Patch1: localedir.patch |
cd307a29 | 21 | URL: http://www.openscad.org/ |
35570a78 JR |
22 | %if %{with qt5} |
23 | BuildRequires: Qt5Network-devel | |
24 | BuildRequires: Qt5Concurrent-devel | |
25 | BuildRequires: Qt5Multimedia-devel | |
26 | BuildRequires: Qt5DBus-devel | |
27 | BuildRequires: Qt5PrintSupport-devel | |
28 | %else | |
29 | BuildRequires: QtNetwork-devel | |
30 | BuildRequires: QtMultimedia-devel | |
31 | BuildRequires: QtDBus-devel | |
32 | %endif | |
a4cd6760 AM |
33 | BuildRequires: CGAL-devel >= 3.6 |
34 | BuildRequires: ImageMagick | |
35 | BuildRequires: Mesa-dri-driver-swrast | |
36 | BuildRequires: bison >= 2.4 | |
37 | BuildRequires: boost-devel >= 1.35 | |
38 | BuildRequires: desktop-file-utils | |
39 | BuildRequires: eigen3 | |
40 | BuildRequires: flex >= 2.5.35 | |
41 | BuildRequires: fontconfig-devel >= 2.10 | |
42 | BuildRequires: freetype-devel >= 2.4 | |
43 | BuildRequires: gettext | |
44 | BuildRequires: glew-devel >= 1.6 | |
45 | BuildRequires: glib2-devel | |
46 | BuildRequires: gmp-devel >= 5.0.0 | |
47 | BuildRequires: harfbuzz-devel >= 0.9.19 | |
48 | BuildRequires: mpfr-devel >= 3.0.0 | |
49 | BuildRequires: opencsg-devel >= 1.3.2 | |
50 | BuildRequires: polyclipping-devel >= 6.1.3 | |
51 | BuildRequires: procps | |
52 | BuildRequires: python | |
9d3a487c AM |
53 | BuildRequires: qscintilla2-qt%{qtver}-devel |
54 | BuildRequires: qt%{qtver}-build >= 4.4 | |
a4cd6760 AM |
55 | BuildRequires: xorg-xserver-Xvfb |
56 | Requires: font(liberationmono) | |
57 | Requires: font(liberationsans) | |
58 | Requires: font(liberationserif) | |
cd307a29 ER |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
60 | ||
61 | ### LICENSES: | |
62 | ||
63 | ## LGPLv2+: | |
64 | # 2Dshapes.scad | |
65 | # 3d_triangle.scad | |
66 | # fonts.scad | |
67 | # gridbeam.scad | |
68 | # hardware.scad | |
69 | # libtriangles.scad | |
70 | # multiply.scad | |
71 | # shapes.scad | |
72 | # screw.scad | |
73 | ||
74 | ## LGPLv2: | |
75 | # gears.scad | |
76 | # involute_gears.scad | |
77 | # servos.scad | |
78 | # transformations.scad | |
79 | # triangles.scad | |
80 | # unregular_shapes.scad | |
81 | # bitmap/letter_necklace.scad | |
82 | ||
83 | ## LGPLv3+: | |
84 | # teardrop.scad | |
85 | ||
86 | ## GPLv3 or LGPLv2: | |
87 | # motors.scad | |
88 | # nuts_and_bolts.scad | |
89 | ||
90 | ||
91 | ## GPLv3+ or LGPLv2: | |
92 | # metric_fastners.scad | |
93 | # regular_shapes.scad | |
94 | ||
95 | ## CC-BY-SA or LGPLv2+: | |
96 | # bearing.scad | |
97 | # materials.scad | |
98 | # stepper.scad | |
99 | # utilities.scad | |
100 | ||
101 | ## CC-BY-SA or LGPLv2: | |
102 | # units.scad | |
103 | ||
104 | ## CC-BY: | |
105 | # polyholes.scad | |
106 | # bitmap/alphabet_block.scad | |
107 | # bitmap/bitmap.scad | |
108 | # bitmap/height_map.scad | |
109 | # bitmap/name_tag.scad | |
110 | ||
111 | ## BSD | |
112 | # boxes.scad | |
113 | ||
114 | ## MIT | |
115 | # constants.scad | |
116 | # curves.scad | |
117 | # math.scad | |
118 | ||
119 | ## Public Domain | |
120 | # lego_compatibility.scad | |
121 | # trochoids.scad | |
122 | ||
123 | ############################################### | |
a4cd6760 AM |
124 | |
125 | %description | |
126 | OpenSCAD is a software for creating solid 3D CAD objects. Unlike most | |
127 | free software for creating 3D models (such as the famous application | |
128 | Blender) it does not focus on the artistic aspects of 3D modeling but | |
129 | instead on the CAD aspects. Thus it might be the application you are | |
130 | looking for when you are planning to create 3D models of machine parts | |
131 | but pretty sure is not what you are looking for when you are more | |
132 | interested in creating computer-animated movies. | |
133 | ||
cd307a29 | 134 | %package MCAD |
a4cd6760 AM |
135 | Summary: OpenSCAD Parametric CAD Library |
136 | License: LGPLv2+ and LGPLv2 and LGPLv3+ and (GPLv3 or LGPLv2) and (GPLv3+ or LGPLv2) and (CC-BY-SA or LGPLv2+) and (CC-BY-SA or LGPLv2) and CC-BY and BSD and MIT and Public Domain | |
137 | URL: https://www.github.com/openscad/MCAD | |
138 | Requires: %{name} = %{version}-%{release} | |
2d0b2699 | 139 | %if "%{_rpmversion}" >= "5" |
a4cd6760 | 140 | BuildArch: noarch |
2d0b2699 | 141 | %endif |
a4cd6760 AM |
142 | |
143 | %description MCAD | |
144 | This library contains components commonly used in designing and | |
145 | moching up mechanical designs. It is currently unfinished and you can | |
146 | expect some API changes, however many things are already working. | |
147 | ||
a4cd6760 | 148 | %prep |
9ef24798 | 149 | %setup -q |
a4cd6760 | 150 | %patch0 -p1 |
35570a78 | 151 | %patch1 -p1 |
a4cd6760 | 152 | |
2d0b2699 | 153 | # use system package |
35570a78 | 154 | rm -r src/ext/polyclipping |
a4cd6760 AM |
155 | |
156 | %build | |
9d3a487c | 157 | qmake-qt%{qtver} \ |
a4cd6760 AM |
158 | PREFIX=%{_prefix} |
159 | %{__make} | |
160 | ||
35570a78 | 161 | %if %{with tests} |
a4cd6760 AM |
162 | cd tests |
163 | install -d build | |
164 | cd build | |
2d0b2699 | 165 | %cmake .. |
a4cd6760 | 166 | %{__make} |
35570a78 JR |
167 | cd .. |
168 | ctest | |
169 | %endif | |
a4cd6760 AM |
170 | |
171 | %install | |
172 | rm -rf $RPM_BUILD_ROOT | |
a4cd6760 AM |
173 | %{__make} -j1 install \ |
174 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
175 | ||
35570a78 JR |
176 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/lgpl-2.1.txt |
177 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/README.markdown | |
178 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/TODO | |
179 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts | |
a4cd6760 | 180 | |
35570a78 | 181 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/{%{name},}/locale |
a4cd6760 | 182 | |
35570a78 | 183 | %find_lang %{name} |
a4cd6760 | 184 | |
2d0b2699 ER |
185 | %clean |
186 | rm -rf $RPM_BUILD_ROOT | |
187 | ||
a4cd6760 AM |
188 | %files -f %{name}.lang |
189 | %defattr(644,root,root,755) | |
35570a78 | 190 | %doc README.md RELEASE_NOTES.md |
a4cd6760 | 191 | %attr(755,root,root) %{_bindir}/%{name} |
35570a78 | 192 | %{_datadir}/metainfo/*.xml |
a4cd6760 AM |
193 | %{_desktopdir}/%{name}.desktop |
194 | %{_pixmapsdir}/%{name}.png | |
195 | %{_datadir}/mime/packages/%{name}.xml | |
196 | %dir %{_datadir}/%{name} | |
197 | %{_datadir}/%{name}/examples | |
198 | %{_datadir}/%{name}/color-schemes | |
a4cd6760 AM |
199 | %dir %{_datadir}/%{name}/libraries |
200 | %{_mandir}/man1/* | |
201 | ||
202 | %files MCAD | |
203 | %defattr(644,root,root,755) | |
204 | %doc libraries/MCAD/README.markdown libraries/MCAD/TODO | |
205 | %{_datadir}/%{name}/libraries/MCAD |