From 75dd424f832c9663fad2cfc59d6afc49ab497b6b Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Mon, 2 Feb 2015 22:25:45 +1000 Subject: [PATCH] Spec cleanup --- btrfs-progs.spec | 130 ++++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 64 deletions(-) diff --git a/btrfs-progs.spec b/btrfs-progs.spec index 4702e71..2144db8 100644 --- a/btrfs-progs.spec +++ b/btrfs-progs.spec @@ -1,81 +1,37 @@ -%define _root_sbindir /sbin -%define _root_libdir /%{_lib} -%define libname_orig libbtrfs -%define major 0 -%define libname %mklibname btrfs %{major} -%define develname %mklibname btrfs -d +%define _root_sbindir /sbin +%define _root_libdir /%{_lib} + +%define major 0 +%define libname %mklibname btrfs %{major} +%define devname %mklibname btrfs -d -Name: btrfs-progs -Version: 3.17.2 -Release: 1 Summary: Userspace programs for btrfs - +Name: btrfs-progs +Version: 3.17.2 +Release: 2 +License: GPLv2+ Group: System/Kernel and hardware -License: GPLv2 -URL: http://btrfs.wiki.kernel.org/ +Url: http://btrfs.wiki.kernel.org/ # Git: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git -Source0: http://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/%{name}-v%{version}.tar.xz +Source0: http://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/%{name}-v%{version}.tar.xz # From http://www.spinics.net/lists/linux-btrfs/msg15899.html -Source1: btrfs-completion.sh +Source1: btrfs-completion.sh # From Fedora Patch0: btrfs-init-dev-list.patch - +BuildRequires: asciidoc +BuildRequires: xmlto +BuildRequires: acl-devel +BuildRequires: liblzo-devel +BuildRequires: pkgconfig(blkid) BuildRequires: pkgconfig(ext2fs) BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(zlib) -BuildRequires: acl-devel -BuildRequires: pkgconfig(blkid) -BuildRequires: liblzo-devel -BuildRequires: asciidoc -BuildRequires: xmlto - -Requires: %{libname_orig} = %{version}-%{release} +Requires: %{libname} = %{EVRD} %description The btrfs-progs package provides all the userpsace programs needed to create, check, modify and correct any inconsistencies in the btrfs filesystem. -%package -n %{libname} -Summary: Main library for btrfs -Group: System/Libraries -Provides: %{libname_orig} = %{version}-%{release} - -%description -n %{libname} -This package contains the library needed to run programs dynamically -linked with btrfs - -%package -n %{develname} -Summary: Headers for developing programs that will use btrfs -Group: Development/C -Requires: %{libname} = %{version} -Provides: %{libname_orig}-devel = %{version}-%{release} -Provides: btrfs-devel = %{version}-%{release} - -%description -n %{develname} -This package contains the headers that programmers will need to develop -applications which will use btrfs - -%prep -%setup -q -n %{name}-v%{version} -%apply_patches - -%build -%make CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" - -%install -%makeinstall_std \ - bindir=%{_root_sbindir} \ - libdir=%{_root_libdir} \ - incdir=%{_includedir}/btrfs \ - mandir=%{_mandir} - -rm -f %{buildroot}%{_root_libdir}/*.a -mkdir -p %{buildroot}%{_libdir} -mv %{buildroot}%{_root_libdir}/libbtrfs.so %{buildroot}%{_libdir}/ - -mkdir -p %{buildroot}%{_datadir}/bash-completion/completions -cp %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/btrfs - %files %doc COPYING INSTALL %{_root_sbindir}/btrfs @@ -99,9 +55,55 @@ cp %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/btrfs %{_mandir}/man8/fsck.btrfs.8* %{_datadir}/bash-completion/completions/btrfs +#---------------------------------------------------------------------------- + +%package -n %{libname} +Summary: Main library for btrfs +Group: System/Libraries + +%description -n %{libname} +This package contains the library needed to run programs dynamically +linked with btrfs. + %files -n %{libname} %{_root_libdir}/libbtrfs.so.%{major}* -%files -n %{develname} +#---------------------------------------------------------------------------- + +%package -n %{devname} +Summary: Headers for developing programs that will use btrfs +Group: Development/C +Requires: %{libname} = %{EVRD} +Provides: btrfs-devel = %{EVRD} + +%description -n %{devname} +This package contains the headers that programmers will need to develop +applications which will use btrfs. + +%files -n %{devname} %{_includedir}/btrfs/* %{_libdir}/libbtrfs.so + +#---------------------------------------------------------------------------- + +%prep +%setup -qn %{name}-v%{version} +%apply_patches + +%build +%make CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" + +%install +%makeinstall_std \ + bindir=%{_root_sbindir} \ + libdir=%{_root_libdir} \ + incdir=%{_includedir}/btrfs \ + mandir=%{_mandir} + +rm -f %{buildroot}%{_root_libdir}/*.a +mkdir -p %{buildroot}%{_libdir} +mv %{buildroot}%{_root_libdir}/libbtrfs.so %{buildroot}%{_libdir}/ + +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +cp %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/btrfs +