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