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