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