Q:

Create multiple Debian packages for data files from one source

I have a bunch of dictionary files for the dictd dictionary program. There are 2 files for each dictionary (a dict.dz and a .index file) and there are 8 dictionaries in total. 
The installation of the dictionaries is really simple, this is what I currently have in my script:
install -o root -g root -m 644 /path/to/dictd_dictionaries/* /usr/share/dictd
/usr/sbin/dictdconfig --write
service dictd restart

Now I want to package this lot of files up into .deb packages, one .deb package per dictionary. I'd really like to have one source .deb package that then creates all the separate packages, rather than having to create and maintain 8 individual packages (a number that might grow over time). 
However I don't understand how the debian/packagename.dirs files relate to what goes in the debian/rules file. I tried downloading and looking at the source package for freedict, which is very similar to what I want to do, but its rules file is very complex.

A:

You could use the dh-make package and specifiy "multiple binary".  It's a bit like a wizard for creating the skeleton debian/ directory.
E.g. 
# dh_make --packagename=skeleton_1.0
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_GB:en",
    LC_ALL = (unset),
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch or cdbs?
 [s/i/m/l/k/n/b] 

Typing "m" at this point will set it up so that a single source package builds several packages.
After the dh_make wizard has set things up you will need to maintain debian/[packagename].dirs and debian/[packagename].install so that the packager knows which files go in which .deb.
E.g.
skeleton.dirs
usr/bin

skeleton.install
usr/bin/skeleton*

