I'm trying to create my first deb so I don't know much about it yet. This is my 'rules' file at the moment:
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
%:
dh $@
At the moment I'm reading documentation and trying to understand how to write more complicated 'rules' files. I'm stuck on 'binary-arch' and 'binary-indep' targets. In short I don't understand what they actually stand for.
The documentation says that package arch is determined by 'Architecture:' line in 'Control' file.
If the value is 'all' then the package is an architecture dependent.
If the value is 'any' then the package is an architecture
independent.
I fully understand this part. But then I start reading man files for debhelper tools.
man dpkg-buildpackage says:
- It calls debian/rules build followed by fakeroot debian/rules binary-target (unless a source-only build has been requested with -S). Note that binary-target is either binary (default case, or if -b is specified) or binary-arch (if -B is specified) or binary-indep (if -A is specified)
man dh says:
Commands in the binary-indep sequence are passed the "-i" option to ensure they only work on binary independent packages, and commands in the binary-arch sequences are passed the "-a" option to ensure they only work on architecture dependent packages.
then I try to view the default set of commands for 'binary', 'binary-arch' and 'binary-indep' targets by typing
$ dh binary --no-act
$ dh binary-arch --no-act
$ dh binary-indep --no-act
and get fully equal sets of commands. the only difference is '-i' and '-a' flags after each command.
So the first question is - what is the difference between for example 'dh_auto_build', 'dh_auto_build -a' and 'dh_auto_build -i' ( or some other dh_command ) ?
And another question is - if my 'control' file consists only of packages with 'all' architecture do I need to use binary-indep target, or I can do without it and use only build-arch target in my 'rules' file ?