File xfsprogs.spec of Package xfsprogs
%define lib_name_orig libxfs
%define lib_major 1
%define lib_name %mklibname xfs %{lib_major}
%define lib_name_devel %mklibname xfs -d
%define lib_name_static_devel %mklibname xfs -d -s
# "fix" underlinking:
%define _disable_ld_no_undefined 1
Name: xfsprogs
Version: 6.17.0
Release: %mkrel 1
Summary: Utilities for managing the XFS filesystem
License: GPLv2 and LGPLv2
Group: System/Kernel and hardware
URL: http://xfs.org/index.php/Getting_the_latest_source_code
Source0: https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz
BuildRequires: pkgconfig(ext2fs)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(icu-uc)
BuildRequires: pkgconfig(inih)
BuildRequires: lib64attr-devel
BuildRequires: userspace-rcu-devel
BuildRequires: pkgconfig(systemd)
Requires: common-licenses
Conflicts: xfsdump < 3.0.0
%description
A set of commands to use the XFS filesystem, including mkfs.xfs.
XFS is a high performance journaling filesystem which originated
on the SGI IRIX platform. It is completely multi-threaded, can
support large files and large filesystems, extended attributes,
variable block sizes, is extent based, and makes extensive use of
Btrees (directories, extents, free space) to aid both performance
and scalability.
Refer to the documentation at http://oss.sgi.com/projects/xfs/
for complete details. This implementation is on-disk compatible
with the IRIX version of XFS.
%global debug_package %{nil}
%package -n %{lib_name}
Summary: Main library for %{lib_name_orig}
Group: System/Libraries
Provides: %{lib_name_orig} = %{version}-%{release}
%description -n %{lib_name}
This package contains the library needed to run programs dynamically
linked with %{lib_name_orig}.
%package -n %{lib_name_devel}
Summary: XFS filesystem-specific libraries and headers
Group: Development/C
Requires: %{lib_name} = %{version}
# For uuid/uuid.h included in /usr/include/xfs/linux.h
Requires: libuuid-devel
Provides: %{lib_name_orig}-devel = %{version}-%{release}
Provides: xfs-devel = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
%description -n %{lib_name_devel}
%{lib_name_devel} contains the libraries and header files needed to
develop XFS filesystem-specific programs.
You should install %{lib_name_devel} if you want to develop XFS
filesystem-specific programs, If you install %{lib_name_devel}, you'll
also want to install xfsprogs.
%package -n %{lib_name_static_devel}
Summary: XFS filesystem-specific static libraries
Group: Development/C
Requires: %{lib_name_devel} = %{version}
Provides: %{lib_name_orig}-static-devel = %{version}-%{release}
Provides: xfs-static-devel = %{version}-%{release}
%description -n %{lib_name_static_devel}
%{lib_name_static_devel} contains the static libraries needed to
develop XFS filesystem-specific programs.
You should install %{lib_name_static_devel} if you want to develop XFS
filesystem-specific programs, If you install %{lib_name_static_devel}, you'll
also want to install xfsprogs.
%prep
%setup -q -n %name-%version
%autopatch -p1
%build
export DEBUG="-DNDEBUG"
export OPTIMIZER="%{optflags}"
%configure \
--enable-gettext=yes \
--enable-editline=no \
--enable-shared=yes
make DEBUG=-DNDEBUG OPTIMIZER="%{optflags}"
%install
make install DIST_ROOT=%{buildroot}/ PKG_ROOT_SBIN_DIR=%{_sbindir} PKG_ROOT_LIB_DIR=%{_libdir}
make install-dev DIST_ROOT=%{buildroot}/ PKG_ROOT_LIB_DIR=%{_libdir}
# nuke files already packaged as %doc
rm -r %{buildroot}%{_datadir}/doc/xfsprogs/
rm -f %{buildroot}%{_libdir}/*.la
%find_lang %{name}
%files -f %{name}.lang
%doc doc/CHANGES.gz README
%{_sbindir}/fsck.xfs
%{_sbindir}/mkfs.xfs
%{_sbindir}/xfs_*
%{_mandir}/man[85]/*
%{_unitdir}/*
%{_datadir}/xfsprogs/mkfs/*
%files -n %{lib_name}
%doc README
%{_libdir}/*.so.%{lib_major}
%{_libdir}/*.so.%{lib_major}.*
%{_usr}/libexec/xfsprogs/*
%{_usr}/share/xfsprogs/*
%files -n %{lib_name_devel}
%{_libdir}/*.so
%{_includedir}/xfs
%{_mandir}/man2/*
%{_mandir}/man3/*
%files -n %{lib_name_static_devel}
%{_libdir}/*.a
%changelog