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