Skip to content

Commit

Permalink
add a generator for pkgconfig files
Browse files Browse the repository at this point in the history
  • Loading branch information
selfisekai authored and kornelski committed Nov 7, 2024
1 parent 045398f commit 17042b4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
Cargo.lock
target
**/*.rs.bk
lol-html.pc
18 changes: 18 additions & 0 deletions scripts/generate_pkgconfig.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 17042b4

Please sign in to comment.