1 Star 0 Fork 16

panchenbo/python-scons

forked from src-openEuler/python-scons 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
scons.spec 6.26 KB
一键复制 编辑 原始数据 按行查看 历史
panchenbo 提交于 2020-08-18 08:36 . update spec,modify doc to help
Name: scons
Version: 3.1.1
Release: 3
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
and faster way to build software.
%package help
Summary: Documents for python-scons
Buildarch: noarch
%description help
Man pages and other related documents.
%package -n python2-%{name}
Summary: An Open Source software construction tool
BuildRequires: python2-devel
%{?python_provide:%python_provide python2-%{name}}
Provides: scons-python2 = 0:%{version}-%{release}
%description -n python2-%{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.
%package -n python3-%{name}
Summary: An Open Source software construction tool
BuildRequires: python3-devel
Provides: scons = 0:%{version}-%{release}
Provides: scons-python3
Obsoletes: scons < 0:5.0.3-3
%{?python_provide:%python_provide python3-%{name}}
%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.
%prep
%autosetup -c -a 1 -p1
# Remove unused doc directories
rm -rf PDF PS EPUB TEXT
# 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
cp -a %{name}-%{version} %{name}-%{version}-py3
sed -i 's|/usr/bin/env python|%{__python2}|' %{name}-%{version}/bootstrap.py
sed -i 's|/usr/bin/env python|%{__python2}|' %{name}-%{version}/src/script/*.py
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
%build
pushd %{name}-%{version}-py3
%{__python3} bootstrap.py --bootstrap_dir=build/scons
popd
pushd %{name}-%{version}
%{__python2} bootstrap.py --bootstrap_dir=build/scons
popd
%install
pushd %{name}-%{version}/build/scons
%py2_install \
--standard-lib --no-install-bat --no-version-script \
--install-scripts=%{_bindir} --install-data=%{_datadir}
popd
mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-2
mv %{buildroot}%{_bindir}/%{name}-configure-cache %{buildroot}%{_bindir}/%{name}-configure-cache-2
mv %{buildroot}%{_bindir}/%{name}ign %{buildroot}%{_bindir}/%{name}ign-2
mv %{buildroot}%{_bindir}/%{name}-time %{buildroot}%{_bindir}/%{name}-time-2
pushd %{buildroot}%{_bindir}
for i in %{name}-%{python2_version} %{name}-v%{version}-%{python2_version}; do
ln -fs %{_bindir}/%{name}-2 %{buildroot}%{_bindir}/$i
done
for i in %{name}ign-%{python2_version} %{name}ign-v%{version}-%{python2_version}; do
ln -fs %{_bindir}/%{name}ign-2 %{buildroot}%{_bindir}/$i
done
for i in %{name}-time-%{python2_version} %{name}-time-v%{version}-%{python2_version}; do
ln -fs %{_bindir}/%{name}-time-2 %{buildroot}%{_bindir}/$i
done
for i in %{name}-configure-cache-%{python2_version} %{name}-configure-cache-v%{version}-%{python2_version}; do
ln -fs %{_bindir}/%{name}-configure-cache-2 %{buildroot}%{_bindir}/$i
done
popd
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
done
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
done
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
done
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
done
popd
%check
pushd %{name}-%{version}-py3
%{__python3} runtest.py -P %{__python3} --passed --quit-on-failure src/engine/SCons/BuilderTests.py
popd
pushd %{name}-%{version}
%{__python2} runtest.py -P %{__python2} --passed --quit-on-failure src/engine/SCons/BuilderTests.py
popd
%files -n python2-%{name}
%doc %{name}-%{version}/src/CHANGES.txt %{name}-%{version}/src/README.txt %{name}-%{version}/src/RELEASE.txt
%license %{name}-%{version}/src/LICENSE.txt
%{_bindir}/%{name}*-2
%{_bindir}/%{name}*-%{python2_version}
%{python2_sitelib}/SCons/
%{python2_sitelib}/scons-%{version}*.egg-info
%{_mandir}/man?/*
%files -n python3-%{name}
%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
%{_bindir}/%{name}*-3
%{_bindir}/%{name}
%{_bindir}/%{name}{ign,-time,-configure-cache}
%{_bindir}/%{name}*-%{python3_version}
%{python3_sitelib}/SCons/
%{python3_sitelib}/scons-%{version}*.egg-info
%{_mandir}/man?/*
%files help
%doc HTML
%license %{name}-%{version}/src/LICENSE.txt
%changelog
* Tue Aug 18 2020 chenbo pan <[email protected]> - 3.1.1-3
- update spec,modify doc to help
* Thu Jun 4 2020 Captain Wei <[email protected]> - 3.1.1-2
- update package version
* Sat Nov 30 2019 zhouyihang <[email protected]> - 3.0.1-10
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/panchenbo/python-scons.git
[email protected]:panchenbo/python-scons.git
panchenbo
python-scons
python-scons
master

搜索帮助