]> git.donarmstrong.com Git - debhelper.git/blob - doc/from-debstd
r418: * Fixed a stupid typo in dh_suidregister, Closes: #85110
[debhelper.git] / doc / from-debstd
1 Converting from debstd to debhelper:
2 -----------------------------------
3
4 Debhelper is designed to be mostly backwards compatible to debstd. I say
5 mostly because I haven't made debhelper handle everything that debstd does
6 yet, and in a few cases, debhelper does things differently (and I hope,
7 better).
8
9 In general, you can switch over to using debhelper as follows. In your
10 debian/rules, you currently will have some lines that read something like
11 this:
12
13         debstd CHANGES TODO README
14         dpkg-gencontrol
15         dpkg --build debian/tmp ..
16
17 Debhelper comes with a command called dh_debstd that mimics the behavior of
18 debstd, by calling various debhelper commands. So in the root directory of
19 your package you are converting, run:
20
21         dh_debstd CHANGES TODO README --verbose --no-act
22
23 Notice the parallel to the debstd command above, I just added
24 "--verbose --no-act" to the end. This will make dh_debstd output a list of
25 commands that it thinks will emulate what debstd would have done, without 
26 actually doing anything to your package. The list will look similar to this:
27
28         dh_installdirs
29         dh_installdocs TODO README
30         dh_installexamples
31         dh_installchangelogs CHANGES
32         dh_installmenu
33         dh_installcron
34         dh_installmanpages
35         dh_movefiles
36         dh_strip
37         dh_compress
38         dh_fixperms
39         dh_shlibdeps
40         dh_gencontrol
41         dh_makeshlibs
42         dh_installdeb
43         dh_md5sums
44         dh_builddeb
45
46 Now copy that output into debian/rules, replacing the debstd command, as
47 well as any dpkg-gencontrol and dpkg --build commands.
48
49 Finally, debstd automatically modified postinst, postrm, etc scripts. Some
50 of the debhelper apps do that too, but they do it differently. Debstd just
51 appends its commands to the end of the script. Debhelper requires that you
52 insert a tag into your scripts, that will tell debhelper where to insert
53 commands. So if you have postinst, postrm, etc scripts, add a line reading
54 "#DEBHELPER#" to the end of them.
55
56 Once you think it's all set up properly, do a test build of your package. If
57 it works ok, I recommend that you compare the new package and the old
58 debstd-generated package very closely. Pay special attention to the
59 postinst, postrm, etc scripts, and make sure that the new package contains
60 all the same files as the old, with the same permissions.
61
62 -- Joey Hess <joeyh@debian.org>