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 committed Nov 3, 2023
1 parent 44a7659 commit fdf954c
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 fdf954c

Please sign in to comment.