create-mk*.sh: Make Debian packaging start a build

Further Debian packaging support, it now starts a build at least.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2015-05-26 12:28:07 +00:00
commit 872348e810
3 changed files with 71 additions and 16 deletions

View file

@ -1,6 +1,73 @@
#!/bin/sh #!/bin/bash
export LANG=POSIX
dir=`dirname $0`
inifile=$1
. $dir/ini-tools.sh
cat << EOT cat << EOT
mkdir -p debian
cd debian
changelog()
{
#dch -c /dev/stdout --create -v \$VERSION-\$RELEASE --package \$NAME
cat << EOF
\$NAME (\$VERSION-\$RELEASE) UNRELEASED; urgency=medium
* Initial release. (Closes: #XXXXXX)
-- Jan Lindemann <jan@janware.com> `date -R`
EOF
}
compat()
{
echo -n 9
}
control()
{
cat << EOF
Source: \$NAME
Maintainer: Jan Lindemann <jan@janware.com>
Section: `ini_value global.group`
Priority: optional
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 9)
Package: \$NAME-run
Architecture: any
Depends: \${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN, \$REQUIRES_DEVEL
Description: `ini_value summary`
`ini_value description`
EOF
}
copyright()
{
echo -n ""
}
format()
{
echo "3.0 (quilt)"
}
rules()
{
cat << "EOF"
#!/usr/bin/make -f
%:
EOF
echo -e "\tdh \$""@"
}
for file in changelog compat control copyright format rules; do
\$file > \$file
done
echo "Produced by $0." echo "Produced by $0."
echo "$0 is currently just a dummy script" >&2 echo "$0 is currently just a dummy script" >&2
EOT EOT

View file

@ -1,8 +1,7 @@
#!/bin/sh #!/bin/sh
inifile=$1
dir=`dirname $0` dir=`dirname $0`
inifile=$1
. $dir/ini-tools.sh . $dir/ini-tools.sh
_cat() _cat()
@ -10,18 +9,7 @@ _cat()
sed 's/^ *|//' sed 's/^ *|//'
} }
#t() _cat << EOT
#{
# echo '--------------'
# echo $1: `ini_value $1`
#}
#
#t global.group
#t summary
#t description
#exit 0
_cat << EOT
|echo "Name: \$NAME" |echo "Name: \$NAME"
|echo "Summary: `ini_value summary`" |echo "Summary: `ini_value summary`"
|echo "Version: \$VERSION" |echo "Version: \$VERSION"

View file

@ -98,5 +98,5 @@ export \
INSTALL_LOG \ INSTALL_LOG \
FILTER_DEVEL FILTER_DEVEL
sh $MKSPEC_SH bash $MKSPEC_SH