]> git.pld-linux.org Git - packages/openscad.git/blob - openscad.spec
fa962c34d0d7e37ef22dfa13b3e8271933e2dea0
[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 Summary:        The Programmers Solid 3D CAD Modeller
9 Name:           openscad
10 Version:        2019.05
11 Release:        0.1
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
17 Source0:        http://files.openscad.org/%{name}-%{version}.src.tar.gz
18 # Source0-md5:  2b63e249d56e2eba62ed5b042e1d82bc
19 Patch0:         %{name}-polyclipping.patch
20 Patch1:         localedir.patch
21 URL:            http://www.openscad.org/
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
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
53 BuildRequires:  qscintilla2-qt%{qtver}-devel
54 BuildRequires:  qt%{qtver}-build >= 4.4
55 BuildRequires:  xorg-xserver-Xvfb
56 Requires:       font(liberationmono)
57 Requires:       font(liberationsans)
58 Requires:       font(liberationserif)
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 ###############################################
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
134 %package MCAD
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}
139 %if "%{_rpmversion}" >= "5"
140 BuildArch:      noarch
141 %endif
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
148 %prep
149 %setup -q
150 %patch0 -p1
151 %patch1 -p1
152
153 # use system package
154 rm -r src/ext/polyclipping
155
156 %build
157 qmake-qt%{qtver} \
158         PREFIX=%{_prefix}
159 %{__make}
160
161 %if %{with tests}
162 cd tests
163 install -d build
164 cd build
165 %cmake ..
166 %{__make}
167 cd ..
168 ctest
169 %endif
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173 %{__make} -j1 install \
174         INSTALL_ROOT=$RPM_BUILD_ROOT
175
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
180
181 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{%{name},}/locale
182
183 %find_lang %{name}
184
185 %clean
186 rm -rf $RPM_BUILD_ROOT
187
188 %files -f %{name}.lang
189 %defattr(644,root,root,755)
190 %doc README.md RELEASE_NOTES.md
191 %attr(755,root,root) %{_bindir}/%{name}
192 %{_datadir}/metainfo/*.xml
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
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
This page took 0.098871 seconds and 2 git commands to generate.