]>
Commit | Line | Data |
---|---|---|
0016ef2d | 1 | %include /usr/lib/rpm/macros.perl |
4df3ea2f | 2 | Summary: A library for locking devices |
b97a9007 | 3 | Summary(pl.UTF-8): Biblioteka do blokowania urządzeń |
988cc40f | 4 | Name: lockdev |
191529c5 | 5 | Version: 1.0.3 |
ee43be1b | 6 | Release: 13 |
12e89c65 | 7 | License: LGPL v2.1 |
850c17e7 | 8 | Group: Libraries |
6568422d | 9 | Source0: ftp://ftp.debian.org/debian/pool/main/l/lockdev/%{name}_%{version}.orig.tar.gz |
191529c5 | 10 | # Source0-md5: 64b9c1b87b125fc348e892e24625524a |
79a080c4 | 11 | Patch0: %{name}-Makefile.patch |
198c0faf | 12 | Patch1: %{name}-baudboy.patch |
4bae9665 | 13 | Patch2: %{name}-decl.patch |
a3c74879 | 14 | BuildRequires: perl-ExtUtils-MakeMaker |
15 | BuildRequires: rpm-perlprov | |
988cc40f | 16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %description | |
19 | Lockdev provides a reliable way to put an exclusive lock to devices | |
20 | using both FSSTND and SVr4 methods. | |
21 | ||
5ca2b6f0 JR |
22 | %description -l pl.UTF-8 |
23 | lockdev udostępnia wiarygodny sposób na zakładanie wyłącznej blokady | |
24 | na urządzenia przy użyciu metod zarówno FSSTND jak i SVr4. | |
4df3ea2f | 25 | |
988cc40f | 26 | %package devel |
4df3ea2f | 27 | Summary: The header files for the lockdev library |
b97a9007 | 28 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lockdev |
73358abc | 29 | Group: Development/Libraries |
850c17e7 | 30 | Requires: %{name} = %{version}-%{release} |
988cc40f | 31 | |
32 | %description devel | |
33 | The lockdev library provides a reliable way to put an exclusive lock | |
34 | on devices using both FSSTND and SVr4 methods. The lockdev-devel | |
4df3ea2f JB |
35 | package contains the development headers. |
36 | ||
5ca2b6f0 JR |
37 | %description devel -l pl.UTF-8 |
38 | Biblioteka lockdev udostępnia wiarygodny sposób na zakładanie | |
39 | wyłącznej blokady na urządzenia przy użyciu metod zarówno FSSTND jak i | |
40 | SVr4. Ten pakiet zawiera pliki nagłówkowe. | |
4df3ea2f JB |
41 | |
42 | %package static | |
43 | Summary: Static lockdev library | |
b97a9007 | 44 | Summary(pl.UTF-8): Biblioteka statyczna lockdev |
73358abc | 45 | Group: Development/Libraries |
850c17e7 | 46 | Requires: %{name}-devel = %{version}-%{release} |
4df3ea2f JB |
47 | |
48 | %description static | |
49 | Static lockdev library. | |
50 | ||
5ca2b6f0 | 51 | %description static -l pl.UTF-8 |
4df3ea2f | 52 | Biblioteka statyczna lockdev. |
988cc40f | 53 | |
198c0faf JB |
54 | %package baudboy |
55 | Summary: lockdev utility | |
b97a9007 | 56 | Summary(pl.UTF-8): Narzędzie lockdev |
198c0faf JB |
57 | Group: Applications/System |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description baudboy | |
61 | This package contains sgid lockdev utility used by Baudboy API. | |
62 | ||
5ca2b6f0 JR |
63 | %description baudboy -l pl.UTF-8 |
64 | Ten pakiet zawiera narzędzie lockdev z ustawionym bitem sgid używane | |
198c0faf JB |
65 | przez API Baudboy. |
66 | ||
67 | %package baudboy-devel | |
68 | Summary: Baudboy interface to lockdev utility | |
b97a9007 | 69 | Summary(pl.UTF-8): Interfejs Baudboy do narzędzia lockdev |
198c0faf JB |
70 | Group: Development/Libraries |
71 | ||
72 | %description baudboy-devel | |
73 | Baudboy interface to lockdev utility. | |
74 | ||
5ca2b6f0 JR |
75 | %description baudboy-devel -l pl.UTF-8 |
76 | Interfejs Baudboy do narzędzia lockdev. | |
198c0faf | 77 | |
850c17e7 JB |
78 | %package -n perl-LockDev |
79 | Summary: LockDev - Perl extension to manage device lockfiles | |
b97a9007 | 80 | Summary(pl.UTF-8): LockDev - rozszerzenie Perla do zarządzania plikami blokującymi dla urządzeń |
850c17e7 JB |
81 | Group: Development/Languages/Perl |
82 | Requires: %{name} = %{version}-%{release} | |
83 | ||
84 | %description -n perl-LockDev | |
85 | The LockDev methods act on device locks normally located in /var/lock. | |
86 | The lock is acquired creating a pair of files hardlinked between them | |
87 | and named after the device name (as mandated by FSSTND) and the | |
88 | device's major and minor numbers (as in SVr4 locks). This permits to | |
89 | circumvent a problem using only the FSSTND lock method when the same | |
90 | device exists under different names (for convenience or when a device | |
91 | must be accessable by more than one group of users). | |
92 | ||
93 | The lock file names are typically in the form LCK..ttyS1 and | |
94 | LCK.004.065, and their content is the pid of the process who owns the | |
95 | lock. | |
96 | ||
5ca2b6f0 JR |
97 | %description -n perl-LockDev -l pl.UTF-8 |
98 | Metody LockDev działają na blokadach (plikach blokujących) urządzeń | |
99 | normalnie położonych w /var/lock. Blokada jest uzyskiwana poprzez | |
100 | utworzenie pary plików połączonych dowiązaniem zwykłym i nazwanych od | |
101 | nazwy urządzenia (wg specyfikacji FSSTND) oraz liczby głównej i | |
102 | pobocznej (major i minor, jak w blokadach SVr4). Pozwala to rozwiązać | |
103 | problem istniejący w przypadku używania wyłącznie metody FSSTND, kiedy | |
104 | to samo urządzenie istnieje pod różnymi nazwami (dla wygody lub kiedy | |
105 | musi być dostępne dla więcej niż jednej grupy użytkowników). | |
106 | ||
107 | Nazwy plików blokujących są zwykle w postaci LCK..ttyS1 i LCK.004.065, | |
108 | a ich zawartość to identyfikator (PID) procesu posiadającego blokadę. | |
850c17e7 | 109 | |
988cc40f | 110 | %prep |
111 | %setup -q | |
f828e975 | 112 | %patch0 -p1 |
198c0faf | 113 | %patch1 -p1 |
4bae9665 | 114 | %patch2 -p1 |
988cc40f | 115 | |
116 | %build | |
850c17e7 JB |
117 | %{__make} static \ |
118 | CC="%{__cc}" \ | |
4bae9665 | 119 | CFLAGS="%{rpmcppflags} %{rpmcflags} -Wall" |
850c17e7 | 120 | |
d5f241e8 | 121 | %{__make} shared lockdev \ |
850c17e7 | 122 | CC="%{__cc}" \ |
4bae9665 | 123 | CFLAGS="%{rpmcppflags} %{rpmcflags} -Wall -D_REENTRANT" \ |
850c17e7 | 124 | LCFLAGS="%{rpmldflags}" |
850c17e7 JB |
125 | |
126 | cd LockDev | |
127 | %{__perl} Makefile.PL \ | |
128 | INSTALLDIRS=vendor | |
129 | %{__make} \ | |
130 | OPTIMIZE="%{rpmcflags}" | |
988cc40f | 131 | |
132 | %install | |
133 | rm -rf $RPM_BUILD_ROOT | |
e078c255 | 134 | |
4df3ea2f | 135 | %{__make} install \ |
850c17e7 JB |
136 | sbindir=$RPM_BUILD_ROOT%{_sbindir} \ |
137 | libdir=$RPM_BUILD_ROOT%{_libdir} \ | |
138 | incdir=$RPM_BUILD_ROOT%{_includedir} \ | |
139 | mandir=$RPM_BUILD_ROOT%{_mandir} | |
988cc40f | 140 | |
850c17e7 JB |
141 | %{__make} install -C LockDev \ |
142 | DESTDIR=$RPM_BUILD_ROOT | |
988cc40f | 143 | |
7fc7da47 ER |
144 | rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
145 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/LockDev/.packlist | |
146 | ||
07ee0a9c WF |
147 | ln -sf liblockdev.so.1.0.3 $RPM_BUILD_ROOT%{_libdir}/liblockdev.so.1 |
148 | ||
12e89c65 JB |
149 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} |
150 | cat >$RPM_BUILD_ROOT%{_pkgconfigdir}/lockdev.pc <<'EOF' | |
151 | prefix=%{_prefix} | |
152 | exec_prefix=%{_prefix} | |
153 | libdir=%{_libdir} | |
154 | includedir=%{_includedir} | |
155 | ||
156 | Name: lockdev | |
157 | Description: A library for locking devices | |
158 | Version: %{version} | |
159 | Libs: -L${libdir} -llockdev | |
160 | Cflags: | |
161 | EOF | |
7fc7da47 | 162 | |
4df3ea2f | 163 | %clean |
e078c255 | 164 | rm -rf $RPM_BUILD_ROOT |
4df3ea2f | 165 | |
4df3ea2f | 166 | %post -p /sbin/ldconfig |
d801f05c | 167 | %postun -p /sbin/ldconfig |
850c17e7 | 168 | |
988cc40f | 169 | %files |
170 | %defattr(644,root,root,755) | |
198c0faf | 171 | %attr(755,root,root) %{_libdir}/liblockdev.so.*.*.* |
07ee0a9c | 172 | %attr(755,root,root) %ghost %{_libdir}/liblockdev.so.1 |
988cc40f | 173 | |
174 | %files devel | |
175 | %defattr(644,root,root,755) | |
198c0faf | 176 | %attr(755,root,root) %{_libdir}/liblockdev.so |
850c17e7 | 177 | %{_mandir}/man3/lockdev.3* |
198c0faf JB |
178 | %{_includedir}/lockdev.h |
179 | %{_includedir}/ttylock.h | |
12e89c65 | 180 | %{_pkgconfigdir}/lockdev.pc |
4df3ea2f JB |
181 | |
182 | %files static | |
183 | %defattr(644,root,root,755) | |
198c0faf JB |
184 | %{_libdir}/liblockdev.a |
185 | ||
186 | %files baudboy | |
187 | %defattr(644,root,root,755) | |
188 | %attr(2755,root,uucp) %{_sbindir}/lockdev | |
189 | ||
190 | %files baudboy-devel | |
191 | %defattr(644,root,root,755) | |
192 | %{_includedir}/baudboy.h | |
850c17e7 JB |
193 | |
194 | %files -n perl-LockDev | |
195 | %defattr(644,root,root,755) | |
196 | %{perl_vendorarch}/LockDev.pm | |
197 | %dir %{perl_vendorarch}/auto/LockDev | |
850c17e7 JB |
198 | %attr(755,root,root) %{perl_vendorarch}/auto/LockDev/LockDev.so |
199 | %{_mandir}/man3/LockDev.3* |