Accepting request 577505 from home:dsterba:branches:filesystems

- use documentation shipped by upstream tar, reduce dependencies

OBS-URL: https://build.opensuse.org/request/show/577505
OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=289
This commit is contained in:
David Sterba 2018-02-17 00:21:22 +00:00 committed by Git OBS Bridge
parent a40c18e832
commit 42824234c3
2 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
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 Wed Feb 14 00:00:00 CET 2018 - dsterba@suse.cz

View File

@ -27,6 +27,9 @@
%define build_static 1 %define build_static 1
%endif %endif
# the tarball contains prebuilt documentation
%define build_docs 0
Name: btrfsprogs Name: btrfsprogs
Version: 4.15 Version: 4.15
Release: 0 Release: 0
@ -44,7 +47,9 @@ Source5: sles11-defaults.h
Patch1: mkfs-default-features.patch Patch1: mkfs-default-features.patch
%if %build_docs
BuildRequires: asciidoc BuildRequires: asciidoc
%endif
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libattr-devel BuildRequires: libattr-devel
@ -65,7 +70,9 @@ BuildRequires: udev
%if 0%{?suse_version} == 1310 %if 0%{?suse_version} == 1310
BuildRequires: libudev-devel BuildRequires: libudev-devel
%endif %endif
%if %build_docs
BuildRequires: xmlto BuildRequires: xmlto
%endif
BuildRequires: zlib-devel BuildRequires: zlib-devel
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310
Requires(post): coreutils Requires(post): coreutils
@ -150,6 +157,9 @@ export CFLAGS="%optflags -include sles11-defaults.h"
%endif %endif
%configure \ %configure \
%if !%build_docs
--disable-documentation \
%endif
%if 0%{?suse_version} <= 1500 %if 0%{?suse_version} <= 1500
--disable-zstd --disable-zstd
%endif %endif
@ -166,6 +176,15 @@ make install \
%endif %endif
DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} 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 %if %build_static
make install-static DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} make install-static DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir}
%endif %endif
@ -197,7 +216,6 @@ install -d -m0755 %{buildroot}/lib/mkinitrd/scripts/
install -m 0755 %{SOURCE1} %{buildroot}/lib/mkinitrd/scripts/ install -m 0755 %{SOURCE1} %{buildroot}/lib/mkinitrd/scripts/
install -m 0755 %{SOURCE4} %{buildroot}/lib/mkinitrd/scripts/ install -m 0755 %{SOURCE4} %{buildroot}/lib/mkinitrd/scripts/
%endif %endif
find %{buildroot} -type f -name "*.la" -delete -print
# don't install .a for now # don't install .a for now
rm -f %{buildroot}/%{_libdir}/*.a rm -f %{buildroot}/%{_libdir}/*.a
# bash completion # bash completion