1Summary: Utilities for managing filesystem extended attributes.
2Name: @pkg_name@
3Version: @pkg_version@
4Release: @pkg_release@
5Packager: Silicon Graphics, Inc. <http://www.sgi.com/>
6BuildRoot: @build_root@ 
7Prereq: /sbin/ldconfig
8Conflicts: xfsdump < 2.0.0
9Source: @pkg_name@-@pkg_version@.src.tar.gz
10License: GPL
11Vendor: Silicon Graphics, Inc.
12URL: http://oss.sgi.com/projects/xfs/
13Group: System Environment/Base
14
15%description
16A set of tools for manipulating extended attributes on filesystem
17objects, in particular getfattr(1) and setfattr(1).
18An attr(1) command is also provided which is largely compatible
19with the SGI IRIX tool of the same name.
20
21%package -n libattr
22Summary: Dynamic library for extended attribute support.
23Group: Development/Libraries
24Prereq: /sbin/ldconfig
25
26%description -n libattr
27This package contains the libattr.so dynamic library which contains
28the extended attribute system calls and library functions.
29
30%package -n libattr-devel
31Summary: Extended attribute static libraries and headers.
32Group: Development/Libraries
33Requires: libattr
34Obsoletes: attr-devel
35
36%description -n libattr-devel
37This package contains the libraries and header files needed to
38develop programs which make use of extended attributes.
39For Linux programs, the documented system call API is the
40recommended interface, but an SGI IRIX compatibility interface
41is also provided.
42
43Currently only ext2, ext3, JFS and XFS support extended attributes.
44The SGI IRIX compatibility API built above the Linux system calls is
45used by programs such as xfsdump(8), xfsrestore(8) and xfs_fsr(8).
46
47You should install libattr-devel if you want to develop programs
48which make use of extended attributes.  If you install libattr-devel
49then you'll also want to install attr.
50
51%prep
52if [ -f .census ] ; then
53   if [ ! -d ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} ] ; then
54      ln -s . ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}
55   fi
56else
57%setup
58@make@ configure
59fi
60
61%build
62@make@
63
64%install
65DIST_ROOT="$RPM_BUILD_ROOT"
66DIST_INSTALL=`pwd`/install.manifest
67DIST_INSTALL_DEV=`pwd`/install-dev.manifest
68DIST_INSTALL_LIB=`pwd`/install-lib.manifest
69export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB
70@make@ install DIST_MANIFEST="$DIST_INSTALL"
71@make@ -C build/rpm rpmfiles DIST_MANIFEST="$DIST_INSTALL"
72@make@ install-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
73@make@ -C build/rpm rpmfiles-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
74@make@ install-lib DIST_MANIFEST="$DIST_INSTALL_LIB"
75@make@ -C build/rpm rpmfiles-lib DIST_MANIFEST="$DIST_INSTALL_LIB"
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%post -n libattr -p /sbin/ldconfig
81
82%postun -n libattr -p /sbin/ldconfig
83
84%files -f build/rpm/rpmfiles
85
86%files -n libattr-devel -f build/rpm/rpmfiles-dev
87
88%files -n libattr -f build/rpm/rpmfiles-lib
89