python-scons/scons.spec

113 lines
3.8 KiB
RPMSpec
Raw Normal View History

2020-06-04 11:32:15 +08:00
Name: scons
Version: 3.1.1
2020-10-29 14:45:36 +08:00
Release: 3
2020-06-04 11:32:15 +08:00
Summary: An Open Source software construction tool
License: MIT
URL: http://www.scons.org
Source0: https://github.com/SCons/scons/archive/scons-%{version}.tar.gz
Source1: https://scons.org/doc/%{version}/scons-doc-%{version}.tar.gz
BuildArch: noarch
%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
2019-12-02 22:04:29 +08:00
and faster way to build software.
2020-06-04 11:32:15 +08:00
%package doc
Summary: An Open Source software construction tool
BuildArch: noarch
2019-12-02 22:04:29 +08:00
2020-06-04 11:32:15 +08:00
%description doc
Scons HTML documentation.
2019-12-02 22:04:29 +08:00
2020-06-04 11:32:15 +08:00
%package -n python3-%{name}
Summary: An Open Source software construction tool
2019-12-02 22:04:29 +08:00
2020-06-04 11:32:15 +08:00
BuildRequires: python3-devel
Provides: scons = 0:%{version}-%{release}
Provides: scons-python3
Obsoletes: scons < 0:5.0.3-3
2019-12-02 22:04:29 +08:00
%{?python_provide:%python_provide python3-%{name}}
2020-06-04 11:32:15 +08:00
%description -n python3-%{name}
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.
2019-12-02 22:04:29 +08:00
2020-06-04 11:32:15 +08:00
%prep
%autosetup -c -a 1 -p1
2019-12-02 22:04:29 +08:00
2020-06-04 11:32:15 +08:00
# Remove unused doc directories
rm -rf PDF PS EPUB TEXT
2019-12-02 22:04:29 +08:00
2020-06-04 11:32:15 +08:00
# Convert to UTF-8
for file in %{name}-%{version}/src/*.txt; do
iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
touch -r $file $file.new && \
mv $file.new $file
done
2019-12-02 22:04:29 +08:00
cp -a %{name}-%{version} %{name}-%{version}-py3
2020-06-04 11:32:15 +08:00
sed -i 's|/usr/bin/env python|%{__python3}|' %{name}-%{version}-py3/bootstrap.py
sed -i 's|/usr/bin/env python|%{__python3}|' %{name}-%{version}-py3/src/script/*.py
2019-12-02 22:04:29 +08:00
%build
2020-06-04 11:32:15 +08:00
pushd %{name}-%{version}-py3
%{__python3} bootstrap.py --bootstrap_dir=build/scons
popd
2019-12-02 22:04:29 +08:00
%install
2020-06-04 11:32:15 +08:00
pushd %{name}-%{version}-py3/build/scons
%py3_install \
--standard-lib --no-install-bat --no-version-script \
--install-scripts=%{_bindir} --install-data=%{_datadir}
popd
pushd %{buildroot}%{_bindir}
for i in %{name}-3 %{name}-v%{version}-%{python3_version} %{name}-%{python3_version}; do
ln -fs %{_bindir}/%{name} %{buildroot}%{_bindir}/$i
2019-12-02 22:04:29 +08:00
done
2020-06-04 11:32:15 +08:00
for i in %{name}ign-3 %{name}ign-v%{version}-%{python3_version} %{name}ign-%{python3_version}; do
ln -fs %{_bindir}/%{name}ign %{buildroot}%{_bindir}/$i
2019-12-02 22:04:29 +08:00
done
2020-06-04 11:32:15 +08:00
for i in %{name}-time-3 %{name}-time-v%{version}-%{python3_version} %{name}-time-%{python3_version}; do
ln -fs %{_bindir}/%{name}-time %{buildroot}%{_bindir}/$i
2019-12-02 22:04:29 +08:00
done
2020-06-04 11:32:15 +08:00
for i in %{name}-configure-cache-3 %{name}-configure-cache-v%{version}-%{python3_version} %{name}-configure-cache-%{python3_version}; do
ln -fs %{_bindir}/%{name}-configure-cache %{buildroot}%{_bindir}/$i
2019-12-02 22:04:29 +08:00
done
popd
2020-06-04 11:32:15 +08:00
%check
pushd %{name}-%{version}-py3
%{__python3} runtest.py -P %{__python3} --passed --quit-on-failure src/engine/SCons/BuilderTests.py
popd
2019-12-02 22:04:29 +08:00
%files -n python3-%{name}
2020-06-04 11:32:15 +08:00
%doc %{name}-%{version}-py3/src/CHANGES.txt %{name}-%{version}-py3/src/README.txt %{name}-%{version}-py3/src/RELEASE.txt
%license %{name}-%{version}-py3/src/LICENSE.txt
2019-12-02 22:04:29 +08:00
%{_bindir}/%{name}*-3
2020-06-04 11:32:15 +08:00
%{_bindir}/%{name}
%{_bindir}/%{name}{ign,-time,-configure-cache}
2019-12-02 22:04:29 +08:00
%{_bindir}/%{name}*-%{python3_version}
%{python3_sitelib}/SCons/
%{python3_sitelib}/scons-%{version}*.egg-info
%{_mandir}/man?/*
2020-06-04 11:32:15 +08:00
%files doc
%doc HTML
%license %{name}-%{version}/src/LICENSE.txt
2019-12-02 22:04:29 +08:00
%changelog
2020-10-29 14:45:36 +08:00
* Tue Oct 20 2020 zhanghua <zhanghua40@huawei.com> - 3.1.1-3
- remove python2 subpackage
2020-06-04 11:32:15 +08:00
* Thu Jun 4 2020 Captain Wei <captain.a.wei@gmail.com> - 3.1.1-2
2020-06-19 11:34:26 +08:00
- update package version
* Sat Nov 30 2019 zhouyihang <zhouyihang1@huawei.com> - 3.0.1-10
2019-12-02 22:04:29 +08:00
- Package init