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