]>
Commit | Line | Data |
---|---|---|
a2f4ba26 JB |
1 | # TODO: fix & PLDify init scripts (currently bash scripts with /bin/sh shebang) |
2 | Summary: Shared storage lock manager | |
3 | Summary(pl.UTF-8): Zarządca blokad dla współdzielonego składowania danych | |
4 | Name: sanlock | |
c195fee2 | 5 | Version: 2.0 |
a2f4ba26 JB |
6 | Release: 0.1 |
7 | License: LGPL v2+ (libsanlock_client, libwdmd), GPL v2 (libsanlock, utilities) | |
8 | Group: Networking | |
9 | Source0: https://fedorahosted.org/releases/s/a/sanlock/%{name}-%{version}.tar.gz | |
c195fee2 JB |
10 | # Source0-md5: 46fcb4be2aea8e5515d1f8ee86c68e13 |
11 | Patch0: %{name}-link.patch | |
a2f4ba26 JB |
12 | URL: https://fedorahosted.org/sanlock/ |
13 | BuildRequires: gcc >= 5:3.4 | |
14 | BuildRequires: libaio-devel | |
15 | BuildRequires: libblkid-devel | |
16 | BuildRequires: libuuid-devel | |
17 | BuildRequires: python-devel | |
18 | Requires: %{name}-libs = %{version}-%{release} | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
22 | Shared storage lock manager. | |
23 | ||
24 | %description -l pl.UTF-8 | |
25 | Zarządca blokad dla współdzielonego składowania danych. | |
26 | ||
27 | %package libs | |
28 | Summary: Sanlock libraries | |
29 | Summary(pl.UTF-8): Biblioteki sanlock | |
30 | Group: Libraries | |
31 | ||
32 | %description libs | |
33 | Sanlock libraries. | |
34 | ||
35 | %description libs -l pl.UTF-8 | |
36 | Biblioteki sanlock. | |
37 | ||
38 | %package devel | |
39 | Summary: Header files for sanlock libraries | |
40 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek sanlock | |
41 | Group: Development/Libraries | |
42 | Requires: %{name}-libs = %{version}-%{release} | |
43 | ||
44 | %description devel | |
45 | Header files for sanlock libraries. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe bibliotek sanlock. | |
49 | ||
50 | %package -n python-sanlock | |
51 | Summary: Python binding for sanlock library | |
52 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki sanlock | |
53 | Group: Libraries/Python | |
54 | Requires: %{name}-libs = %{version}-%{release} | |
55 | ||
56 | %description -n python-sanlock | |
57 | Python binding for sanlock library. | |
58 | ||
59 | %description -n python-sanlock -l pl.UTF-8 | |
60 | Wiązanie Pythona do biblioteki sanlock. | |
61 | ||
62 | %prep | |
63 | %setup -q | |
c195fee2 | 64 | %patch0 -p1 |
a2f4ba26 JB |
65 | |
66 | %build | |
67 | export CFLAGS="%{rpmcflags}" | |
68 | ||
69 | CMD_LDFLAGS="%{rpmldflags}" \ | |
70 | LIB_LDFLAGS="%{rpmldflags}" \ | |
71 | %{__make} -C wdmd \ | |
72 | CC="%{__cc}" | |
73 | ||
74 | CMD_LDFLAGS="%{rpmldflags}" \ | |
75 | LIB_CLIENT_LDFLAGS="%{rpmldflags}" \ | |
76 | LIB_ENTIRE_LDFLAGS="%{rpmldflags}" \ | |
77 | %{__make} -C src \ | |
78 | CC="%{__cc}" | |
79 | ||
80 | %{__make} -C python | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %{__make} -C wdmd install \ | |
86 | DESTDIR=$RPM_BUILD_ROOT \ | |
87 | LIBDIR=%{_libdir} | |
88 | ||
89 | %{__make} -C src install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT \ | |
91 | LIBDIR=%{_libdir} | |
92 | ||
93 | %{__make} -C python install \ | |
94 | DESTDIR=$RPM_BUILD_ROOT | |
95 | ||
96 | /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} | |
97 | ||
98 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/{sanlock,wdmd}} | |
99 | install init.d/sanlock $RPM_BUILD_ROOT/etc/rc.d/init.d | |
100 | install init.d/wdmd $RPM_BUILD_ROOT/etc/rc.d/init.d | |
101 | ||
c195fee2 JB |
102 | install -d $RPM_BUILD_ROOT/usr/lib/tmpfiles.d |
103 | cat >$RPM_BUILD_ROOT/usr/lib/tmpfiles.d/sanlock.conf <<EOF | |
104 | d /var/run/sanlock 0755 root root - | |
105 | d /var/run/wdmd 0755 root root - | |
106 | EOF | |
107 | ||
a2f4ba26 JB |
108 | %clean |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %post libs -p /sbin/ldconfig | |
112 | %postun libs -p /sbin/ldconfig | |
113 | ||
114 | %files | |
115 | %defattr(644,root,root,755) | |
116 | %doc README.license | |
117 | %attr(755,root,root) %{_sbindir}/sanlock | |
118 | %attr(755,root,root) %{_sbindir}/wdmd | |
119 | %attr(754,root,root) /etc/rc.d/init.d/sanlock | |
120 | %attr(754,root,root) /etc/rc.d/init.d/wdmd | |
c195fee2 | 121 | /usr/lib/tmpfiles.d/sanlock.conf |
a2f4ba26 JB |
122 | %dir /var/run/sanlock |
123 | %dir /var/run/wdmd | |
124 | %{_mandir}/man8/sanlock.8* | |
125 | %{_mandir}/man8/wdmd.8* | |
126 | ||
127 | %files libs | |
128 | %defattr(644,root,root,755) | |
129 | %attr(755,root,root) %{_libdir}/libsanlock.so.*.* | |
130 | %attr(755,root,root) %ghost %{_libdir}/libsanlock.so.1 | |
131 | %attr(755,root,root) %{_libdir}/libsanlock_client.so.*.* | |
132 | %attr(755,root,root) %ghost %{_libdir}/libsanlock_client.so.1 | |
133 | %attr(755,root,root) %{_libdir}/libwdmd.so.*.* | |
134 | %attr(755,root,root) %ghost %{_libdir}/libwdmd.so.1 | |
135 | ||
136 | %files devel | |
137 | %defattr(644,root,root,755) | |
138 | %attr(755,root,root) %{_libdir}/libsanlock.so | |
139 | %attr(755,root,root) %{_libdir}/libsanlock_client.so | |
140 | %attr(755,root,root) %{_libdir}/libwdmd.so | |
141 | %{_includedir}/sanlock*.h | |
142 | %{_includedir}/wdmd.h | |
143 | ||
144 | %files -n python-sanlock | |
145 | %defattr(644,root,root,755) | |
146 | %attr(755,root,root) %{py_sitedir}/sanlock.so | |
147 | %{py_sitedir}/Sanlock-1.0-py*.egg-info |