[PS: Чего я действительно хочу Здесь вы узнаете, как упаковать новое программное обеспечение]
Я следовал инструкциям в https://packaging.ubuntu.com/html/packaging-new-software.html#building-the-package .
Когда я выполнил bzr builddeb - -us -uc
, эти ошибки показывают:
❯ bzr builddeb -- -us -uc
Building using working tree
Building package in normal mode
Purging the build dir: /home/xxx/test/build-area/hello-2.10
Looking for a way to retrieve the upstream tarball
Upstream tarball already exists in build directory, using that
Building the package in /home/song/test/build-area/hello-2.10, using debuild -us -uc
dpkg-buildpackage -rfakeroot -us -uc -ui
dpkg-buildpackage: info: source package hello
dpkg-buildpackage: info: source version 2.10-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by xxx <xxx@xxx.com>
dpkg-source --before-build hello-2.10
dpkg-buildpackage: info: host architecture amd64
fakeroot debian/rules clean
dh clean
dh_auto_clean
make -j16 -O distclean
make[1]: Entering directory '/home/xxx/test/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 '/home/xxx/test/build-area/hello-2.10'
dh_auto_clean: make -j16 -O distclean returned exit code 2
debian/rules:18: recipe for target 'clean' failed
make: *** [clean] Error 25
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
debuild: fatal error at line 1152:
dpkg-buildpackage -rfakeroot -us -uc -ui failed
bzr: ERROR: The build failed.
Затем загляните в каталог сборки:
❯ ls
ABOUT-NLS aclocal.m4 AUTHORS build-aux ChangeLog ChangeLog.O config.in configure configure.ac contrib COPYING debian doc GNUmakefile hello.1 INSTALL lib m4 maint.mk Makefile.am Makefile.in man NEWS po README README-dev README-release src tests THANKS TODO
Кто-нибудь может взглянуть и дать несколько предложений?
Бенджамин Аллот нашел обходной путь в ошибке Launchpad @steeldriver, опубликованной в комментариях.
Проблема в том, что dh_auto_clean вызывает команду make -j4 distclean, но Makefile еще не сгенерирован командой configure.
Обходной путь - добавить
override_dh_auto_clean:
в ваш файл debian / rules.