File: gwyddion.spec

package info (click to toggle)
gwyddion 2.47-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 38,180 kB
  • ctags: 37,276
  • sloc: ansic: 317,531; sh: 5,122; xml: 3,583; python: 3,067; makefile: 2,694; cpp: 2,550; pascal: 418; perl: 154; ruby: 130; sed: 17
file content (318 lines) | stat: -rw-r--r-- 9,659 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# @(#) $Id: gwyddion.spec.in 18763 2016-07-23 12:45:07Z yeti-dn $
%{expand:%global distro_is_redhat %(test ! -f /etc/redhat-release; echo $?)}
%{expand:%global distro_is_suse %(test ! -f /etc/SuSE-release; echo $?)}

Name:          gwyddion
Version:       2.47
Release:       1
Summary:       An SPM data visualization and analysis tool

Group:         Applications/Engineering
License:       GNU GPL
URL:           http://gwyddion.net/
Source0:       http://gwyddion.net/download/%{version}/%{name}-%{version}.tar.xz
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -un)
Requires(pre):    /sbin/ldconfig
Requires(postun): /sbin/ldconfig

BuildRequires: gcc-c++
BuildRequires: gtk2-devel >= 2.14
BuildRequires: glib2-devel >= 2.14
BuildRequires: pango-devel >= 1.10
BuildRequires: cairo-devel >= 1.6
BuildRequires: gtkglext-devel
BuildRequires: libxml2-devel
BuildRequires: zlib-devel
BuildRequires: libwebp-devel
BuildRequires: ruby >= 1.8
%if %{distro_is_redhat}
BuildRequires: rubypick
%endif
BuildRequires: gettext
BuildRequires: desktop-file-utils >= 0.9
BuildRequires: pkgconfig
BuildRequires: findutils

%if %{distro_is_redhat}
BuildRequires: libXmu-devel
BuildRequires: pygtk2-devel
BuildRequires: gtksourceview2-devel
# minizip would be nice to require everywhere but it does not seem available.
BuildRequires: minizip-devel
%define fftw3 fftw
%define fftw3devel fftw-devel
%define python2devel python2-devel
%define configureopts %{nil}
%endif

%if %{distro_is_suse}
BuildRequires: xorg-x11-Mesa-devel
BuildRequires: xorg-x11-libXmu-devel
BuildRequires: python-gtk-devel
BuildRequires: gtksourceview-devel
BuildRequires: libzip-devel
%define fftw3 fftw3
%define fftw3devel fftw3-devel
%define configureopts %{nil}
%endif

# Default the fftw package name to the common name in the hope the distro
# provides that.  The expansion inside %if is somehow limited, define the
# test in two steps.
%define fftwundefined %{?fftw3:0}%{!?fftw3:1}
%if %{fftwundefined}
%define fftw3 fftw
%define fftw3devel fftw-devel
%endif

# Ditto for the python development package.
%define python2undefined %{?python2devel:0}%{!?python2devel:1}
%if %{python2undefined}
%define python2devel python-devel
%endif

%ifarch %ix86
BuildRequires: %{fftw3devel} >= 3.0
%else
BuildRequires: %{fftw3devel} >= 3.1
%endif
BuildRequires: %{python2devel} >= 2.2
# Fedora guarantees these two, other may not
BuildRequires: perl >= 5.005
BuildRequires: sed

# The only packaged perl module is private, don't expose it.
%define __perl_provides %{nil}

%define pkglibdir %{_libdir}/%{name}
%define pkglibexecdir %{_libexecdir}/%{name}
%define pkgdatadir %{_datadir}/%{name}
%define pkgincludedir %{_includedir}/%{name}
%define gtkdocdir %{_datadir}/gtk-doc/html
%define gconfdir %{_sysconfdir}/gconf/schemas

# gconftool-2 is executed in a silly manner, make macros for that.
%define gconftool GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source) gconftool-2
%define schemas %{gconfdir}/gwyddion-thumbnailer.schemas


%package devel
Summary:       Headers, libraries and tools for Gwyddion module development
Group:         Development/Libraries
Requires:      %{name} = %{version}
# This pulls everything else
Requires:      gtk2-devel >= 2.8
Requires:      gtkglext-devel
Requires:      %{fftw3devel}
%if %{distro_is_redhat}
Requires:      perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:      python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
%endif


%package thumbnailer-gconf
Summary:         GConf schemas for gwyddion-thumbnailer integration
Group:           System Environment/Libraries
Requires:        %{name} = %{version}
Requires(pre):   GConf2
Requires(post):  GConf2
Requires(preun): GConf2


%description
Gwyddion is a modular SPM (Scanning Probe Microsopy) data visualization and
analysis tool written with Gtk+.

It can be used for all most frequently used data processing operations
including: leveling, false color plotting, shading, filtering, denoising, data
editing, integral transforms, grain analysis, profile extraction, fractal
analysis, and many more.  The program is primarily focused on SPM data analysis
(e.g. data obtained from AFM, STM, NSOM, and similar microscopes).  However, it
can also be used for analysis of SEM (Scanning Electron Microscopy) data or any
other 2D data.


%description devel
Header files, libraries and tools for Gwyddion module and plug-in development.
This package also contains the API docmentation and sample plug-ins in various
programming languages.


%description thumbnailer-gconf
GConf schemas that register gwyddion-thumbnailer as thumbnailer for SPM files
in GNOME and XFce.


%prep
%setup -q
# Don't install .la files.
sed -i -e '/# Install the pseudo-library/,/^$/d' ltmain.sh
# Replace universal /usr/bin/env shbang with the real thing.
sed -i -e '1s/env *//' plugins/process/*.{py,rb,pl}


%build
%configure %configureopts --without-pascal --disable-rpath \
           --without-kde4-thumbnailer
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# Install the icon to the hicolor theme *and* to /usr/share/pixmaps because
# some distros expect it in one place, some in another.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
%find_lang %{name}

# Get rid of .la files if some silly distros (hello Mandriva) overwrote our
# fixed libtool with some crap.
find $RPM_BUILD_ROOT -name \*.la -print0 | xargs -0 rm -f

# I cannot express this as %%files in a sensible manner, especially not when
# python byte-compilation kicks in.  Set permissions in the filesystem.
find $RPM_BUILD_ROOT%{pkglibexecdir} -type f -print0 | xargs -0 chmod 755
find $RPM_BUILD_ROOT%{pkglibexecdir} -type f -name \*.rgi -print0 | xargs -0 chmod 644

# Perl, Python, and Ruby modules are private, remove the Perl man page.
rm -f $RPM_BUILD_ROOT%{_mandir}/man3/Gwyddion::dump.*


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
update-mime-database %{_datadir}/mime &>/dev/null || :
update-desktop-database &>/dev/null || :


%postun
/sbin/ldconfig
update-mime-database %{_datadir}/mime &>/dev/null || :
update-desktop-database &>/dev/null || :


%pre thumbnailer-gconf
if [ "$1" -gt 1 ]; then
    %{gconftool} --makefile-uninstall-rule %{schemas} >/dev/null || :
fi


%post thumbnailer-gconf
%{gconftool} --makefile-install-rule %{schemas} >/dev/null || :


%preun thumbnailer-gconf
if [ "$1" -eq 0 ]; then
    %{gconftool} --makefile-uninstall-rule %{schemas} >/dev/null || :
fi


%files -f %{name}.lang
%defattr(755,root,root)
%{_bindir}/%{name}
%{_bindir}/%{name}-thumbnailer
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL.%{name} NEWS README THANKS
%{pkgdatadir}/pixmaps/*.png
%{pkgdatadir}/pixmaps/*.ico
%{pkgdatadir}/gradients/*
%{pkgdatadir}/glmaterials/*
%{pkgdatadir}/pygwy/*
%{pkgdatadir}/ui/*
%{pkgdatadir}/user-guide-modules
%dir %{pkgdatadir}/pixmaps
%dir %{pkgdatadir}/gradients
%dir %{pkgdatadir}/glmaterials
%dir %{pkgdatadir}/pygwy
%dir %{pkgdatadir}/ui
%dir %{pkgdatadir}
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/%{name}-thumbnailer.1*
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/pixmaps/%{name}.png
%{pkglibdir}/modules/file/*.so
%{pkglibdir}/modules/graph/*.so
%{pkglibdir}/modules/layer/*.so
%{pkglibdir}/modules/process/*.so
%{pkglibdir}/modules/tool/*.so
%{pkglibdir}/modules/volume/*.so
%{pkglibdir}/modules/xyz/*.so
%{pkglibdir}/modules/*.so
%dir %{pkglibdir}/modules/file
%dir %{pkglibdir}/modules/graph
%dir %{pkglibdir}/modules/layer
%dir %{pkglibdir}/modules/process
%dir %{pkglibdir}/modules/tool
%dir %{pkglibdir}/modules/volume
%dir %{pkglibdir}/modules/xyz
%dir %{pkglibdir}/modules
%dir %{pkglibdir}
%{_libdir}/*.so.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/thumbnailers/%{name}.thumbnailer
%{_datadir}/gtksourceview-2.0/language-specs/pygwy.lang

%files devel
%defattr(-,root,root)
%doc devel-docs/CODING-STANDARDS
%doc data/%{name}.vim
%{pkgincludedir}/app/*.h
%{pkgincludedir}/libdraw/*.h
%{pkgincludedir}/libprocess/*.h
%{pkgincludedir}/libgwyddion/*.h
%{pkgincludedir}/libgwydgets/*.h
%{pkgincludedir}/libgwymodule/*.h
%dir %{pkgincludedir}/app
%dir %{pkgincludedir}/libdraw
%dir %{pkgincludedir}/libprocess
%dir %{pkgincludedir}/libgwyddion
%dir %{pkgincludedir}/libgwydgets
%dir %{pkgincludedir}/libgwymodule
%dir %{pkgincludedir}
%{_libdir}/*.so
%{python_sitearch}/gwy.so
%{_libdir}/pkgconfig/gwyddion.pc
%dir %{_libdir}/pkgconfig
# Documentation
%doc %{gtkdocdir}/libgwyapp/*
%doc %{gtkdocdir}/libgwydraw/*
%doc %{gtkdocdir}/libgwyprocess/*
%doc %{gtkdocdir}/libgwyddion/*
%doc %{gtkdocdir}/libgwydgets/*
%doc %{gtkdocdir}/libgwymodule/*
%doc %dir %{gtkdocdir}/libgwyapp
%doc %dir %{gtkdocdir}/libgwydraw
%doc %dir %{gtkdocdir}/libgwyprocess
%doc %dir %{gtkdocdir}/libgwyddion
%doc %dir %{gtkdocdir}/libgwydgets
%doc %dir %{gtkdocdir}/libgwymodule
%doc %dir %{gtkdocdir}
%doc %dir %{_datadir}/gtk-doc
%{pkglibdir}/include/gwyconfig.h
%dir %{pkglibdir}/include
# Plug-ins and plug-in devel stuff
%{pkglibdir}/perl/Gwyddion/*
%dir %{pkglibdir}/perl/Gwyddion
%dir %{pkglibdir}/perl
%{pkglibdir}/python/Gwyddion/*
%dir %{pkglibdir}/python/Gwyddion
%dir %{pkglibdir}/python
%{pkglibdir}/ruby/gwyddion/*
%dir %{pkglibdir}/ruby/gwyddion
%dir %{pkglibdir}/ruby
# Use filesystem permissions here.
%defattr(-,root,root,755)
%{pkglibexecdir}/plugins/file/*
%{pkglibexecdir}/plugins/process/*
%dir %{pkglibexecdir}/plugins/file
%dir %{pkglibexecdir}/plugins/process
%dir %{pkglibexecdir}/plugins
%dir %{pkglibexecdir}

%files thumbnailer-gconf
%{gconfdir}/*.schemas