Creating an hello world debian source package from scratch



I am tring to create an absolute bare minimum "hello world" package for
installation from a customized local repository. I want to make all the source
files from scratch, without the use of debhelper.

I have created the source code file:

~/helloworld/src/hello.c

I have also created the debian control file:

~/helloworld/debian/control

I will create a symlink ~helloworld_1.0.0 to the ~helloworld directory, so that
the build tools know the package version.

Is that step necessary, or could I build from the helloworld directory, and
add the package version to the ~/helloworld/debian/control file?

I now need to build a rules file. Can I skip invoking debhelper during
installation, I simply want to invoke the compiler, and put the file in the
right place, for creating a .deb file. Can I simplify the rules file?

Building the binary is case of simply compiling, as follows:

cc hello.c -o hello

What do I do about path names in the rules file? I know debhelper handles all
this in a generated file.

What rules do I actually need to build the .deb file?

I have not created a separate Makefile to build the program. Do I need one, or
can I just use the rules file to handle this?

How do I set the install path, ownership and attributes of the hello binary in
the source file, so that this information is forwarded to the resulting binary
file?

Thanks in advance to anyone that can help.

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

.



Relevant Pages

  • Re: dist-upgrade problem (was Re: /etc/modutils/0keep: line 9: keep: command not found)
    ... Reading package fields... ... i t does not have execute permission ... installation script returned error exit status 100. ...
    (Debian-User)
  • Re: Finding installed package files
    ... >, and who is going to supply this documentation. ... > is a package with the common man pages for the thousand odd common commands ... tell me, as an installation option for some large packages, what was ... >>a set of commands and 'man' pages, could produce such a directory to make it ...
    (alt.os.linux.redhat)
  • Security Update for Microsoft Data Access Components (KB832483)
    ... : An error occurred while setup was trying to ... verify the version of Microsoft Data Access Components ... package returned FALSE, or there was a fatal error while ... installation. ...
    (microsoft.public.windowsupdate)
  • Re: bits/news from the users of Debian?
    ... "Le bottin des jeux Linux" speaks about 800 Linux games and i hope that's growing. ... I start with Debian, then test Mandrake because it seem's at this time very complicated. ... I think graphics interface for installation is a good thing: you have make a good job! ... I use Debian Sid and I have experiment a lot of problem some years ago because i install too recent package on Sid which are not well tested. ...
    (Debian-User)
  • Security Update for Microsoft Data Access Components (KB832483)
    ... : An error occurred while setup was trying to ... verify the version of Microsoft Data Access Components ... package returned FALSE, or there was a fatal error while ... installation. ...
    (microsoft.public.windowsupdate)