Re-generate the Makefiles and register the changes if any
This commit is contained in:
parent
c229a64c7f
commit
e3e9a72e28
|
@ -34,17 +34,20 @@ VERSION=
|
||||||
#executables
|
#executables
|
||||||
CAT="cat"
|
CAT="cat"
|
||||||
CKSUM="cksum"
|
CKSUM="cksum"
|
||||||
|
CONFIGURE="configure"
|
||||||
CP="cp"
|
CP="cp"
|
||||||
CUT="cut"
|
CUT="cut"
|
||||||
DCH="dch"
|
DCH="dch"
|
||||||
DPKG="dpkg"
|
DPKG="dpkg"
|
||||||
DPKG_BUILDPACKAGE="dpkg-buildpackage -rfakeroot"
|
DPKG_BUILDPACKAGE="dpkg-buildpackage -rfakeroot"
|
||||||
|
DPKG_SOURCE="dpkg-source"
|
||||||
FIND="find"
|
FIND="find"
|
||||||
GIT="git"
|
GIT="git"
|
||||||
GREP="grep"
|
GREP="grep"
|
||||||
LINTIAN="lintian"
|
LINTIAN="lintian"
|
||||||
MAKE="make"
|
MAKE="make"
|
||||||
MKDIR="mkdir -p"
|
MKDIR="mkdir -p"
|
||||||
|
MV="mv"
|
||||||
PKGLINT="pkglint"
|
PKGLINT="pkglint"
|
||||||
PREFIX="/usr/local"
|
PREFIX="/usr/local"
|
||||||
RM="rm -f"
|
RM="rm -f"
|
||||||
|
@ -235,9 +238,32 @@ _package_debian()
|
||||||
return $?
|
return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#cleanup
|
||||||
|
$DEBUG $MAKE distclean || return 2
|
||||||
|
|
||||||
#initialization
|
#initialization
|
||||||
$DEBUG $MKDIR -- "debian" "debian/source" || return 2
|
$DEBUG $MKDIR -- "debian" "debian/source" || return 2
|
||||||
|
|
||||||
|
#create the source archive
|
||||||
|
_info "Creating the source archive..."
|
||||||
|
$DEBUG $MAKE dist
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
_error "Could not create the source archive"
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
$DEBUG $MV -- "$PACKAGE-$VERSION.tar.gz" \
|
||||||
|
"../${pkgname}_$VERSION.orig.tar.gz"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
_error "Could not move source archive"
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
#re-generate the Makefiles
|
||||||
|
if [ -f "$PROJECTCONF" ]; then
|
||||||
|
_info "Re-generating the Makefiles..."
|
||||||
|
$DEBUG $CONFIGURE || return 2
|
||||||
|
fi
|
||||||
|
|
||||||
#check the license
|
#check the license
|
||||||
license=
|
license=
|
||||||
case "$LICENSE" in
|
case "$LICENSE" in
|
||||||
|
@ -281,6 +307,16 @@ _package_debian()
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#register the changes if any
|
||||||
|
$DEBUG $DPKG_SOURCE --commit . patch-Makefile
|
||||||
|
res=$?
|
||||||
|
if [ $res -eq 127 ]; then
|
||||||
|
#XXX ignore errors if the command is not installed
|
||||||
|
return 0
|
||||||
|
elif [ $res -ne 0 ]; then
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
|
||||||
#build the package
|
#build the package
|
||||||
_info "Building the package..."
|
_info "Building the package..."
|
||||||
$DEBUG $DPKG_BUILDPACKAGE
|
$DEBUG $DPKG_BUILDPACKAGE
|
||||||
|
|
Loading…
Reference in New Issue
Block a user