I want to create a Debian package from a C program without the use of a build tool such as autotools or CMake. My debian/rules
file:
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_clean:
rm -f program
override_dh_auto_build:
gcc program.c -o program
override_dh_auto_install:
cp program /usr/local/bin
Upon running dpkg-buildpackage
, I get:
dh: error: Unknown sequence application (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)
It seems the issue was related to the fact that I was creating the file in a shell script heredoc that was expanding the
$@
, e.g.Which should be:
An unrelated issue is to the location of the
override_dh_auto_install
To manually create Debian file hierarchy it should be:Or, to have this done automatically: