Why building the `hello` source package causes a `no Makefile in this directory` error?

by Marcus   Last Updated April 10, 2018 11:02 AM

I'm attempting to build the hello source package, following the instructions provided in http://packaging.ubuntu.com/html/packaging-new-software.html.

I'm stuck, because, while source code itself builds fine (./configure && make), I can't build the source package, following the exact steps described.

Specifically, I get a no Makefile in this directory when executing the bzr builddeb -- -us -uc step.

These are the exact steps I follow, with the error at the bottom:

wget -O hello-2.10.tar.gz "http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz"
tar xf hello-2.10.tar.gz
bzr dh-make hello 2.10 hello-2.10.tar.gz # reply `s`(simple)

cd hello/debian
rm *ex *EX

vim changelog
# first line: hello (2.10-0ubuntu1) xenial; urgency=medium
# third line:   * Initial release

vim control
# change Description to:
# Hello description
#  Hello long description

vim copyright
# change Source to: https://github.com/test/test
# use GPL-2 template provided (from Files onwards); remove commented lines

rm README.*

# here, the tutorial forgets to mention `cd ..`

bzr add debian/source/format

bzr commit -m "Initial commit of Debian packaging."

# output:
#
# Committing to: /path/to/sample_ppa/hello/
# added debian
# added debian/README.Debian
# added debian/README.source
# added debian/changelog
# added debian/compat
# added debian/control
# added debian/copyright
# added debian/hello-docs.docs
# added debian/rules
# added debian/source
# added debian/source/format

bzr builddeb -- -us -uc

# Error:
#
# Building using working tree
# Building package in normal mode
# Looking for a way to retrieve the upstream tarball
# Using the upstream tarball that is present in /path/to/sample_ppa
# Building the package in /path/to/sample_ppa/build-area/hello-2.10, using debuild -us -uc
#  dpkg-buildpackage -rfakeroot -D -us -uc
# dpkg-buildpackage: source package hello
# dpkg-buildpackage: source version 2.10-0ubuntu1
# dpkg-buildpackage: source distribution xenial
# dpkg-buildpackage: source changed by Author <author@gmail.com>
#  dpkg-source --before-build hello-2.10
# dpkg-buildpackage: host architecture amd64
#  fakeroot debian/rules clean
# dh clean  --with autotools_dev
#    dh_testdir
#    dh_auto_clean
#   make -j1 distclean
# make[1]: Entering directory '/path/to/sample_ppa/build-area/hello-2.10'
# There seems to be no Makefile in this directory.
# You must run ./configure before running 'make'.
# GNUmakefile:106: recipe for target 'abort-due-to-no-makefile' failed
# make[1]: *** [abort-due-to-no-makefile] Error 1
# make[1]: Leaving directory '/path/to/sample_ppa/build-area/hello-2.10'
# dh_auto_clean: make -j1 distclean returned exit code 2
# debian/rules:18: recipe for target 'clean' failed
# make: *** [clean] Error 2
# dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
# debuild: fatal error at line 1376:
# dpkg-buildpackage -rfakeroot -D -us -uc failed
# bzr: ERROR: The build failed.


Related Questions


How can I create a configuration file?

Updated April 04, 2015 00:00 AM

/usr/bin/ld: cannot find -ltk

Updated June 21, 2015 03:00 AM

What linux sound configurations should I choose?

Updated January 26, 2017 14:00 PM

Trouble linking libraries in FFTW

Updated November 28, 2015 19:01 PM

Makefile, recompile with -fPIC

Updated October 11, 2017 13:02 PM