Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help With debian/rules File Without Build Tool

70 views
Skip to first unread message

Ryan McClue

unread,
Aug 30, 2021, 6:40:03 AM8/30/21
to

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)

Andrey Rahmatullin

unread,
Aug 30, 2021, 6:50:03 AM8/30/21
to
On Mon, Aug 30, 2021 at 10:20:48AM +0000, Ryan McClue wrote:
> 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)
How are you running it?

--
WBR, wRAR
signature.asc

wf...@debian.org

unread,
Aug 30, 2021, 7:30:02 AM8/30/21
to
Ryan McClue <re.m...@protonmail.com> writes:

> override_dh_auto_install:
> cp program /usr/local/bin

Unrelated to your actual question, but this won't work well. You need
to install into debian/PACKAGENAME as if it was the filesystem root,
that is: cp program debian/PACKAGENAME/usr/bin (after ensuring the
directory exists, and using your actual PACKAGENAME).
--
Regards,
Feri

debian-...@jugra.de

unread,
Aug 30, 2021, 8:10:02 AM8/30/21
to
Hello,

maybe you can try to copy with
cat <<'EOF' >>debian/$PACKAGENAME.install
program usr/bin
EOF

and then you don't need override_dh_auto_install.

Best Regards,
Juri Grabowski

Hilmar Preuße

unread,
Aug 30, 2021, 8:10:03 AM8/30/21
to
Am 30.08.2021 um 13:22 teilte debian-...@jugra.de mit:

Hi,

> maybe you can try to copy with
> cat <<'EOF' >>debian/$PACKAGENAME.install
> program usr/bin
> EOF
>
...and replace the

override_dh_auto_clean:
rm -f program

By a file debian/clean containing the names of the be deleted files.

H.
--
sigfault


OpenPGP_signature
0 new messages