diff --git a/gosa-core/dh-make-gosa b/gosa-core/dh-make-gosa
index ded67ec9064372c384043457e810d425fee98a32..4d9dfb705e516391aa677630744114fe01babf1e 100755 (executable)
--- a/gosa-core/dh-make-gosa
+++ b/gosa-core/dh-make-gosa
#!/bin/bash
usage() {
- echo "Usage: ${0##*/} [--download] [-b|--branch branch] [-e|--email mail] [--depends] plugin-dir|plugin.tar.gz" >&2
+ echo "Usage: ${0##*/} [--download] [--section section name] [-b|--branch branch] [-e|--email mail] [--depends] plugin-dir|plugin.tar.gz" >&2
exit 1
}
for dep in $TDEPENDS; do
PL_DEPENDS="gosa-plugin-$dep, $PL_DEPENDS"
done
+ TCONFLICTS=$(sed -n 's/"//g;s/^conflicts\s*=\s*\(.*\)$/\1/p' "$1")
+ for dep in $TCONFLICTS; do
+ PL_CONFLICTS="gosa-plugin-$dep, $PL_CONFLICTS"
+ done
PL_DESCRIPTION=$(sed -n 's/"//g;s/^description\s*=\s*\(.*\)$/\1/p' "$1")
PL_AUTHOR=$(sed -n 's/"//g;s/^author\s*=\s*\([^<]*\).*$/\1/p' "$1")
PL_MAIL=$(sed -n 's/"//g;s/^author\s*=[^<].*<\([^>]*\).*$/\1/p' "$1")
}
-TEMP=`getopt -o e:r: --long download,release:,email:,depends: -n 'dh-make-gosa' -- "$@"`
+TEMP=`getopt -o e:r: --long download,release:,email:,depends:,section: -n 'dh-make-gosa' -- "$@"`
if [ $? != 0 ] ; then
echo "Error: cannot get command line information" >&2
exit 1
RELEASE=trunk
DOWNLOAD=
DEPENDS=
+SECTION=web
DEST=
while true; do
case "$1" in
--depends) DEPENDS="$2"
shift 2
;;
+ --section) SECTION="$2"
+ shift 2
+ ;;
--dest) DEST=$2/
shift 2
;;
echo "Version: $PL_VERSION"
echo "Description: $PL_DESCRIPTION"
echo "Depends: $PL_DEPENDS"
+echo "Conflicts: $PL_CONFLICTS"
echo "Author name: $PL_AUTHOR"
echo "Author email: $PL_MAIL"
echo
echo "Apdapting debian descriptive files..."
# Generate install file
-for dir in admin personal addons; do
+for dir in admin personal addons gofax gofon generic; do
[ -d $dir ] && echo -e "$dir\t\t\t/usr/share/gosa/plugins" >> debian/install
done
for dir in help/*; do
sed -i '/^Upstream/,/^$/d' debian/copyright
# Adapt control
-sed -i 's/^Section: unknown/Section: web/g' debian/control
+sed -i "s#^Section: unknown#Section: $SECTION#g" debian/control
sed -i 's/^Architecture: any/Architecture: all/g' debian/control
-sed -i 's/^Depends: .*$/Depends: gosa/g' debian/control
+if [ "$PL_DEPENDS" ]; then
+ sed -i "s/^Depends: .*$/Depends: gosa, $PL_DEPENDS/g" debian/control
+else
+ sed -i 's/^Depends: .*$/Depends: gosa/g' debian/control
+fi
+if [ "$PL_CONFLICTS" ]; then
+ sed "11Conflicts: $PL_CONFLICTS" debian/control
+fi
sed -i 's/^\(Build-Depends: .*\)$/\1, dpatch/g' debian/control
sed -i "s/^Description: .*$/Description: $PL_NAME plugin for GOsa/g" debian/control
sed -i "s/^ <.*$/ %DESCRIPTION%/g" debian/control