blob: 386dd9cf16b5cfa3dccdf1e0c496ae1551ff2797 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/sh
# See LICENSE file for copyright and license details.
VERSION=0.0.1
while [ $# -gt 0 ]
do
case $1 in
-p|--prefix)
shift
PREFIX=$1
;;
-n|--name)
shift
NAME=$1
;;
-ln|--lib-name)
shift
LIBNAME=$1
;;
-d|--description)
shift
DESCR=$1
;;
-v|--version)
shift
VERSION=$1
;;
*)
TARGET=$1
;;
esac
shift
done
if [ -z $PREFIX ]; then
echo 'prefix must be set'
exit 1
elif [ -z $NAME ]; then
echo 'name must be set'
exit 1
fi
cat <<EOF > $TARGET
prefix=$PREFIX
exec_prefix=\${prefix}
includedir=\${prefix}/include
libdir=\${exec_prefix}/lib
Name: $NAME
Description: $DESCR
Version: $VERSION
Cflags: -I\${includedir}
Libs: -L\${libdir} -l$NAME
EOF
|