From 17042b4cf052af57ba7a8994adfd4e45185d4553 Mon Sep 17 00:00:00 2001 From: "lauren n. liberda" Date: Fri, 3 Nov 2023 10:50:41 +0100 Subject: [PATCH] add a generator for pkgconfig files --- .gitignore | 1 + scripts/generate_pkgconfig.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 scripts/generate_pkgconfig.sh diff --git a/.gitignore b/.gitignore index d2551165..184086c0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ Cargo.lock target **/*.rs.bk +lol-html.pc diff --git a/scripts/generate_pkgconfig.sh b/scripts/generate_pkgconfig.sh new file mode 100755 index 00000000..ca59e598 --- /dev/null +++ b/scripts/generate_pkgconfig.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -eu + +cat << EOF > lol-html.pc +prefix=${PREFIX:-/usr} +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib +includedir=\${prefix}/include + +Name: lol-html +Description: Low output latency streaming HTML parser/rewriter +Version: $(cargo metadata --format-version=1 --no-deps --manifest-path=c-api/Cargo.toml | jq -r '.packages[0].version') + +Requires: +Libs: -L\${libdir} -llolhtml +Cflags: -I\${includedir} +EOF