diff options
| author | Remi Collet <remi@remirepo.net> | 2026-03-24 09:24:34 +0100 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-03-24 09:24:34 +0100 |
| commit | e26c78f0cbe8e415203d8bb543f1a20bfcf9db4d (patch) | |
| tree | 141b0c8a54044f30eba33ccd4a1049c77169c019 | |
new package
| -rw-r--r-- | .gitignore | 9 | ||||
| -rw-r--r-- | 0001-add-support-for-pkg-config.patch | 59 | ||||
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | lexbor-files-by-license.txt | 13 | ||||
| -rw-r--r-- | lexbor.spec | 121 |
5 files changed, 206 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/0001-add-support-for-pkg-config.patch b/0001-add-support-for-pkg-config.patch new file mode 100644 index 0000000..4bc2396 --- /dev/null +++ b/0001-add-support-for-pkg-config.patch @@ -0,0 +1,59 @@ +From e33b80697f7c8036aae31268b2ee31b2aee1ce87 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Tue, 24 Mar 2026 08:54:53 +0100 +Subject: [PATCH] add support for pkg-config + +--- + CMakeLists.txt | 16 ++++++++++++++++ + lexbor.pc.in | 12 ++++++++++++ + 2 files changed, 28 insertions(+) + create mode 100644 lexbor.pc.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 15f6571..eb3dcff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -377,6 +377,22 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/") + ++################ ++## pkg-config configuration ++######################### ++find_package(PkgConfig) ++if (PKG_CONFIG_FOUND) ++ configure_file( ++ "${PROJECT_SOURCE_DIR}/lexbor.pc.in" ++ "${PROJECT_BINARY_DIR}/lexbor.pc" ++ @ONLY ++ ) ++ install( ++ FILES "${PROJECT_BINARY_DIR}/lexbor.pc" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" ++ ) ++endif() ++ + ################ + ## Build an RPM. + ######################### +diff --git a/lexbor.pc.in b/lexbor.pc.in +new file mode 100644 +index 0000000..c28b7a1 +--- /dev/null ++++ b/lexbor.pc.in +@@ -0,0 +1,12 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ ++ ++Name: @PROJECT_NAME@ ++Description: HTML Renderer library ++Version: @PROJECT_VERSION@ ++ ++Libs: -L${libdir} -l@PROJECT_NAME@ ++Cflags: -I${includedir} ++ +-- +2.53.0 + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/lexbor-files-by-license.txt b/lexbor-files-by-license.txt new file mode 100644 index 0000000..1d068fc --- /dev/null +++ b/lexbor-files-by-license.txt @@ -0,0 +1,13 @@ + +*No copyright* Apache License 2.0 +------------ + +Apache License 2.0 +------------ +NOTICE +README.md +packaging/deb/debian_in/copyright +packaging/deb/debian_main_in/copyright + +Apache License 2.0 and/or SIL Open Font License 1.1 +------------ diff --git a/lexbor.spec b/lexbor.spec new file mode 100644 index 0000000..3b71025 --- /dev/null +++ b/lexbor.spec @@ -0,0 +1,121 @@ +# remirepo/fedora spec file for lexbor +# +# SPDX-FileCopyrightText: Copyright 2026 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# + +%bcond_without tests +%bcond_with licensecheck + +# Github forge +%global gh_vend %{name} +%global gh_proj %{name} +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +%global tag v%{version} +# for EL-8 to avoid TAG usage +%global archivename %{gh_proj}-%{version} + +%global soname 2 + +Name: lexbor +Summary: HTML Renderer library +License: Apache-2.0 +Version: 2.7.0 +Release: 1%{?dist} +%forgemeta +URL: %{forgeurl} +Source0: %{forgesource} +# Use --with licensecheck to generate +Source3: %{name}-files-by-license.txt + +Patch0: 0001-add-support-for-pkg-config.patch + +ExcludeArch: %{ix86} + +BuildRequires: cmake >= 2.8.12 +BuildRequires: make +BuildRequires: gcc + + +%description +Crafting a Browser Engine with Simplicity and Flexibility. + +Lexbor is still in development, but the existing modules are already +production-ready. + +A set of fast, standards-compliant tools (modules) for working with modern +web technologies — HTML parsing, CSS processing, URL handling, and more. +These modules are production-ready today and form the foundation of a browser +engine in development. + + +%package devel +Summary: Header files and development libraries for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files and development libraries +for %{name}. + + +%prep +%forgesetup +%patch -P0 -p1 -b .pkgconfig + +%if %{with licensecheck} +LST=$(mktemp) + +licensecheck -r . | sed -e 's:^./::' >$LST +grep -v UNKNOWN $LST | sed -e 's/.*: //' | sort -u | while read lic +do + echo -e "\n$lic\n------------" + grep ": $lic\$" $LST | sed -e "s/: $lic//" +done | tee %{SOURCE3} +rm $LST +%endif + + +%build +%cmake \ +%if %{with tests} + -DLEXBOR_BUILD_TESTS=ON \ +%endif + -DLEXBOR_BUILD_EXAMPLES=OFF \ + -DLEXBOR_INSTALL_HEADERS=ON \ + -DLEXBOR_BUILD_SHARED=ON \ + -DLEXBOR_BUILD_STATIC=OFF + +%cmake_build + + +%install +%cmake_install + + +%if %{with tests} +%check +%ctest +%endif + + +%files +%license LICENSE +%doc CHANGELOG.md +%doc README.md +%doc SECURITY.md +%{_libdir}/lib%{name}.so.%{soname}* + +%files devel +%doc examples +%{_includedir}/%{name} +%{_libdir}/lib%{name}.so +%{_libdir}/cmake/%{name} +%{_libdir}/pkgconfig/%{name}.pc + + +%changelog +* Tue Mar 24 2026 Remi Collet <remi@remirepo.net> - 2.7.0-1 +- initial package |
