btrfsprogs/btrfsprogs.spec

111 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package btrfsprogs
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: btrfsprogs
Url: http://btrfs.wiki.kernel.org/index.php/Main_Page
Version: 0.19
Release: 50
%define tar_version v0.19-116-g13eced9
Summary: Utilities for the Btrfs filesystem
License: GPL v2 only
Group: System/Filesystems
Supplements: filesystem(btrfs)
Source: btrfs-progs-%{tar_version}.tar.bz2
Source1: boot-btrfs.sh
Patch0: memleak-fix.diff
Patch1: 0001-Plug-Memory-leak-in-find_and_setup_log_root.patch
Patch1000: local-version-override.patch
Patch57: ignore-deleted-loopmounts.diff
Patch58: btrfsck-ignore-option-a.diff
Patch59: build-extra-progs.diff
Patch60: btrfs-progs-pass-correct-build-option-for-pthreads.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libacl-devel libext2fs-devel libuuid-devel zlib-devel
# for /bin/true
Requires: coreutils
%description
Utilities needed to create and maintain btrfs file systems under Linux.
%prep
%setup -q -n btrfs-progs-%{tar_version}
%patch0
%patch1 -p1
%patch1000 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p0
%patch60 -p1
%build
make %{?_smp_mflags} CFLAGS="%{optflags}" all convert \
btrfs-zero-log btrfs-select-super btrfs-image btrfstune \
restore find-root
mv restore btrfs-restore
mv find-root btrfs-find-root
%install
make install DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix} bindir=/sbin mandir=%{_mandir}
install -m 0755 -d ${RPM_BUILD_ROOT}/sbin
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_bindir}
# move some utilities out of /sbin
mv ${RPM_BUILD_ROOT}/sbin/{btrfs-show,btrfs-vol,btrfsctl} ${RPM_BUILD_ROOT}/%{_bindir}
mv ${RPM_BUILD_ROOT}/sbin/{btrfs-map-logical,btrfs-debug-tree} ${RPM_BUILD_ROOT}/%{_bindir}
# mkinitrd rescue utilities
install -m 0755 btrfs-zero-log btrfs-select-super btrfs-image btrfstune ${RPM_BUILD_ROOT}/sbin
install -m 0755 btrfs-restore btrfs-find-root ${RPM_BUILD_ROOT}/sbin
# command line options are not compatible (bnc#599224)
# copy needed if /bin is different fs from /sbin
cp /bin/true ${RPM_BUILD_ROOT}/sbin/fsck.btrfs
install -d -m0755 ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
cp %{S:1} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
%files
%defattr(-, root, root)
/sbin/fsck.btrfs
# mkinitrd utils
/sbin/btrfs
/sbin/btrfs-zero-log
/sbin/btrfs-convert
/sbin/btrfs-select-super
/sbin/btrfs-image
/sbin/btrfstune
/sbin/btrfsck
/sbin/btrfs-restore
/sbin/btrfs-find-root
/sbin/mkfs.btrfs
/lib/mkinitrd/scripts/boot-btrfs.sh
# other
/usr/bin/btrfs-map-logical
/usr/bin/btrfs-debug-tree
# obsolete
/usr/bin/btrfs-show
/usr/bin/btrfs-vol
/usr/bin/btrfsctl
%_mandir/man8/btrfs-image.8.gz
%_mandir/man8/btrfs-show.8.gz
%_mandir/man8/btrfsck.8.gz
%_mandir/man8/btrfsctl.8.gz
%_mandir/man8/mkfs.btrfs.8.gz
%_mandir/man8/btrfs.8.gz
%changelog