mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 20:13:32 +01:00
Fix modules build after adding creation of pkg-config files. Signed-off-by: Jan Lindemann <jan@janware.com>
62 lines
881 B
Bash
62 lines
881 B
Bash
#!/bin/bash
|
|
|
|
usage()
|
|
{
|
|
cat <<- EOT | sed 's/^ *|//'
|
|
|
|
|
| $myname [options]
|
|
|
|
|
| options are
|
|
|
|
|
| -h: display this help message and exit sucessfully
|
|
| -F filename read project description file
|
|
| -d "description" use description
|
|
|
|
|
EOT
|
|
goodbye $1
|
|
}
|
|
|
|
set -e
|
|
|
|
project_descr_file="$1"
|
|
myname=`basename $0`
|
|
|
|
eval set -- `getopt -- F:d: "$@"`
|
|
|
|
while [ "$1" != -- ]; do
|
|
case $1 in
|
|
-h)
|
|
usage 0;;
|
|
-F)
|
|
project_descr_file="$2"
|
|
shift
|
|
;;
|
|
-d)
|
|
description="$2"
|
|
shift
|
|
;;
|
|
*)
|
|
usage 1;;
|
|
esac
|
|
shift
|
|
done
|
|
shift
|
|
|
|
[ -r "$project_descr_file" ] && {
|
|
. ytools-functions.sh
|
|
descr=`_ytools_cat_section "$project_descr_file" description`
|
|
}
|
|
|
|
cat <<-EOT
|
|
prefix=/usr
|
|
exec_prefix=\${prefix}
|
|
includedir=\${prefix}/include
|
|
libdir=\${exec_prefix}/lib
|
|
|
|
Name: foo
|
|
Description: $descr
|
|
Version: 1.0.0
|
|
Cflags: -I\${includedir}/foo
|
|
Libs: -L\${libdir} -lfoo
|
|
EOT
|
|
|