#!/bin/sh

if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] ; then
  echo "Illegal use."
  exit 1
fi

version="$1"
libdir="$2"
includedir="$3"

cat << EOF > "$libdir/pkgconfig/ucx.pc"
libdir=$libdir
includedir=$includedir

Name: ucx
Description: UAP Common Extensions
Copyright: Copyright (c) 2025 Mike Becker, Olaf Wintermann
License: BSD-2-Clause
URL: https://ucx.sourceforge.io
Version: $version
Libs: -L\${libdir} -lucx
Cflags: -I\${includedir}
EOF
