soup_xmlrpc_value_get_int gets values to glong variable
[irreco.git] / script / fix-pkg-config.sh
blob0852fcebfa076b6d7a1a2ac83f984d7a4bc53546
1 #!/bin/sh
2 cd `dirname "$0"`
3 cd ..
6 # Pkg-config files are built so that they give correct paths
7 # if they are used to create a DEV package, however, they do
8 # not give correct paths if we want to get stuff directly from
9 # irreco sources.
11 # This script creates modified pkg-config files which point
12 # directly to irreco sources. This ensures that linking works.
15 IRRECO_DIR='./irreco'
17 fix_pkg_config_path_main()
19 ARGS=("$@")
20 case "$1" in
21 --path|path) fix_pkg_config_path "${ARGS[@]:1}";;
22 --clean|clean) fix_pkg_config_clean "${ARGS[@]:1}";;
23 *) echo "Error: Unknown command \"$1\"";
24 exit 1;;
25 esac
28 fix_pkg_config_path()
30 grep -v '^Cflags:' $IRRECO_DIR/data/irreco.pc > ./script/tmp/irreco.pc
31 echo -n "Cflags: -I" >> ./script/tmp/irreco.pc
32 echo -n `readlink -f $IRRECO_DIR/src/api` >> ./script/tmp/irreco.pc
33 echo -n " -I" >> ./script/tmp/irreco.pc
34 echo -n `readlink -f $IRRECO_DIR/src/util` >> ./script/tmp/irreco.pc
35 echo >> ./script/tmp/irreco.pc
37 grep -v '^Libs:' $IRRECO_DIR/data/irreco-util.pc > ./script/tmp/irreco-util.pc
38 echo -n "Libs: -L" >> ./script/tmp/irreco-util.pc
39 echo -n "$1" >> ./script/tmp/irreco-util.pc
40 echo -n " -l_irreco_util" >> ./script/tmp/irreco-util.pc
41 echo >> ./script/tmp/irreco.pc
44 fix_pkg_config_clean()
46 rm -fv ./script/tmp/irreco.pc
47 rm -fv ./script/tmp/irreco-util.pc
50 fix_pkg_config_path_main "$@"