Import newer versions of the scripts upstream
This commit is contained in:
parent
a7f7e261e2
commit
11027828ff
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2011-2014 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2011-2015 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -29,6 +29,7 @@ PREFIX="/usr/local"
|
||||||
[ -f "../config.sh" ] && . "../config.sh"
|
[ -f "../config.sh" ] && . "../config.sh"
|
||||||
DEBUG="_debug"
|
DEBUG="_debug"
|
||||||
DEVNULL="/dev/null"
|
DEVNULL="/dev/null"
|
||||||
|
PROGNAME="pkgconfig.sh"
|
||||||
#executables
|
#executables
|
||||||
INSTALL="install -m 0644"
|
INSTALL="install -m 0644"
|
||||||
MKDIR="mkdir -m 0755 -p"
|
MKDIR="mkdir -m 0755 -p"
|
||||||
|
@ -40,7 +41,7 @@ SED="sed"
|
||||||
#debug
|
#debug
|
||||||
_debug()
|
_debug()
|
||||||
{
|
{
|
||||||
echo "$@" 1>&2
|
echo "$@" 1>&3
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ _debug()
|
||||||
#error
|
#error
|
||||||
_error()
|
_error()
|
||||||
{
|
{
|
||||||
echo "pkgconfig.sh: $@" 1>&2
|
echo "$PROGNAME: $@" 1>&2
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ _error()
|
||||||
#usage
|
#usage
|
||||||
_usage()
|
_usage()
|
||||||
{
|
{
|
||||||
echo "Usage: pkgconfig.sh [-c|-i|-u][-P prefix] target..." 1>&2
|
echo "Usage: $PROGNAME [-c|-i|-u][-P prefix] target..." 1>&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +105,7 @@ if [ -z "$VERSION" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKGCONFIG="$PREFIX/lib/pkgconfig"
|
PKGCONFIG="$PREFIX/lib/pkgconfig"
|
||||||
|
exec 3>&1
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
target="$1"
|
target="$1"
|
||||||
shift
|
shift
|
||||||
|
@ -121,7 +123,11 @@ while [ $# -gt 0 ]; do
|
||||||
if [ "$install" -eq 1 ]; then
|
if [ "$install" -eq 1 ]; then
|
||||||
source="${target#$OBJDIR}"
|
source="${target#$OBJDIR}"
|
||||||
$DEBUG $MKDIR -- "$PKGCONFIG" || exit 2
|
$DEBUG $MKDIR -- "$PKGCONFIG" || exit 2
|
||||||
$DEBUG $INSTALL "$target" "$PKGCONFIG/$source" || exit 2
|
basename="$source"
|
||||||
|
if [ "${source##*/}" != "$source" ]; then
|
||||||
|
basename="${source##*/}"
|
||||||
|
fi
|
||||||
|
$DEBUG $INSTALL "$target" "$PKGCONFIG/$basename"|| exit 2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2012-2014 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2012-2015 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -42,7 +42,7 @@ XSLTPROC="xsltproc --nonet --xinclude"
|
||||||
#debug
|
#debug
|
||||||
_debug()
|
_debug()
|
||||||
{
|
{
|
||||||
echo "$@" 1>&2
|
echo "$@" 1>&3
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +151,7 @@ fi
|
||||||
[ -z "$DATADIR" ] && DATADIR="$PREFIX/share"
|
[ -z "$DATADIR" ] && DATADIR="$PREFIX/share"
|
||||||
[ -z "$MANDIR" ] && MANDIR="$DATADIR/man"
|
[ -z "$MANDIR" ] && MANDIR="$DATADIR/man"
|
||||||
|
|
||||||
|
exec 3>&1
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
target="$1"
|
target="$1"
|
||||||
shift
|
shift
|
||||||
|
@ -194,7 +195,11 @@ while [ $# -gt 0 ]; do
|
||||||
#install
|
#install
|
||||||
if [ "$install" -eq 1 ]; then
|
if [ "$install" -eq 1 ]; then
|
||||||
source="${target#$OBJDIR}"
|
source="${target#$OBJDIR}"
|
||||||
$DEBUG $MKDIR -- "$instdir" || exit 2
|
dirname=
|
||||||
|
if [ "${source%/*}" != "$source" ]; then
|
||||||
|
dirname="/${source%/*}"
|
||||||
|
fi
|
||||||
|
$DEBUG $MKDIR -- "$instdir$dirname" || exit 2
|
||||||
$DEBUG $INSTALL "$target" "$instdir/$source" || exit 2
|
$DEBUG $INSTALL "$target" "$instdir/$source" || exit 2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -47,7 +47,7 @@ TOUCH="touch"
|
||||||
#debug
|
#debug
|
||||||
_debug()
|
_debug()
|
||||||
{
|
{
|
||||||
echo "$@" 1>&2
|
echo "$@" 1>&3
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,6 +110,7 @@ MODULE="$PACKAGE"
|
||||||
[ -z "$DATADIR" ] && DATADIR="$PREFIX/share"
|
[ -z "$DATADIR" ] && DATADIR="$PREFIX/share"
|
||||||
instdir="$DATADIR/gtk-doc/html"
|
instdir="$DATADIR/gtk-doc/html"
|
||||||
|
|
||||||
|
exec 3>&1
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
target="$1"
|
target="$1"
|
||||||
target="${target#$OBJDIR}"
|
target="${target#$OBJDIR}"
|
||||||
|
|
|
@ -28,13 +28,32 @@
|
||||||
PROGNAME="appbroker.sh"
|
PROGNAME="appbroker.sh"
|
||||||
#executables
|
#executables
|
||||||
APPBROKER="AppBroker"
|
APPBROKER="AppBroker"
|
||||||
|
DEBUG="_debug"
|
||||||
|
|
||||||
|
|
||||||
#functions
|
#functions
|
||||||
|
#appbroker
|
||||||
|
_appbroker()
|
||||||
|
{
|
||||||
|
target="$1"
|
||||||
|
appinterface="$2"
|
||||||
|
|
||||||
|
$DEBUG $APPBROKER -o "$target" "$appinterface"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#debug
|
||||||
|
_debug()
|
||||||
|
{
|
||||||
|
echo "$@" 1>&3
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#usage
|
#usage
|
||||||
_usage()
|
_usage()
|
||||||
{
|
{
|
||||||
echo "Usage: $APPBROKER target" 1>&2
|
echo "Usage: $PROGNAME [-c] target..." 1>&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +69,7 @@ while getopts "cO:P:" name; do
|
||||||
export "${OPTARG%%=*}"="${OPTARG#*=}"
|
export "${OPTARG%%=*}"="${OPTARG#*=}"
|
||||||
;;
|
;;
|
||||||
P)
|
P)
|
||||||
#we can ignore it
|
#XXX ignored for compatibility
|
||||||
;;
|
;;
|
||||||
?)
|
?)
|
||||||
_usage
|
_usage
|
||||||
|
@ -58,16 +77,21 @@ while getopts "cO:P:" name; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
_usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ "$clean" -ne 0 ] && exit 0
|
[ "$clean" -ne 0 ] && exit 0
|
||||||
|
|
||||||
target="$1"
|
exec 3>&1
|
||||||
source="${target#$OBJDIR}"
|
while [ $# -gt 0 ]; do
|
||||||
APPINTERFACE="${source##*/}"
|
target="$1"
|
||||||
APPINTERFACE="../data/${APPINTERFACE%%.h}.interface"
|
shift
|
||||||
LD_LIBRARY_PATH="${OBJDIR}../src" $APPBROKER -o "$target" "$APPINTERFACE"
|
|
||||||
|
source="${target#$OBJDIR}"
|
||||||
|
appinterface="${source##*/}"
|
||||||
|
appinterface="../data/${appinterface%%.h}.interface"
|
||||||
|
_appbroker "$target" "$appinterface" || exit 2
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user