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