Commit | Line | Data |
---|---|---|
92db5083 DB |
1 | #!/bin/sh |
2 | ||
3 | . avbuild/config.sh | |
4 | ||
5 | if test "$shared" = "yes"; then | |
6 | shared=true | |
7 | else | |
8 | shared=false | |
9 | fi | |
10 | ||
11 | shortname=$1 | |
12 | name=lib${shortname} | |
13 | comment=$2 | |
14 | libs=$(eval echo \$extralibs_${shortname}) | |
15 | requires=$(eval echo \$requires_${shortname}) | |
16 | requires=${requires%, } | |
17 | ||
18 | version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2) | |
19 | ||
20 | cat <<EOF > $name/$name.pc | |
21 | prefix=$prefix | |
22 | exec_prefix=\${prefix} | |
23 | libdir=$libdir | |
24 | includedir=$incdir | |
25 | ||
26 | Name: $name | |
27 | Description: $comment | |
28 | Version: $version | |
29 | Requires: $($shared || echo $requires) | |
30 | Requires.private: $($shared && echo $requires) | |
31 | Conflicts: | |
32 | Libs: -L\${libdir} -l${shortname} $($shared || echo $libs) | |
33 | Libs.private: $($shared && echo $libs) | |
34 | Cflags: -I\${includedir} | |
35 | EOF | |
36 | ||
37 | cat <<EOF > $name/$name-uninstalled.pc | |
38 | prefix= | |
39 | exec_prefix= | |
40 | libdir=\${pcfiledir} | |
41 | includedir=${source_path} | |
42 | ||
43 | Name: $name | |
44 | Description: $comment | |
45 | Version: $version | |
46 | Requires: $requires | |
47 | Conflicts: | |
48 | Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs | |
49 | Cflags: -I\${includedir} | |
50 | EOF |