]> git.pld-linux.org Git - packages/devlabel.git/blob - devlabel.spec
- trigger doesn't make sense in new package; adapter
[packages/devlabel.git] / devlabel.spec
1 Summary:        Consistent/persistent storage device access through symlinking
2 Summary(pl.UTF-8):      Spójny/stały dostęp do urządzeń z danymi poprzez symlinki
3 Name:           devlabel
4 Version:        0.48.01
5 Release:        1
6 License:        GPL
7 Group:          Applications/System
8 Source0:        http://linux.dell.com/devlabel/permalink/%{name}-%{version}.tar.gz
9 # Source0-md5:  1a4032b942d8b47544da1957374a9786
10 BuildRequires:  libuuid-devel
11 Requires:       awk
12 Requires:       coreutils
13 Requires:       diffutils
14 Requires:       grep
15 Requires:       mktemp
16 Requires:       rc-scripts
17 Requires:       sed
18 Requires:       util-linux
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _sbindir        /sbin
22
23 %description
24 This package contains the devlabel implementation. It allows for
25 consistent mounting of devices. This is accomplished through tagging a
26 unique identifier to each device/symlink combination and confirming
27 that the identifier still matches the device name before it allows the
28 symlink mapping to proceed.
29
30 %description -l pl.UTF-8
31 Ten pakiet zawiera implementację devlabel. Umożliwia spójne montowanie
32 urządzeń. Osiąga to poprzez oznaczanie unikalnymi identyfikatorami
33 każdej kombinacji urządzenie/symlink i potwierdzanie, że dany
34 identyfikator nadal pasuje do nazwy urządzenia przed umożliwieniem
35 odwzorowania dowiązania symbolicznego.
36
37 %prep
38 %setup -q
39
40 %build
41 %{__cc} %{rpmcflags} -o scsi_unique_id scsi_unique_id.c
42 %{__cc} %{rpmcflags} -o partition_uuid -luuid partition_uuid.c
43
44 %pre
45 [ -d /var/lib/devlabel ] && rm -rf /var/lib/devlabel >/dev/null 2>&1
46 if [ -e /etc/sysconfig/devlabel ]; then
47         devlabel_version=`devlabel -v 2>/dev/null`
48         old_format=""
49         version_major=`echo $devlabel_version | awk {'print $2'} | cut -d '.' -f 1-1`
50         version_minor=`echo $devlabel_version | awk {'print $2'} | cut -d '.' -f 2-2`
51         [ -z "$version_minor" ] && old_format="true"
52         [ -z "$old_format" ] && [ "$version_major" -eq 0 ] && [ "$version_minor" -lt 37 ] && old_format="true"
53         if [ -n "$old_format" ]; then
54                 /sbin/devlabel restart >/dev/null 2>&1 || :
55         fi
56 fi
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_mandir}/man8,/etc/sysconfig/devlabel.d}
61
62 install devlabel $RPM_BUILD_ROOT%{_sbindir}/devlabel
63 install scsi_unique_id $RPM_BUILD_ROOT%{_bindir}
64 install partition_uuid $RPM_BUILD_ROOT%{_bindir}
65 gzip -dc devlabel.8.gz > $RPM_BUILD_ROOT%{_mandir}/man8/devlabel.8
66 install sysconfig.devlabel $RPM_BUILD_ROOT/etc/sysconfig/devlabel
67 install ignore_list $RPM_BUILD_ROOT/etc/sysconfig/devlabel.d
68 install ignore_list $RPM_BUILD_ROOT/etc/sysconfig/devlabel.d/proc_partitions
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(644,root,root,755)
75 %doc AUTHORS
76 %attr(755,root,root) %{_sbindir}/devlabel
77 %attr(755,root,root) %{_bindir}/scsi_unique_id
78 %attr(755,root,root) %{_bindir}/partition_uuid
79 /etc/sysconfig/devlabel.d
80 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/devlabel
81 %{_mandir}/man8/devlabel.8*
This page took 0.073797 seconds and 3 git commands to generate.