-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathseagate_ilm.spec.in
127 lines (98 loc) · 2.65 KB
/
seagate_ilm.spec.in
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
Summary: A lock manager based on Seagate In-Drive-Mutex (IDM)
Name: seagate_ilm
Epoch: 1
Version: @VERSION@
Release: @RELEASE@%{?dist}
License: LGPL-2.1-only
Group: System/Base
URL: http://github.com/Seagate/propeller
Source0: seagate_ilm.%{version}.tgz
BuildRequires: libuuid-devel
BuildRequires: libblkid-devel
BuildRequires: systemd-devel
%if 0%{?suse_version}
BuildRequires: libblkid1
BuildRequires: libudev-devel
BuildRequires: systemd
%endif
%if 0%{?rhel} || 0%{?rocky}
BuildRequires: libblkid
%endif
%if 0%{?rhel} == 8
BuildRequires: python3-pytest
BuildRequires: python36-devel
BuildRequires: swig
%endif
%if 0%{?rocky} == 8
BuildRequires: python3-pytest
%endif
%if 0%{?rocky} != 8 && 0%{?rhel} != 8
BuildRequires: python-devel
BuildRequires: swig
%endif
%description
The Seagate IDM Lock Manager (ILM) manages lease for the host using the mutexes that exist in the drive.
%prep
%setup -q -n seagate_ilm.%{version}
%build
make %{?_smp_mflags} V=1
%install
make install DESTDIR=$RPM_BUILD_ROOT V=1
%if 0%{?suse_version}
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcseagate_ilm
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%pre
/bin/echo "Installing Seagate IDM Lock Manager...."
#%service_add_pre seagate_ilm.service
%post
/sbin/ldconfig
#%systemd_post seagate_ilm.service
#%service_add_post seagate_ilm.service
%if 0%{?rhel} || 0%{?rocky}
if [ "$1" = "1" ] ; then
#enable and start seagate_ilm.service on completely new installation only, not on upgrades
systemctl enable seagate_ilm.service
systemctl start seagate_ilm.service
fi
%endif
/bin/echo "Install Complete."
%preun
#%service_del_preun seagate_ilm.service
#%systemd_preun seagate_ilm.service
/bin/echo "Uninstalling Seagate IDM Lock Manager...."
systemctl stop seagate_ilm.service
systemctl disable seagate_ilm.service
%postun
/sbin/ldconfig
#%service_del_postun seagate_ilm.service
#%systemd_postun seagate_ilm.service
/bin/echo "Uninstall Complete."
%files
%defattr(-,root,root,755)
%doc README.md
%{_sbindir}/seagate_ilm
%{_unitdir}/seagate_ilm.service
%{_sysconfdir}/logrotate.d/seagate_ilm
%if 0%{?suse_version}
%{_sbindir}/rcseagate_ilm
%endif
#Library and Development subpackages
%package devel
Summary: Development libraries and headers
Group: Development/Libraries/Other
License: LGPL-2.1-only
Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel
This package contains files needed to develop applications that use the seagate_ilm libraries.
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%files devel
%defattr(444,root,root,-)
%{_libdir}/pkgconfig
%{_includedir}/ilm.h
%{_libdir}/libseagate_ilm.so
%{_libdir}/libseagate_ilm.so.0
%{_libdir}/libseagate_ilm.so.0.1
%changelog