]> git.pld-linux.org Git - packages/devlabel.git/blame - devlabel.spec
- syntax fix (enclose %version in curl brackets)
[packages/devlabel.git] / devlabel.spec
CommitLineData
26da8144 1Summary: Consistent/persistent storage device access through symlinking
2Name: devlabel
3Version: 0.48.01
4Release: 1
5License: GPL
6Group: System Environment/Base
7Group: Applications/System
c905129a 8Source0: http://linux.dell.com/devlabel/permalink/%{name}-%{version}.tar.gz
26da8144 9# Source0-md5: 1a4032b942d8b47544da1957374a9786
10Requires: sed grep awk textutils fileutils diffutils coreutils mktemp
11Requires: initscripts > 6.97-1
12Requires: util-linux
13BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15%description
16This package contains the devlabel implementation. It allows for
17consistent mounting of devices. This is accomplished through tagging a
18unique identifier to each device/symlink combination and confirming
19that the identifier still matches the device name before it allows the
20symlink mapping to proceed.
21
22%prep
23
24%setup -q
25
26%build
27gcc $RPM_OPT_FLAGS -o scsi_unique_id scsi_unique_id.c
28gcc $RPM_OPT_FLAGS -o partition_uuid -luuid partition_uuid.c
29
30%pre
31[ -d /var/lib/devlabel ] && rm -rf /var/lib/devlabel >/dev/null 2>&1
32if [ -e /etc/sysconfig/devlabel ]; then
33 devlabel_version=`devlabel -v 2>/dev/null`
34 old_format=""
35 version_major=`echo $devlabel_version | awk {'print $2'} | cut -d '.' -f 1-1`
36 version_minor=`echo $devlabel_version | awk {'print $2'} | cut -d '.' -f 2-2`
37 [ -z "$version_minor" ] && old_format="true"
38 [ -z "$old_format" ] && [ "$version_major" -eq 0 ] && [ "$version_minor" -lt 37 ] && old_format="true"
39 if [ -n "$old_format" ]; then
40 /sbin/devlabel restart >/dev/null 2>&1 || :
41 fi
42fi
43
44%triggerpostun -- devlabel <= 0.38.07-1
45if [ -e /etc/sysconfig/devlabel ]; then
46 /sbin/devlabel reverseremap --force >/dev/null 2>&1 || :
47fi
48
49%install
50rm -rf $RPM_BUILD_ROOT
51if [ "$RPM_BUILD_ROOT" != "/" ]; then
52 rm -rf $RPM_BUILD_ROOT
53fi
54install -d $RPM_BUILD_ROOT/{sbin,usr/bin,usr/share/man/man8,etc/sysconfig,etc/sysconfig/devlabel.d}
55install -m 755 devlabel $RPM_BUILD_ROOT/sbin/devlabel
56install -m 755 scsi_unique_id $RPM_BUILD_ROOT%{_bindir}
57install -m 755 partition_uuid $RPM_BUILD_ROOT%{_bindir}
58install devlabel.8.gz $RPM_BUILD_ROOT%{_mandir}/man8
59install sysconfig.devlabel $RPM_BUILD_ROOT/etc/sysconfig/devlabel
60install ignore_list $RPM_BUILD_ROOT/etc/sysconfig/devlabel.d
61install ignore_list $RPM_BUILD_ROOT/etc/sysconfig/devlabel.d/proc_partitions
62
63%clean
64if [ "$RPM_BUILD_ROOT" != "/" ]; then
65 rm -rf $RPM_BUILD_ROOT
66fi
67
68%files
69%defattr(644,root,root,755)
70%attr(755,root,root) %{_sbindir}/devlabel
71%attr(755,root,root) %{_bindir}/scsi_unique_id
72%attr(755,root,root) %{_bindir}/partition_uuid
73/etc/sysconfig/devlabel.d
74%config(noreplace) /etc/sysconfig/devlabel
75%{_mandir}/man8/devlabel.8*
76%doc AUTHORS COPYING
This page took 0.521118 seconds and 4 git commands to generate.