numato-mimasv2: works fine with 6.6.x/6.9.x
[openadk.git] / scripts / make-ipkg-dir.sh
blob0ace8cda5af0f22d33613c8a01788c58138c5136
1 BASE=http://www.openadk.org/distfiles
2 TARGET=$1
3 CONTROL=$2
4 VERSION=$3
5 ARCH=$4
7 WD=$(pwd)
9 mkdir -p "$TARGET/CONTROL"
10 grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control"
11 grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \
12 echo "Maintainer: Waldemar Brodkorb <wbx@openadk.org>" >> "$TARGET/CONTROL/control"
13 grep '^Priority' "$CONTROL" 2>&1 >/dev/null || \
14 echo "Priority: optional" >> "$TARGET/CONTROL/control"
15 grep '^Source' "$CONTROL" 2>&1 >/dev/null || {
16 pkgbase=$(echo "$WD" | sed -e "s|^$ADK_TOPDIR/||g")
17 [ "$pkgbase" = "$WD" ] && src="N/A" || src="$BASE"
18 echo "Source: $src" >> "$TARGET/CONTROL/control"
20 echo "Version: $VERSION" >> "$TARGET/CONTROL/control"
21 echo "Architecture: $ARCH" >> "$TARGET/CONTROL/control"
22 chmod 644 "$TARGET/CONTROL/control"