File: gwyddion.spec

package info (click to toggle)
gwyddion 2.57-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 48,860 kB
  • sloc: ansic: 405,916; python: 7,867; sh: 5,241; makefile: 4,507; xml: 3,786; cpp: 2,572; pascal: 418; perl: 154; ruby: 130
file content (285 lines) | stat: -rw-r--r-- 8,428 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
# $Id: gwyddion.spec.in 22706 2020-01-15 15:41:33Z yeti-dn $
Name:          gwyddion
Version:       2.57
Release:       1%{?dist}
Summary:       An SPM data visualization and analysis tool

Group:         Applications/Engineering
License:       GPLv2+
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
BuildRequires: gcc-c++
BuildRequires: pkgconfig(gtk+-2.0) >= 2.14
BuildRequires: pkgconfig(glib-2.0) >= 2.14
BuildRequires: pkgconfig(pango) >= 1.12
BuildRequires: pkgconfig(cairo) >= 1.6
BuildRequires: pkgconfig(fftw3) >= 3.1
BuildRequires: pkgconfig(gtkglext-1.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: zlib-devel
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(OpenEXR)
BuildRequires: pkgconfig(cfitsio)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(unique-1.0)
BuildRequires: gettext
BuildRequires: desktop-file-utils >= 0.9
BuildRequires: findutils
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(gtksourceview-2.0)
BuildRequires: pkgconfig(minizip)
BuildRequires: sed

%if 0%{?suse_version}
BuildRequires: pkg-config
%else
BuildRequires: pkgconfig
%endif

# __brp_python_bytecompile is for F27 and older
# __python redefinition for 28
# _python_bytecompile_extra for 29
# Since it is a mess which changes with every version, just try to disable
# byte compilation.
BuildRequires: perl >= 5.005
%if 0%{?fedora}
BuildRequires: perl-podlators
BuildRequires: rubypick
%global _python_bytecompile_extra 0
%global __python %{__python2}
%undefine __brp_python_bytecompile
%endif
%if 0%{?rhel}
BuildRequires: perl-podlators
BuildRequires: rubypick
%global __python %{__python2}
%undefine __brp_python_bytecompile
%endif

%if 0%{?fedora} >= 26
%define python2 python2
%else
%define python2 python
%endif
BuildRequires: %{python2}
BuildRequires: %{python2}-devel >= 2.7

%if 0%{?fedora}
BuildRequires: pygtk2-devel >= 2.10
BuildRequires: ruby(release) >= 1.8
%endif
%if 0%{?rhel}
BuildRequires: pygtk2-devel >= 2.10
BuildRequires: ruby(release) >= 1.8
%endif
%if 0%{?suse_version}
BuildRequires: python-gtk-devel >= 2.10
%endif
# otherwise...?

%define configureopts %{nil}

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

%define pkglibdir %{_libdir}/%{name}
%define pkgdocdir %{_docdir}/%{name}
%define pkgdatadir %{_datadir}/%{name}
%define pkgincludedir %{_includedir}/%{name}
%if 0%{?suse_version}
%define docdirconfigurearg --docdir=%{pkgdocdir}
%else
%define docdirconfigurearg %{nil}
%endif
%define gtkdocdir %{_datadir}/gtk-doc/html


%package devel
Summary:       Headers, libraries and tools for Gwyddion module development
Group:         Development/Libraries
Requires:      %{name}%{?_isa} = %{version}
# This pulls everything else
Requires:      gtk2-devel%{?_isa} >= 2.8
Requires:      gtkglext-devel%{?_isa}
Requires:      perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:      python(abi) = 2.7


%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.


%prep
%setup -q
# Don't install .la files.
sed -i -e '/# Install the pseudo-library/,/^$/d' ltmain.sh


%build
%configure %configureopts %docdirconfigurearg --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

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

# Byte-compile things that are meaningful to import.
# This requires F28+ and python3-devel?  Fuck it then.
##if 0##{?fedora}
##py_byte_compile ##{__python2} $RPM_BUILD_ROOT##{pkglibdir}/python/Gwyddion
##py_byte_compile ##{__python2} $RPM_BUILD_ROOT##{pkgdatadir}/pygwy
#endif

%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 || :


%files -f %{name}.lang
%defattr(755,root,root)
%{_bindir}/%{name}
%{_bindir}/%{name}-thumbnailer
%defattr(-,root,root)
%doc AUTHORS COPYING 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
%{_datadir}/metainfo/net.gwyddion.Gwyddion.appdata.xml
%{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)
%{pkgdocdir}/plugins/*
%dir %{pkgdocdir}/plugins
%dir %{pkgdocdir}

%changelog
* Tue Aug  8 2017 Yeti <yeti@gwyddion.net> - 2.57-1
- hello rpmlint, this package is partially generated