- Fixed specfile so it will actually build.

This commit is contained in:
Brian C. Lane 2015-10-06 14:56:23 -07:00
parent 5f19b20a82
commit 4e8735583d

View File

@ -2,13 +2,12 @@ Summary: A python module for system storage configuration
Name: python-blivet Name: python-blivet
Url: http://fedoraproject.org/wiki/blivet Url: http://fedoraproject.org/wiki/blivet
Version: 1.15 Version: 1.15
Release: 1%{?dist} Release: 2%{?dist}
Epoch: 1 Epoch: 1
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
%define realname blivet %define realname blivet
Source0: http://github.com/dwlehman/blivet/archive/%{realname}-%{version}.tar.gz Source0: http://github.com/dwlehman/blivet/archive/%{realname}-%{version}.tar.gz
%global with_python3 1
# Versions of required components (done so we make sure the buildrequires # Versions of required components (done so we make sure the buildrequires
# match the requires versions of things). # match the requires versions of things).
@ -22,12 +21,9 @@ Source0: http://github.com/dwlehman/blivet/archive/%{realname}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: gettext BuildRequires: gettext
BuildRequires: python-setuptools BuildRequires: python2-devel python2-setuptools
BuildRequires: python3-pocketlint >= %{pocketlintver} BuildRequires: python3-pocketlint >= %{pocketlintver}
%if 0%{with_python3}
BuildRequires: python3-devel python3-setuptools BuildRequires: python3-devel python3-setuptools
%endif
Requires: python Requires: python
Requires: python-six Requires: python-six
@ -58,7 +54,6 @@ Summary: Data for the %{realname} python module.
The %{realname}-data package provides data files required by the %{realname} The %{realname}-data package provides data files required by the %{realname}
python module. python module.
%if 0%{with_python3}
%package -n python3-%{realname} %package -n python3-%{realname}
Summary: A python3 package for examining and modifying storage configuration. Summary: A python3 package for examining and modifying storage configuration.
Requires: python3 Requires: python3
@ -81,46 +76,42 @@ Requires: %{realname}-data = %{epoch}:%{version}-%{release}
%description -n python3-%{realname} %description -n python3-%{realname}
The python3-%{realname} is a python3 package for examining and modifying storage The python3-%{realname} is a python3 package for examining and modifying storage
configuration. configuration.
%endif
%prep %prep
%setup -q -n %{realname}-%{version} %setup -q -n %{realname}-%{version}
%if 0%{?with_python3}
rm -rf %{py3dir} rm -rf %{py3dir}
cp -a . %{py3dir} cp -a . %{py3dir}
%endif
%build %build
make make
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make DESTDIR=%{buildroot} install make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%find_lang %{realname} %find_lang %{realname}
%if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
make PYTHON=%{__python3} DESTDIR=%{buildroot} install make PYTHON=%{__python3} DESTDIR=%{buildroot} install
popd popd
%endif
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%license COPYING %license COPYING
%doc README ChangeLog examples %doc README ChangeLog examples
%{python_sitelib}/* %{python2_sitelib}/*
%files -n %{realname}-data -f %{realname}.lang %files -n %{realname}-data -f %{realname}.lang
%if 0%{?with_python3}
%files -n python3-%{realname} %files -n python3-%{realname}
%license COPYING %license COPYING
%doc README ChangeLog examples %doc README ChangeLog examples
%{python3_sitelib}/* %{python3_sitelib}/*
%endif
%changelog %changelog
* Tue Oct 06 2015 Brian C. Lane <bcl@redhat.com> 1.15-2
- Fixed specfile so it will actually build.
* Fri Oct 02 2015 Brian C. Lane <bcl@redhat.com> - 1.15-1 * Fri Oct 02 2015 Brian C. Lane <bcl@redhat.com> - 1.15-1
- Update Makefile to default to python3. (dlehman) - Update Makefile to default to python3. (dlehman)
- Add test for extended partition minSize (vtrefny) - Add test for extended partition minSize (vtrefny)