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