]>
Commit | Line | Data |
---|---|---|
1 | Summary: General-purpose distributed lock manager | |
2 | Summary(pl.UTF-8): Zarządca rozproszonych blokad ogólnego przeznaczenia | |
3 | Name: dlm | |
4 | Version: 4.0.9 | |
5 | Release: 1 | |
6 | License: LGPL v2.1+, GPL v2 | |
7 | Group: Libraries | |
8 | Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz | |
9 | # Source0-md5: b05551993126679926a432ea5bdf9689 | |
10 | Source1: %{name}.init | |
11 | Source2: %{name}.sysconfig | |
12 | Source3: %{name}.tmpfiles | |
13 | Source4: %{name}.conf | |
14 | Patch0: old_udev_dir.patch | |
15 | URL: http://www.sourceware.org/cluster/dlm/ | |
16 | BuildRequires: corosync-devel >= 2.0 | |
17 | BuildRequires: libxml2-devel >= 2.0 | |
18 | BuildRequires: pacemaker-devel >= 1.1 | |
19 | BuildRequires: pkgconfig | |
20 | BuildRequires: rpmbuild(macros) >= 1.644 | |
21 | BuildRequires: systemd-devel | |
22 | Requires: %{name}-libs = %{version}-%{release} | |
23 | Requires: rc-scripts | |
24 | Requires: systemd-units >= 208-8 | |
25 | Requires(post,preun): /sbin/chkconfig | |
26 | Obsoletes: cluster-dlm | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | The DLM lock manager is a kernel-based VMS-like distributed lock | |
31 | manager. It is general purpose and not specific to only GFS or CLVM. | |
32 | Kernel and userspace locking API's are available. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad | |
36 | w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla | |
37 | GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni | |
38 | użytkownika. | |
39 | ||
40 | %package libs | |
41 | Summary: DLM libraries | |
42 | Summary(pl.UTF-8): Biblioteki DLM | |
43 | Group: Libraries | |
44 | Obsoletes: cluster-dlm-libs | |
45 | ||
46 | %description libs | |
47 | DLM libraries. | |
48 | ||
49 | %description libs -l pl.UTF-8 | |
50 | Biblioteki DLM. | |
51 | ||
52 | %package devel | |
53 | Summary: Header files and development documentation for DLM | |
54 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a | |
55 | Group: Development/Libraries | |
56 | Requires: %{name}-libs = %{version}-%{release} | |
57 | Obsoletes: cluster-dlm-devel | |
58 | ||
59 | %description devel | |
60 | Header files and development documentation for DLM. | |
61 | ||
62 | %description devel -l pl.UTF-8 | |
63 | Pliki nagłówkowe i dokumentacja programisty dla DLM-a. | |
64 | ||
65 | %prep | |
66 | %setup -q | |
67 | %patch0 -p1 | |
68 | ||
69 | %if "%{cc_version}" < "8" | |
70 | %{__sed} -i -e 's/-fstack-clash-protection//' {dlm_controld,dlm_tool,fence,libdlm}/Makefile | |
71 | %endif | |
72 | ||
73 | %build | |
74 | %{__make} \ | |
75 | PREFIX=%{_prefix} \ | |
76 | LIBNUM=%{_lib} \ | |
77 | BINDIR=%{_sbindir} \ | |
78 | LIBDIR=%{_libdir} \ | |
79 | MANDIR=%{_mandir} \ | |
80 | HDRDIR=%{_includedir} \ | |
81 | CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}" | |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \ | |
86 | $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \ | |
87 | $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}} | |
88 | ||
89 | %{__make} install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT \ | |
91 | PREFIX=%{_prefix} \ | |
92 | LIBNUM=%{_lib} \ | |
93 | BINDIR=%{_sbindir} \ | |
94 | LIBDIR=%{_libdir} \ | |
95 | MANDIR=%{_mandir} \ | |
96 | HDRDIR=%{_includedir} | |
97 | ||
98 | cp -p init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir} | |
99 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
100 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
101 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
102 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf | |
103 | ||
104 | %clean | |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
107 | %post | |
108 | /sbin/chkconfig --add %{name} | |
109 | %service %{name} restart | |
110 | %systemd_post %{name}.service | |
111 | ||
112 | %preun | |
113 | if [ "$1" = "0" ]; then | |
114 | %service -q %{name} stop | |
115 | /sbin/chkconfig --del %{name} | |
116 | fi | |
117 | %systemd_preun %{name}.service | |
118 | ||
119 | %postun | |
120 | %systemd_reload | |
121 | ||
122 | %post libs -p /sbin/ldconfig | |
123 | %postun libs -p /sbin/ldconfig | |
124 | ||
125 | %files | |
126 | %defattr(644,root,root,755) | |
127 | %doc README.license | |
128 | %attr(755,root,root) %{_sbindir}/dlm_controld | |
129 | %attr(755,root,root) %{_sbindir}/dlm_stonith | |
130 | %attr(755,root,root) %{_sbindir}/dlm_tool | |
131 | %dir %{_sysconfdir}/%{name} | |
132 | %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf | |
133 | /lib/udev/rules.d/51-dlm.rules | |
134 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
135 | %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name} | |
136 | %{_mandir}/man8/dlm_*.8* | |
137 | %{_mandir}/man5/dlm.conf.5* | |
138 | %{systemdunitdir}/%{name}.service | |
139 | %{systemdtmpfilesdir}/%{name}.conf | |
140 | %dir /var/run/dlm | |
141 | ||
142 | %files libs | |
143 | %defattr(644,root,root,755) | |
144 | %attr(755,root,root) %{_libdir}/libdlm.so.3.* | |
145 | %attr(755,root,root) %ghost %{_libdir}/libdlm.so.3 | |
146 | %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.* | |
147 | %attr(755,root,root) %ghost %{_libdir}/libdlm_lt.so.3 | |
148 | %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.* | |
149 | %attr(755,root,root) %ghost %{_libdir}/libdlmcontrol.so.3 | |
150 | ||
151 | %files devel | |
152 | %defattr(644,root,root,755) | |
153 | %attr(755,root,root) %{_libdir}/libdlm.so | |
154 | %attr(755,root,root) %{_libdir}/libdlm_lt.so | |
155 | %attr(755,root,root) %{_libdir}/libdlmcontrol.so | |
156 | %{_includedir}/libdlm.h | |
157 | %{_includedir}/libdlmcontrol.h | |
158 | %{_pkgconfigdir}/libdlm.pc | |
159 | %{_pkgconfigdir}/libdlm_lt.pc | |
160 | %{_pkgconfigdir}/libdlmcontrol.pc | |
161 | %{_mandir}/man3/dlm_*.3* | |
162 | %{_mandir}/man3/libdlm.3* |