Math-NumSeq

 view release on metacpan or  search on metacpan

xtools/my-deb.sh  view on Meta::CPAN

echo "DEBNAME    $DEBNAME"

DEBVNAME="${DEBNAME}_$VERSION-0.1"
DEBFILE="${DEBVNAME}_$DPKG_ARCH.deb"
echo "DEBVNAME   $DEBVNAME"
echo "DEBFILE    $DEBFILE"

# ExtUtils::MakeMaker 6.42 of perl 5.10.0 makes "$(DISTVNAME).tar.gz" depend
# on "$(DISTVNAME)" distdir directory, which is always non-existent after a
# successful dist build, so the .tar.gz is always rebuilt.
#
# So although the .deb depends on the .tar.gz don't express that here or it
# rebuilds the .tar.gz every time.
#
# The right rule for the .tar.gz would be to depend on the files which go
# into it of course ...
#
# DISPLAY is unset for making a deb since under fakeroot gtk stuff may try
# to read config files like ~/.pangorc from root's home dir /root/.pangorc,
# and that dir will be unreadable by ordinary users (normally), provoking
# warnings and possible failures from nowarnings().
#

test -f $DISTVNAME.tar.gz || make $DISTVNAME.tar.gz
debver="`dpkg-parsechangelog -c1 | sed -n -r -e 's/^Version: (.*)-[0-9.]+$/\1/p'`"
echo "debver $debver", want $VERSION
test "$debver" = "$VERSION"

rm -rf $DISTVNAME
tar xfz $DISTVNAME.tar.gz
unset DISPLAY; export DISPLAY
cd $DISTVNAME

if test -d examples; then
  if ! grep _examples debian/rules; then
    echo "examples directory not in debian/rules"
  fi
fi

dpkg-checkbuilddeps debian/control
fakeroot debian/rules binary

cd ..
rm -rf $DISTVNAME

#------------------------------------------------------------------------------
# source .dsc

cp $DISTVNAME.tar.gz ${DEBNAME}_$VERSION.orig.tar.gz
tar xfz ${DEBNAME}_$VERSION.orig.tar.gz
if test "$DISTVNAME" != "$DEBNAME-$VERSION"; then
  mv -T $DISTVNAME $DEBNAME-$VERSION
fi
dpkg-source -b $DEBNAME-$VERSION ${DEBNAME}_$VERSION.orig.tar.gz
rm -rf $DEBNAME-$VERSION

#------------------------------------------------------------------------------
# lintian .deb and source

lintian -I -i \
  --suppress-tags new-package-should-close-itp-bug,desktop-entry-contains-encoding-key,command-in-menu-file-and-desktop-file,emacsen-common-without-dh-elpa,bugs-field-does-not-refer-to-debian-infrastructure \
  ${DEBNAME}_${VERSION}*_$DPKG_ARCH.deb

lintian -I -i \
  --suppress-tags maintainer-upload-has-incorrect-version-number,changelog-should-mention-nmu,empty-debian-diff,debian-rules-uses-deprecated-makefile,testsuite-autopkgtest-missing *.dsc

exit 0



( run in 0.564 second using v1.01-cache-2.11-cpan-39bf76dae61 )