Contents |
Create the structure
mkdir your_package-0.0.1 cd your_package-0.0.1/ export DEBEMAIL=foo@bla.co.za (you can also set DEBFULLNAME) dh_make -s -n (or dh_make -s -n -i gpl)
Add your content
- Source files
- Makefile: ensure that you have the following sections: (see example Makefile below)
all: clean: install:
Build the deb
fakeroot debian/rules binary
Start tweaking
- inspect the deb
dpkg-deb --contents ../your_package_0.0.1_all.deb dpkg-deb -I ../your_package_0.0.1_all.deb dpkg-deb -x ../your_package_0.0.1_all.deb /tmp/xxx (mc is also a very convenient way to 'browse' the deb)
- minimum required in the 'debian' directory:
changelog compat control copyright rules
- fix these:
copyright control (architecture & section)
Clean up
rm debian/*ex (once done with these examples)
When you make changes later on
To 'up' the revision and update the changelog:
dch -i
Example Makefile
all: hello
clean:
@rm -f *~ hello
hello: hello.c
$(CC) $< -o $@
install: hello
install -d $(DESTDIR)/usr/sbin/
install -c -m 0755 hello $(DESTDIR)/usr/sbin/
Example Source file: hello.c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello world\n");
}

