147 lines
4.1 KiB
RPMSpec
147 lines
4.1 KiB
RPMSpec
|
|
%global _description\
|
||
|
|
SCons is an Open Source software construction tool—that is, a next-generation \
|
||
|
|
build tool. Think of SCons as an improved, cross-platform substitute for the \
|
||
|
|
classic Make utility with integrated functionality similar to autoconf/automake \
|
||
|
|
and compiler caches such as ccache. In short, SCons is an easier, more reliable \
|
||
|
|
and faster way to build software.
|
||
|
|
|
||
|
|
Name: scons
|
||
|
|
Version: 3.0.1
|
||
|
|
Release: 10
|
||
|
|
Summary: A software construction tool
|
||
|
|
License: MIT
|
||
|
|
URL: http://www.scons.org
|
||
|
|
Source: http://prdownloads.sourceforge.net/scons/scons-%{version}.tar.gz
|
||
|
|
|
||
|
|
BuildArch: noarch
|
||
|
|
|
||
|
|
%description %_description
|
||
|
|
|
||
|
|
%package -n python2-scons
|
||
|
|
Summary: A software construction tool
|
||
|
|
BuildRequires: python2-devel
|
||
|
|
Provides: scons = %{version}-%{release}
|
||
|
|
Obsoletes: scons < 3.0.1-4
|
||
|
|
%{?python_provide:%python_provide python2-scons}
|
||
|
|
|
||
|
|
%description -n python2-scons %_description
|
||
|
|
|
||
|
|
|
||
|
|
%package -n python3-scons
|
||
|
|
Summary: A software construction tool
|
||
|
|
BuildRequires: python3-devel
|
||
|
|
Provides: scons-python3 = %{version}-%{release}
|
||
|
|
%{?python_provide:%python_provide python3-%{name}}
|
||
|
|
|
||
|
|
%description -n python3-scons %_description
|
||
|
|
|
||
|
|
%package help
|
||
|
|
Summary: Documents for python-scons
|
||
|
|
Buildarch: noarch
|
||
|
|
|
||
|
|
%description help
|
||
|
|
Man pages and other related documents.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -p1 -c
|
||
|
|
|
||
|
|
cp -a %{name}-%{version} %{name}-%{version}-py3
|
||
|
|
sed -i 's|/usr/bin/env python|%{__python2}|' %{name}-%{version}/script/*
|
||
|
|
sed -i 's|/usr/bin/env python|%{__python3}|' %{name}-%{version}-py3/script/*
|
||
|
|
|
||
|
|
%build
|
||
|
|
cd %{name}-%{version}
|
||
|
|
%py2_build
|
||
|
|
cd -
|
||
|
|
cd %{name}-%{version}-py3
|
||
|
|
%py3_build
|
||
|
|
cd -
|
||
|
|
|
||
|
|
%install
|
||
|
|
cd %{name}-%{version}-py3
|
||
|
|
%py3_install \
|
||
|
|
--standard-lib \
|
||
|
|
--install-scripts=%{_bindir} \
|
||
|
|
--install-data=%{_datadir} \
|
||
|
|
--no-install-bat \
|
||
|
|
--no-version-script
|
||
|
|
cd ..
|
||
|
|
|
||
|
|
pushd %{buildroot}%{_bindir}
|
||
|
|
mv %{name} %{name}-3
|
||
|
|
mv %{name}-configure-cache %{name}-configure-cache-3
|
||
|
|
mv %{name}ign %{name}ign-3
|
||
|
|
mv %{name}-time %{name}-time-3
|
||
|
|
|
||
|
|
for link in %{name}-v%{version}-%{python3_version} \
|
||
|
|
%{name}-%{python3_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name}-3 $link
|
||
|
|
done
|
||
|
|
for link in %{name}ign-v%{version}-%{python3_version} \
|
||
|
|
%{name}ign-%{python3_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name}ign-3 $link
|
||
|
|
done
|
||
|
|
for link in %{name}-time-v%{version}-%{python3_version} \
|
||
|
|
%{name}-time-%{python3_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name}-time-3 $link
|
||
|
|
done
|
||
|
|
for link in %{name}-configure-cache-v%{version}-%{python3_version} \
|
||
|
|
%{name}-configure-cache-%{python3_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name}-configure-cache-3 $link
|
||
|
|
done
|
||
|
|
popd
|
||
|
|
|
||
|
|
cd %{name}-%{version}
|
||
|
|
%py2_install \
|
||
|
|
--standard-lib \
|
||
|
|
--no-install-bat \
|
||
|
|
--no-version-script \
|
||
|
|
--install-scripts=%{_bindir} \
|
||
|
|
--install-data=%{_datadir}
|
||
|
|
cd ..
|
||
|
|
|
||
|
|
pushd %{buildroot}%{_bindir}
|
||
|
|
for link in %{name}-2 %{name}-%{python2_version} \
|
||
|
|
%{name}-v%{version}-%{python2_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name} $link
|
||
|
|
done
|
||
|
|
for link in %{name}ign-2 %{name}ign-%{python2_version} \
|
||
|
|
%{name}ign-v%{version}-%{python2_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name}ign $link
|
||
|
|
done
|
||
|
|
for link in %{name}-time-2 %{name}-time-%{python2_version} \
|
||
|
|
%{name}-time-v%{version}-%{python2_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name}-time $link
|
||
|
|
done
|
||
|
|
for link in %{name}-configure-cache-2 %{name}-configure-cache-%{python2_version} \
|
||
|
|
%{name}-configure-cache-v%{version}-%{python2_version}; do
|
||
|
|
ln -fs %{_bindir}/%{name}-configure-cache $link
|
||
|
|
done
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files -n python2-scons
|
||
|
|
%license %{name}-%{version}/LICENSE.txt
|
||
|
|
%{_bindir}/%{name}
|
||
|
|
%{_bindir}/%{name}ign
|
||
|
|
%{_bindir}/%{name}-time
|
||
|
|
%{_bindir}/%{name}-configure-cache
|
||
|
|
%{_bindir}/%{name}*-2
|
||
|
|
%{_bindir}/%{name}*-%{python2_version}
|
||
|
|
%{python2_sitelib}/SCons/
|
||
|
|
%{python2_sitelib}/scons-%{version}*.egg-info
|
||
|
|
|
||
|
|
%files -n python3-%{name}
|
||
|
|
%license %{name}-%{version}-py3/LICENSE.txt
|
||
|
|
%{_bindir}/%{name}*-3
|
||
|
|
%{_bindir}/%{name}*-%{python3_version}
|
||
|
|
%{python3_sitelib}/SCons/
|
||
|
|
%{python3_sitelib}/scons-%{version}*.egg-info
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%doc %{name}-%{version}/{CHANGES,README,RELEASE}.txt
|
||
|
|
%{_mandir}/man?/*
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Sat Nov 30 2019 zhouyihang <zhouyihang1@huawei.com> - 3.0.1-10
|
||
|
|
- Package init
|