From fdab2efc60533ee1911103504f1e0bbc930fdaa8 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 2 Oct 2012 22:30:54 +0000 Subject: [PATCH] Automatically building Debian packages --- src/deforaos-package.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/deforaos-package.sh b/src/deforaos-package.sh index d167957..0a178f2 100755 --- a/src/deforaos-package.sh +++ b/src/deforaos-package.sh @@ -32,6 +32,7 @@ VERSION= CKSUM="cksum" CUT="cut" DCH="dch" +DPKG_BUILDPACKAGE="dpkg-buildpackage -rfakeroot" FIND="find" GREP="grep" MAKE="make" @@ -43,7 +44,7 @@ SHA1="sha1" SIZE="_size" TR="tr" WC="wc" -YEAR=$(date +%Y) +YEAR="$(date +%Y)" #dependencies DEPEND_desktop=0 DEPEND_docbook=0 @@ -209,6 +210,15 @@ _package_debian() _error "Could not create debian/changelog" return 2 fi + + #build the package + _info "Building the package..." + $DPKG_BUILDPACKAGE + #XXX ignore errors if the command is not installed + if [ $ret -eq 127 ]; then + _warning "Could not build the package" + return 0 + fi } _debian_changelog()