summaryrefslogtreecommitdiff
path: root/build/rpm/attr.spec.in
blob: e14e7ccfd043ddfed1a046dd2eacd56b1d0ca489 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Summary: Utilities for managing filesystem extended attributes.
Name: @pkg_name@
Version: @pkg_version@
Release: @pkg_release@
Distribution: @pkg_distribution@
Packager: @pkg_builder@
BuildRoot: @build_root@ 
Prereq: /sbin/ldconfig
Conflicts: xfsdump < 2.0.0
Source: @pkg_name@-@pkg_version@.src.tar.gz
Copyright: Copyright (C) 2000 Silicon Graphics, Inc.
Vendor: Silicon Graphics, Inc.
URL: http://oss.sgi.com/projects/xfs/
Group: System Environment/Base

%description
A set of tools for manipulating extended attributes on filesystem
objects, in particular getfattr(1) and setfattr(1).
An attr(1) command is also provided which is largely compatible
with the SGI IRIX tool of the same name.

%package devel
Summary: Extended attribute static libraries and headers.
Group: Development/Libraries
Requires: @pkg_name@ >= 2.0.0

%description devel
attr-devel contains the libraries and header files needed to
develop programs which make use of extended attributes.
For Linux programs, the documented system call API is the
recommended interface, but an SGI IRIX compatibility interface
is also provided.

Currently only ext2, ext3 and XFS support extended attributes.
The SGI IRIX compatibility API built above the Linux system calls is
used by programs such as xfsdump(8), xfsrestore(8) and xfs_fsr(8).

You should install attr-devel if you want to develop programs
which make use of extended attributes.  If you install attr-devel,
you'll also want to install attr.

# If .census exists, then no setup is necessary, just go and do the build,
# otherwise run setup
%prep
if [ -f .census ] ; then
   if [ ! -d ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} ] ; then
      ln -s . ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}
   fi
else
%setup
touch .census
./configure
fi

%build
@make@

%install
DIST_ROOT="$RPM_BUILD_ROOT"
DIST_INSTALL=`pwd`/install.manifest
DIST_INSTALL_DEV=`pwd`/install-dev.manifest
export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
@make@ install DIST_MANIFEST="$DIST_INSTALL"
@make@ install-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
files()
{
	sort | uniq | awk ' 
$1 == "d" { printf ("%%%%dir %%%%attr(%s,%s,%s) %s\n", $2, $3, $4, $5); } 
$1 == "f" { if (match ($6, "@pkg_man_dir@") || match ($6, "@pkg_doc_dir@"))
		printf ("%%%%doc ");
	    if (match ($6, "@pkg_man_dir@"))
		printf ("%%%%attr(%s,%s,%s) %s*\n", $2, $3, $4, $6);
	    else
		printf ("%%%%attr(%s,%s,%s) %s\n", $2, $3, $4, $6); }
$1 == "l" { if (match ($3, "@pkg_man_dir@") || match ($3, "@pkg_doc_dir@"))
		printf ("%%%%doc ");
	    if (match ($3, "@pkg_man_dir@"))
		printf ("%attr(0777,root,root) %s*\n", $3);
	    else
		printf ("%attr(0777,root,root) %s\n", $3); }'
}
set +x
files < "$DIST_INSTALL" > files.rpm
files < "$DIST_INSTALL_DEV" > filesdevel.rpm
set -x

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f files.rpm

%files devel -f filesdevel.rpm