misc: added run-cmake.sh.
[profile/ivi/genivi/genivi-audio-manager.git] / cmake / add_package_dependencies.sh
1 # Copyright (C) 2012, BMW AG
2 #
3 # This file is part of GENIVI Project AudioManager.
4
5 # Contributions are licensed to the GENIVI Alliance under one or more
6 # Contribution License Agreements.
7
8 # copyright
9 # This Source Code Form is subject to the terms of the
10 # Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with
11 # this file, You can obtain one at http://mozilla.org/MPL/2.0/.
12
13 # author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
14 #
15 # For further information see http://www.genivi.org/.
16 #
17
18 PACKAGE_NAME=$1
19 PACKAGE_NAME_PATH=$2/$PACKAGE_NAME
20 TMPDIR=`mktemp -d /tmp/gen.XXXXXXXXXX` || exit 1
21 dpkg-deb -x "$PACKAGE_NAME_PATH" "$TMPDIR"
22 dpkg-deb --control "$PACKAGE_NAME_PATH" "$TMPDIR"/DEBIAN
23 cat "$TMPDIR"/DEBIAN/control | sed -e "s/Depends.*$/Depends: $3/" > "$TMPDIR"/DEBIAN/control_
24 cp "$TMPDIR"/DEBIAN/control_ "$TMPDIR"/DEBIAN/control
25 dpkg -b "$TMPDIR" "$PACKAGE_NAME_PATH"
26 rm -r "$TMPDIR"
27