Accepting request 577506 from filesystems

- use documentation shipped by upstream tar, reduce dependencies (forwarded request 577505 from dsterba)

OBS-URL: https://build.opensuse.org/request/show/577506
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/btrfsprogs?expand=0&rev=93
This commit is contained in:
Dominique Leuenberger 2018-02-18 10:40:32 +00:00 committed by Git OBS Bridge
parent 37b8e1d292
commit 422de40a5e
2 changed files with 31 additions and 3 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sat Feb 17 00:00:00 CET 2018 - dsterba@suse.cz
- use documentation shipped by upstream tar, reduce dependencies
-------------------------------------------------------------------
Wed Feb 14 00:00:00 CET 2018 - dsterba@suse.cz
- enable static build again, zstd now has static version
-------------------------------------------------------------------
Fri Feb 2 00:00:00 CET 2018 - dsterba@suse.cz

View File

@ -24,10 +24,12 @@
%if 0%{?suse_version} <= 1310 || 0%{?suse_version} == 1315
%define build_static 0
%else
# temporarily disable until libzstd-devel-static
%define build_static 0
%define build_static 1
%endif
# the tarball contains prebuilt documentation
%define build_docs 0
Name: btrfsprogs
Version: 4.15
Release: 0
@ -45,7 +47,9 @@ Source5: sles11-defaults.h
Patch1: mkfs-default-features.patch
%if %build_docs
BuildRequires: asciidoc
%endif
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libattr-devel
@ -66,7 +70,9 @@ BuildRequires: udev
%if 0%{?suse_version} == 1310
BuildRequires: libudev-devel
%endif
%if %build_docs
BuildRequires: xmlto
%endif
BuildRequires: zlib-devel
%if 0%{?suse_version} >= 1310
Requires(post): coreutils
@ -91,6 +97,7 @@ BuildRequires: libblkid-devel-static
BuildRequires: libcom_err-devel-static
BuildRequires: libext2fs-devel-static
BuildRequires: libuuid-devel-static
BuildRequires: libzstd-devel-static
BuildRequires: lzo-devel-static
BuildRequires: zlib-devel-static
@ -150,6 +157,9 @@ export CFLAGS="%optflags -include sles11-defaults.h"
%endif
%configure \
%if !%build_docs
--disable-documentation \
%endif
%if 0%{?suse_version} <= 1500
--disable-zstd
%endif
@ -166,6 +176,15 @@ make install \
%endif
DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir}
%if !%build_docs
cd Documentation
# fool make to avoid rebuilding some of the sources
touch btrfs-man5.5.gz btrfs-man5.asciidoc
touch btrfs-ioctl.asciidoc touch btrfs-ioctl.3.gz
make V=1 MV=mv DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} install
cd ..
%endif
%if %build_static
make install-static DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir}
%endif
@ -197,7 +216,6 @@ install -d -m0755 %{buildroot}/lib/mkinitrd/scripts/
install -m 0755 %{SOURCE1} %{buildroot}/lib/mkinitrd/scripts/
install -m 0755 %{SOURCE4} %{buildroot}/lib/mkinitrd/scripts/
%endif
find %{buildroot} -type f -name "*.la" -delete -print
# don't install .a for now
rm -f %{buildroot}/%{_libdir}/*.a
# bash completion