1 Star 0 Fork 5

李恬/gumbo-parser

forked from src-openEuler/gumbo-parser 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gumbo-parser.spec 3.21 KB
一键复制 编辑 原始数据 按行查看 历史
Name: gumbo-parser
Epoch: 1
Version: 0.10.1
Release: 2
Summary: A HTML5 parser
License: ASL 2.0
URL: https://github.com/google/gumbo-parser
Source0: https://github.com/google/gumbo-parser/archive/v0.10.1.tar.gz#/gumbo-parser-0.10.1.tar.gz
# Fix up Doxyfile
Patch1: 0001-Doxygen-tweaks.patch
# Autotool generated sources
Patch2: 0002-Autotool-generated-sources.patch
# For the tests
BuildRequires: gcc-c++
BuildRequires: gtest-devel
# For the docs
BuildRequires: doxygen
# For the python bindings
BuildRequires: python3-setuptools
BuildRequires: python3-devel
BuildRequires: make
%description
Gumbo is an implementation of the HTML5 parsing algorithm implemented as
a pure C99 library with no outside dependencies. It's designed to serve
as a building block for other tools and libraries such as linters,
validators, templating languages, and refactoring and analysis tools.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package python
Summary: Python bindings to %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
BuildArch: noarch
%description python
Python bindings to %{name}.
%prep
%setup -q -n %{name}-%{version}
%patch 1 -p1
# Package has autotools compatibility issues
# Use prebuilt autotool generated sources
%patch 2 -p1
# Fix up permissions
chmod +x config.guess config.sub configure \
depcomp install-sh missing test-driver
# Fix up timestamps
touch -r aclocal.m4 configure m4/*.m4 Makefile.in
# Update Doxyfile
doxygen -u Doxyfile
## Doxygen standard footers are not multilib-compliant
## Create a custom one.
touch footer.html
doxygen -w html /dev/null footer.html /dev/null Doxyfile
sed -i -e 's,\$generatedby,Generated on $date for $projectname by,' footer.html
# Propagate the version number into setup.py
# to fix egg version number
sed -i -e 's,{{VERSION}},%version,' setup.py
%build
%configure --disable-static --disable-silent-rules --docdir=%{_pkgdocdir}
make %{?_smp_mflags}
# Build doxgen docs
doxygen Doxyfile
# python bindings
%{__python3} setup.py build
%check
make check
%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
install -m 755 -d ${RPM_BUILD_ROOT}%{_mandir}/man3
install -m 644 docs/man/man3/*.3 ${RPM_BUILD_ROOT}%{_mandir}/man3
install -m 755 -d ${RPM_BUILD_ROOT}%{_pkgdocdir}
cp -r docs/html ${RPM_BUILD_ROOT}%{_pkgdocdir}
install -m 644 {COPYING,*.md} ${RPM_BUILD_ROOT}%{_pkgdocdir}
# python bindings
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%ldconfig_scriptlets
%files
%{_pkgdocdir}
%exclude %{_pkgdocdir}/html
%exclude %{_pkgdocdir}/*.md
%{_libdir}/*.so.*
%files devel
%doc %{_pkgdocdir}/html
%doc %{_pkgdocdir}/*.md
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/gumbo.pc
%{_mandir}/man3/*.3*
%files python
%{python3_sitelib}/*
%changelog
* Fri Dec 13 2024 litian <dev11105@linx-info.com> - 1:0.10.1-2
- fix %patchN is deprecated warning
* Wed Sep 22 2021 douyan <douyan@kylinos.cn> - 0.10.1-1
- Init package for openEuler
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/litian_code/gumbo-parser.git
git@gitee.com:litian_code/gumbo-parser.git
litian_code
gumbo-parser
gumbo-parser
master

搜索帮助