| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# Copyright 2026 Brad Lanam Pleasant Hill CA |
| 4 |
# |
| 5 |
|
| 6 |
INST_PKGCDIR=$1 |
| 7 |
PREFIX=$2 |
| 8 |
INCDIR=$3 |
| 9 |
LIBDIR=$4 |
| 10 |
|
| 11 |
if [ "x${INST_PKGCDIR}" = x ]; then |
| 12 |
echo "instpc.sh: installation dir not specified" |
| 13 |
exit 1 |
| 14 |
fi |
| 15 |
|
| 16 |
if [ "x${PREFIX}" = x ]; then |
| 17 |
echo "instpc.sh: prefix dir not specified" |
| 18 |
exit 1 |
| 19 |
fi |
| 20 |
|
| 21 |
if [ "x${INCDIR}" = x ]; then |
| 22 |
echo "instpc.sh: include dir not specified" |
| 23 |
exit 1 |
| 24 |
fi |
| 25 |
|
| 26 |
if [ "x${LIBDIR}" = x ]; then |
| 27 |
echo "instpc.sh: include dir not specified" |
| 28 |
exit 1 |
| 29 |
fi |
| 30 |
|
| 31 |
. ./VERSION.txt |
| 32 |
|
| 33 |
test -d ${INST_PKGCDIR} || mkdir -p ${INST_PKGCDIR} |
| 34 |
cat di.pc.in | \ |
| 35 |
sed -e "s,@prefix@,${PREFIX},g" \ |
| 36 |
-e "s,@includedir@,${INCDIR},g" \ |
| 37 |
-e "s,@libdir@,${LIBDIR},g" \ |
| 38 |
-e "s,@DI_VERSION@,${DI_VERSION},g" \ |
| 39 |
> ${INST_PKGCDIR}/di.pc |
| 40 |
|
| 41 |
exit 0 |