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