-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhdfview.spec
61 lines (46 loc) · 1.86 KB
/
hdfview.spec
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
Name: hdfview
Version: 2.14
Release: 1%{?dist}
Summary: HDFView is a visual tool written in Java for browsing and editing HDF files
#Group:
License: Copyright 2006-2017 by The HDF Group
URL: https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-%{version}/bin/HDFView-%{version}-centos6_64.tar.gz
Source0: HDFView-%{version}-centos6_64.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires: java >= 1:1.7.0
%define __jar_repack %{nil}
%description
HDFView is a visual tool written in Java for browsing and editing HDF (HDF5 and HDF4) files. Using HDFView, you can:
* View a file hierarchy in a tree structure
* Create new files, add or delete groups and datasets
* View and modify the content of a dataset
* Add, delete and modify attributes
HDFView uses the Java HDF Object Package, which implements HDF4 and HDF5 data objects in an object-oriented form.
%prep
%setup -q -c
%build
mkdir -p %{name}
offset=`grep -m 1 -a gunzip HDFView-%{version}*-Linux.sh | cut -d ' ' -f 3`
tail -n $offset HDFView-%{version}*-Linux.sh | tar -zxpf - --exclude=jre --strip-components=2 -C %{name}
sed -i "s|@JAVABIN@|/usr/bin|" %{name}/%{name}.sh
sed -i "s|@INSTALLDIR@|/opt/%{name}|" %{name}/%{name}.sh
%install
#sh -x ./HDFView-3.0.0-Linux.sh --skip-license --exclude-subdir --prefix=$RPM_BUILD_ROOT/opt
mkdir -p $RPM_BUILD_ROOT/opt
tar -cf - %{name} | tar -xpf - -C $RPM_BUILD_ROOT/opt
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
ln -s /opt/%{name}/%{name}.sh $RPM_BUILD_ROOT/%{_bindir}/%{name}
%files
%defattr(-,root,root
%doc README.txt
%doc COPYING
%doc /opt/%{name}/share/doc
%doc /opt/%{name}/share/samples
%attr(755,root,root) /opt/%{name}/%{name}.sh
%dir /opt/%{name}/lib
%attr(755,root,root) /opt/%{name}/lib/*.so
/opt/%{name}/lib/*.jar
%{_bindir}/%{name}
%changelog
* Wed Nov 08 2017 James E. Flemer <james.flemer@ndpgroup.com> - 2.14-1
- Initial spec