Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I feel it like a big mess with the debhelper. The most info from google on Debian packaging is about to create a Debian package for already existing source packages, or Debian-ize around Makefile etc.

I have a package say xyz-0.1, contains only shell scripts with no Makefile at all. Well it should be easy to create a Debian package of it, but I'm stuck with the following error,

$ dh_make --createorig
...
$ cat debian/rules
...
build: 

binary: 
    (There's nothing to do with build, because xyz-0.1 contains only shell scripts)

$ debuild
...
dpkg-genchanges: error: cannot read files list file: No such file or directory
dpkg-buildpackage: error: dpkg-genchanges gave error exit status 2
debuild: fatal error at line 1340:
dpkg-buildpackage -rfakeroot -D -us -uc failed

(debhelper 7.4.15ubuntu1)

Though, create an empty file `debian/files' will resolve this problem, but it should not be the correct way.

Generally say, is there some guide, comprehensive tutorials on how to use debhelper around original Debian packages?

share|improve this question
    
For advice on Debian packaging, see the new Ubuntu Q&A site ubuntu.stackexchange.com. –  Evan Kroske Aug 11 '10 at 17:11

1 Answer 1

up vote 4 down vote accepted

The reference guide to Debian packages is the Debian Maintainers' Guide (/usr/share/doc/maint-guide/). In addition to that, the dh_* man pages document the build automation. The Debian Policy (/usr/share/doc/debian-policy/) and Debian Developer's Reference (/usr/share/doc/developers-reference/) have additional advice.

ADDED: With current stable versions (Debian lenny, Ubuntu 10.04) of debhelper, the default debian/rules file has been simplified to two lines, and things mostly work automatically:

%:
    dh $@

If something doesn't work, investigate by looking at the source of /usr/bin/dh and seeing what dh_* programs it invokes. The --after and --remaining options to dh are often helpful when debugging package building.

As for debian/files, it's not mandatory unless you've tweaked the build rules. If you want help with that, please post the full sequence of error messages (not just the last line), in the original English (not your retranslation). It may also help to know the version of the dh-make, debhelper and devscripts packages.

share|improve this answer
    
I've fixed the error messages. Version of debhelper is 7.4.15ubuntu1, and the other two's version is unknown (null). –  Xiè Jìléi Aug 12 '10 at 0:39
    
@谢继雷: Normally something would create debian/files as part of the build rules. If you still need help with this, you should post your whole build rules and the whole output of debuild. –  Gilles Aug 12 '10 at 8:31
    
@谢继雷: If you don't have the dh-make and devscripts packages, where do the dh_make and debuild commands come from? –  Gilles Aug 12 '10 at 8:35
    
The rules is simple, it just redefines the build' and binary' target as empty. Because there's nothing to do in build, and the default binary' target does too much unnecessary jobs. The problem is resolved after I added dh_prep, dh_gencontrol, and dh_builddeb to the binary' target. That's based on a try-and-see method, which isn't so strict to the Debian as a whole. The documentations you mentioned don't cover on original Debian packages (which means the package is only for Debian) too much, and I think maybe I should write a Makefile instead, and then Debianize it around. –  Xiè Jìléi Aug 12 '10 at 23:50
    
@谢继雷: dh_make creates a debian/rules that works. If you don't have a makefile, comment out the lines that call $(MAKE) (with recent versions of the tools, there aren't any). Just don't remove the dh_* unless you know what you're doing. –  Gilles Aug 13 '10 at 8:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.