~ubuntu-branches/debian/sid/flickcurl/sid

« back to all changes in this revision

Viewing changes to flickcurl-config.in

  • Committer: Package Import Robot
  • Author(s): Kumar Appaiah
  • Date: 2014-01-12 08:20:42 UTC
  • mfrom: (1.4.2)
  • Revision ID: package-import@ubuntu.com-20140112082042-7p31zl22mw4ohbcd
Tags: 1.25-1
* New upstream release
* Standards version is now 3.9.5 (no changes needed)
* Multiarch conversion
  + Switch to dh based rules file
  + Add ${misc:Pre-Depends} and Multi-Arch: same for libflickcurl0
  + Alter install files to accommodate the multiarch path

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
#
3
 
# Copyright (C) 2007-2009, David Beckett http://www.dajobe.org/
 
3
# Copyright (C) 2007-2013, David Beckett http://www.dajobe.org/
4
4
5
5
 
6
 
PACKAGE=@PACKAGE@
7
 
PKGCONFIG=pkg-config
 
6
# Packaging
 
7
PACKAGE="@PACKAGE@"
 
8
VERSION="@VERSION@";
 
9
VERSION_DECIMAL="@FLICKCURL_VERSION_DECIMAL@";
 
10
 
 
11
program=`basename $0`
 
12
 
 
13
# pkg-config like vars
 
14
prefix=@prefix@
 
15
exec_prefix=@exec_prefix@
 
16
libdir=@libdir@
 
17
includedir=@includedir@
 
18
 
8
19
 
9
20
usage()
10
21
{
11
22
        cat<<EOF
12
 
Usage: $PACKAGE-config [OPTION]
 
23
Usage: $program [OPTION]
13
24
 
14
25
Known values for OPTION are:
15
26
 
16
27
  --prefix              print installation prefix path
17
 
  --prefix=DIR          IGNORED
18
28
  --libs                print library linking information
19
 
  --libtool-libs        IGNORED
20
29
  --private-libs        print library private/static linking information
21
30
  --cflags              print pre-processor and compiler flags
22
31
  --help                display this help and exit
32
41
fi
33
42
 
34
43
 
35
 
if $PKGCONFIG $PACKAGE --exists; then
36
 
  : # exists
37
 
else
38
 
  echo "$0: $PKGCONFIG does not know about package $PACKAGE"
39
 
  exit 1
40
 
fi
41
 
 
42
44
args=""
43
45
while test $# -gt 0; do
44
46
  case "$1" in
51
53
    --help|--usage)
52
54
      usage 0
53
55
      ;;
54
 
# Ignored options
55
 
    --libtool-libs|--prefix=*)
56
 
      echo "$0: $1 option ignored" 1>&2
57
 
      ;;
58
 
# Altered options
59
56
    --prefix)
60
 
      args="$args --variable=prefix";
 
57
      echo "${prefix}"
 
58
      exit 0
 
59
      ;;
 
60
    --libs)
 
61
      echo "-L${libdir} -lflickcurl"
 
62
      exit 0
 
63
      ;;
 
64
    --cflags)
 
65
      echo "-I${includedir}"
 
66
      exit 0
 
67
      ;;
 
68
    --private-libs)
 
69
      echo "@LIBS@"
 
70
      exit 0
61
71
      ;;
62
72
    --version)
63
 
      args="$args --modversion";
64
 
      ;;
65
 
    --private-libs)
66
 
      args="$args --static --libs";
67
 
      ;;
68
 
# Computed here
 
73
      echo "${VERSION}"
 
74
      exit 0
 
75
      ;;
69
76
    --version-decimal)
70
 
      version=`$PKGCONFIG $PACKAGE --modversion`
71
 
      version_dec=0
72
 
      for multiplier in 10000 100 1; do
73
 
        version_part=`echo $version | sed -e 's/\..*$//'`
74
 
        version_dec=`expr $multiplier \* $version_part + $version_dec`
75
 
        if [ $version = $version_part ]; then
76
 
          version=0
77
 
        else
78
 
          version=`echo $version | sed -e 's/^[^.]*\.//'`
79
 
        fi
80
 
      done
81
 
      echo $version_dec
 
77
      echo "${VERSION_DECIMAL}"
82
78
      exit 0
83
79
      ;;
84
 
# Other options are passed through
 
80
# Other options are ignored as illegal
85
81
      *)
86
 
      args="$args $1"
 
82
      echo "$program: unrecognized argument \`$1'" 1>&2
 
83
      break
87
84
      ;;
88
85
  esac
89
86
 
90
87
  shift
91
88
done
92
89
  
93
 
 
94
 
$PKGCONFIG $PACKAGE $args
 
90
echo "$program: Try $program --help" 1>&2
 
91
exit 1