From 5237aceffb380322ed763b82574d243ff18b08e9 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 27 May 2015 11:45:46 +0000 Subject: [PATCH] create-mkdebian.sh: Debian builds ytools-run and -devel packages, with lots of warnings, still Signed-off-by: Jan Lindemann --- scripts/create-mkdebian.sh | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/scripts/create-mkdebian.sh b/scripts/create-mkdebian.sh index 0404b59c..91272f63 100644 --- a/scripts/create-mkdebian.sh +++ b/scripts/create-mkdebian.sh @@ -8,7 +8,7 @@ inifile=$1 cat << EOT format_depends() { - sed 's/ */,/g; s/,\([><=]\+\),*/\1/g; s/, *,*/,/g; s/, *$//' + echo "\$@" | sed 's/ */,/g; s/,\([><=]\+\),*/\1/g; s/, *,*/,/g; s/, *$//; s/^ *,//; s/\([><=]\+\)\([0-9.-]\+\)/ (\1\2) /g' } changelog() @@ -41,9 +41,15 @@ Build-Depends: debhelper (>= 9) Package: \$NAME-run Architecture: any -Depends: `echo "\${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN, \$REQUIRES_DEVEL" | format_depends` +Depends: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN"\` Description: `ini_value summary` `ini_value description | sed 's/^/ /'` + +Package: \$NAME-devel +Architecture: any +Depends: \`format_depends "\$NAME-run = $VERSION-$REVISION, \$REQUIRES_DEVEL"\` +Description: \$NAME Development Package + Development tools for \$NAME-run EOF } @@ -61,17 +67,30 @@ rules() { cat << "EOF" #!/usr/bin/make -f + +FILTER_DEVEL = "/include/.*.h\$\$\\|devel\\|make\\|lib.*\\.a\$\$\\|lib.*\\.so\$\$\|.*\\.exp\$\$\\|.*\\.def\$\$\\|.*\\.lib\$\$" +NAME = \$(shell pwd | xargs basename | sed 's/-[0-9.-]\+//') +DEB_DIR = \$\$(pwd)/debian +ENV_PREFIX = \$\$(pwd)/debian/tmp/inst-root +EOF + +echo INSTALL_LOG = \$INSTALL_LOG + +cat << "EOF" %: EOF echo -e "\tdh \$""@" -cat << "EOF" +cat << EOF override_dh_auto_clean: override_dh_auto_test: override_dh_auto_install: - \$(MAKE) ENV_PREFIX=\$\$(pwd)/debian/inst-root/$NAME install + > \$INSTALL_LOG + \\\$(MAKE) ENV_PREFIX=\\\$(ENV_PREFIX) INSTALL_LOG=\\\$(INSTALL_LOG) install + /bin/bash milk-install-log.sh -p \\\$(ENV_PREFIX) -n \\\$(NAME) -t deb \$INSTALL_LOG \\\$(DEB_DIR) +override_dh_shlibdeps: EOF } @@ -79,10 +98,10 @@ mkdir -p debian cd debian for file in changelog compat control copyright format rules; do + test -e \$file && continue \$file > \$file done -echo "Produced by $0." -echo "$0 is currently just a dummy script" >&2 +echo "Produced by $0, the output should be in the \"debian\" sub-directory." EOT