]> git.pld-linux.org Git - packages/meshlab.git/blob - meshlab.spec
cleanup, simplify, move patch comments inside patches
[packages/meshlab.git] / meshlab.spec
1 Summary:        A system for processing and editing unstructured 3D triangular meshes
2 Name:           meshlab
3 Version:        1.3.2
4 Release:        0.1
5 License:        GPL v2+ and BSD and Public Domain
6 Group:          Applications/Multimedia
7 URL:            http://meshlab.sourceforge.net/
8 Source0:        http://downloads.sourceforge.net/meshlab/MeshLabSrc_AllInc_v132.tgz
9 # Source0-md5:  3cba61f6d34559f98129d9d0a3126f81
10 Source1:        %{name}-48x48.xpm
11 # Meshlab v131 tarball is missing the docs directory. Reported upstream,
12 # but for now we'll extract them from the v122 tarball.
13 Source2:        http://downloads.sourceforge.net/meshlab/MeshLabSrc_v122.tar.gz
14 # Source2-md5:  f06107dd01cbe0d6519dbb759ae84c11
15 Patch0:         %{name}-1.3.2-sharedlib.patch
16 Patch1:         %{name}-1.3.2-plugin-path.patch
17 Patch2:         %{name}-1.3.2-shader-path.patch
18 Patch3:         %{name}-1.3.2-cstddef.patch
19 Patch4:         %{name}-1.3.1-ply-numeric.patch
20 Patch5:         %{name}-1.3.1-glu.patch
21 Patch6:         %{name}-1.3.2-noctm.patch
22 Patch9:         %{name}-1.3.2-vert-swap.patch
23 Patch10:        %{name}-1.3.2-gcc47.patch
24 Patch11:        %{name}-1.3.2-include-path-double-slash.patch
25 BuildRequires:  ImageMagick
26 BuildRequires:  bzip2-devel
27 BuildRequires:  chrpath
28 BuildRequires:  desktop-file-utils
29 BuildRequires:  glew-devel
30 BuildRequires:  levmar-devel
31 BuildRequires:  lib3ds-devel
32 BuildRequires:  muparser-devel
33 BuildRequires:  qhull-devel
34 BuildRequires:  qt-devel
35 BuildRequires:  qtsoap-devel
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 MeshLab is an open source, portable, and extensible system for the
40 processing and editing of unstructured 3D triangular meshes. The
41 system is aimed to help the processing of the typical not-so-small
42 unstructured models arising in 3D scanning, providing a set of tools
43 for editing, cleaning, healing, inspecting, rendering and converting
44 these kinds of meshes.
45
46 %prep
47 %setup -q -c %{name}-%{version}
48
49 # get the missing docs directory from the old tarball
50 %setup -q -T -D -a 2
51
52 mv meshlab-snapshot-svn3524/meshlab/docs meshlab/docs
53 rm -rf meshlab-snapshot-svn3524
54
55 %patch0 -P 0 -p1
56 %patch0 -P 1 -p1
57 %patch0 -P 2 -p1
58 %patch0 -P 3 -p1
59 %patch0 -P 4 -p1
60 %patch0 -P 5 -p1
61 %patch0 -P 6 -p1
62 %patch0 -P 9 -p1
63 %patch0 -P 10 -p1
64 %patch0 -P 11 -p1
65
66 # Turn of execute permissions on source files to avoid rpmlint
67 # errors and warnings for the debuginfo package
68 find . \( -name *.h -o -name *.cpp -o -name *.inl \) -a -executable \
69         -exec chmod -x {} \;
70
71 # Remove bundled library sources, since we use the Fedora packaged libraries
72 rm -rf vcglib/wrap/system
73 rm -rf meshlab/src/external/{ann*,bzip2*,glew*,levmar*,lib3ds*,muparser*,ode*,qhull*,qtsoap*}
74
75 %build
76 # Build instructions from the wiki:
77 #   http://meshlab.sourceforge.net/wiki/index.php/Compiling_V122
78 # Note that the build instructions in README.linux are out of date.
79
80 cd meshlab/src/external
81 qmake-qt4 -recursive external.pro
82 # Note: -fPIC added to make jhead link properly; don't know why this wasn't
83 # also an issue with structuresynth
84 %{__make} \
85         CFLAGS="%{optflags} -fPIC"
86 cd ..
87 qmake-qt4 -recursive meshlab_full.pro
88 %{__make} \
89         CFLAGS="%{optflags}" \
90         DEFINES="-D__DISABLE_AUTO_STATS__ -DPLUGIN_DIR=\\\"%{_libdir}/%{name}\\\""
91
92 # process icon
93 convert %{SOURCE1} meshlab.png
94
95 # create desktop file
96 cat <<EOF >meshlab.desktop
97 [Desktop Entry]
98 Name=meshlab
99 GenericName=MeshLab 3D triangular mesh processing and editing
100 Exec=meshlab
101 Icon=meshlab
102 Terminal=false
103 Type=Application
104 Categories=Graphics;
105 EOF
106
107 # convert doc files from ISO-8859-1 to UTF-8 encoding:
108 cd ../docs
109 for f in contrib_Gangemi_Vannini.txt contrib_Buzzelli_Mazzanti.txt; do
110         iconv -fiso88591 -tutf8 $f >$f.new
111         touch -r $f $f.new
112         mv $f.new $f
113 done
114
115 # The QMAKE_RPATHDIR stuff puts in the path to the compile-time location
116 # of libcommon, which won't work at runtime, so we change the rpath here.
117 # The use of rpath will cause an rpmlint error, but the Fedora Packaging
118 # Guidelines specifically allow use of an rpath for internal libraries:
119 # http://fedoraproject.org/wiki/Packaging:Guidelines#Rpath_for_Internal_Libraries
120 # Ideally upstream would rename the library to libmeshlab, libmeshlabcommon,
121 # or the like, so that we could put it in the system library directory
122 # and avoid rpath entirely.
123 chrpath -r %{_libdir}/meshlab meshlab/src/distrib/{meshlab,meshlabserver}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}} \
128         $RPM_BUILD_ROOT%{_libdir}/meshlab/plugins \
129         $RPM_BUILD_ROOT%{_datadir}/meshlab/{shaders/shadersrm,textures}
130
131 cd meshlab
132
133 install -p src/distrib/{meshlab,meshlabserver} $RPM_BUILD_ROOT%{_bindir}
134 cp -p docs/{meshlab.1,meshlabserver.1} $RPM_BUILD_ROOT%{_mandir}/man1
135
136 install -p src/distrib/libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab
137 ln -s libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab/libcommon.so.1.0
138 ln -s libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab/libcommon.so.1
139 ln -s libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab/libcommon.so
140
141 install -p src/distrib/plugins/*.so $RPM_BUILD_ROOT%{_libdir}/meshlab/plugins
142 cp -p src/distrib/shaders/*.{frag,gdp,vert} $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders
143 cp -p src/distrib/shaders/shadersrm/*.rfx $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders/shadersrm
144 cp -p src/meshlab.png $RPM_BUILD_ROOT%{_pixmapsdir}
145 cp -p src/meshlab.desktop $RPM_BUILD_ROOT%{_desktopdir}
146 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/meshlab.desktop
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post   -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
153
154 %files
155 %defattr(644,root,root,755)
156 %doc meshlab/docs/contrib_Buzzelli_Mazzanti.txt
157 %doc meshlab/docs/contrib_Gangemi_Vannini.txt
158 %doc meshlab/docs/contrib_Latronico_Venturi.txt
159 %doc meshlab/docs/contrib_Mochi_Portelli_Vacca.txt
160 %doc meshlab/docs/gpl.txt
161 %doc meshlab/docs/history.txt
162 %doc meshlab/docs/privacy.txt
163 %doc meshlab/docs/README.linux
164 %doc meshlab/docs/readme.txt
165 %doc meshlab/docs/ToDo.txt
166 %doc meshlab/src/distrib/shaders/3Dlabs-license.txt
167 %doc meshlab/src/distrib/shaders/LightworkDesign-license.txt
168 %doc meshlab/src/meshlabplugins/filter_poisson/license.txt
169 %attr(755,root,root) %{_bindir}/meshlab
170 %attr(755,root,root) %{_bindir}/meshlabserver
171 %{_libdir}/meshlab
172 %{_datadir}/meshlab
173 %{_mandir}/man1/*.1*
174 %{_desktopdir}/meshlab.desktop
175 %{_pixmapsdir}/meshlab.png
This page took 0.096161 seconds and 3 git commands to generate.