/[packages]/cauldron/waf/current/SPECS/waf.spec
ViewVC logotype

Contents of /cauldron/waf/current/SPECS/waf.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1932250 - (show annotations) (download)
Wed Jan 11 09:37:51 2023 UTC (8 months, 1 week ago) by kekepower
File size: 3621 byte(s)
- Update to version 2.0.25

1 %define debug_package %{nil}
2
3 %global __requires_exclude perl\\(Exporter\\)|perl\\(XSLoader\\)
4
5 %define with_docs 1
6
7 Summary: A framework for configuring, compiling and installing applications
8 Name: waf
9 Version: 2.0.25
10 Release: %mkrel 1
11 License: BSD and Python
12 Group: Development/Tools
13 Url: https://waf.io/
14 # Original tarfile can be found at
15 # https://waf.io/waf-%%{version}.tar.bz2
16 # We remove docs/book, as this is under CC-BY-NC-ND, which is not
17 # allowed in Mageia.
18 # We remove Waf logos ./docs/gfx/waflogo.svg ./docs/slides/presentation/gfx/waflogo.svg ./docs/sphinx/_images/waf-64x64.png
19 # - Waf logos, licensed CC BY-NC
20 Source0: waf-%{version}.stripped.tar.xz
21 Source1: macros.waf
22 Source3: repack.sh
23 Patch0: waf-1.8.11-libdir.patch
24 Patch1: waf-1.6.9-logo.patch
25 Patch2: waf-1.8.11-sphinx-no-W.patch
26 Patch3: pyext-linking.patch
27 BuildArch: noarch
28 BuildRequires: pkgconfig(python3)
29 %if %{with_docs}
30 BuildRequires: python3dist(sphinx)
31 BuildRequires: graphviz
32 BuildRequires: imagemagick
33 Recommends: %{name}-doc
34 %endif
35 BuildConflicts: waf
36 Requires: python(abi) = %{python3_version}
37 Provides: waf-python3 = %{version}-%{release}
38 Obsoletes: waf-python3 < 2.0.18-2
39
40 %description
41 Waf is a Python-based framework for configuring, compiling and installing
42 applications. It derives from the concepts of other build tools such as
43 Scons, Autotools, CMake, and Ant.
44
45 %if %{with_docs}
46 %package -n %{name}-doc
47 Summary: Documentation for %{name}
48 Group: Documentation
49
50 %description -n %{name}-doc
51 Waf is a Python-based framework for configuring, compiling and
52 installing applications. It is a replacement for other tools such as
53 Autotools, Scons, CMake or Ant.
54 This package contains the HTML documentation for %{name}.
55 %endif
56
57 %prep
58 %setup -q
59 %autopatch -p1
60
61 # remove BOM, causes trouble later
62 sed -i -e '1s/^\xEF\xBB\xBF//' waflib/extras/dpapi.py
63
64 # add missing quotes, see rhbz#914566 and
65 # https://code.google.com/p/waf/issues/detail?id=1263
66 sed -i -e 's@fontname=\(Vera.*sans\),@fontname="\1",@g' \
67 docs/sphinx/conf.py \
68 docs/sphinx/coremodules.rst \
69 docs/sphinx/featuremap.rst
70
71 %build
72 extras=
73 for f in waflib/extras/*.py ; do
74 f=$(basename "$f" .py);
75 if [ "$f" != "__init__" ]; then
76 extras="${extras:+$extras,}$f" ;
77 fi
78 done
79 %{__python3} ./waf-light --make-waf --strip --tools="$extras"
80
81 %if %{with_docs}
82 # build html docs
83 pushd docs/sphinx
84 ../../waf configure build
85 popd
86 %endif
87
88 %install
89 # use waf so it unpacks itself
90 mkdir -p _temp
91 pushd _temp
92 cp -av ../waf .
93 %{__python3} ./waf >/dev/null 2>&1
94 pushd .waf3-%{version}-*
95 find . -name '*.py' -printf '%%P\0' |
96 xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf3/{}
97 popd
98 popd
99
100 install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python3_version}
101
102 ln -s waf-%{python3_version} %{buildroot}%{_bindir}/waf
103
104 # remove shebangs from and fix EOL for all scripts in wafadmin
105 find %{buildroot}%{_datadir}/ -name '*.py' \
106 -exec sed -i -e '1{/^#!/d}' -e 's|\r$||g' {} \;
107
108 # fix waf script shebang line
109 %py3_shebang_fix %{buildroot}%{_bindir}/waf-%{python3_version}
110
111 # remove x-bits from everything going to doc
112 find demos utils -type f -exec chmod 0644 {} \;
113
114 # remove hidden file
115 rm -f docs/sphinx/build/html/.buildinfo
116
117 # install waf rpm macro helper
118 install -Dpm644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.waf
119
120 # do byte compilation
121 %py_byte_compile %{__python3} %{buildroot}%{_datadir}/waf3
122
123 %if %{with_docs}
124 %files -n %{name}-doc
125 %doc docs/sphinx/build/html
126 %doc README* ChangeLog demos
127 %endif
128
129 %files
130 %{_rpmmacrodir}/macros.waf
131 %{_bindir}/%{name}
132 %{_bindir}/%{name}-%{python3_version}
133 %{_datadir}/waf3/

  ViewVC Help
Powered by ViewVC 1.1.28