1DEBBUILD(8) DeepNet Dev Tools DEBBUILD(8)
2
3
4
6 debbuild — Build Debian-compatible .deb packages from RPM .spec files
7
9 debbuild {-ba|-bb|-bp|-bc|-bi|-bl|-bs} [build-options] file.spec
10
11 debbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [build-options] file.{tgz|zip|tar.{gz|bz2|xz|Z}}
12
13 debbuild {-ra|-rb|-rp|-rc|-ri|-rl|-rs} [build-options] file.{.src.rpm|sdeb}
14
15 debbuild {--rebuild|--recompile} file.{src.rpm|sdeb}
16
17 debbuild --showpkgs
18
19 debbuild --nobuild file.spec
20
21 debbuild {--install|-i} foo.sdeb
22
24 debbuild attempts to build Debian-friendly semi-native packages from
25 RPM spec files, RPM-friendly tarballs, and RPM source packages
26 (.src.rpm files). It accepts most of the options rpmbuild does, and
27 should be able to interpret most spec files usefully. Perl modules
28 should be handled via CPAN+dh-make-perl instead as it’s simpler than
29 even tweaking a .spec template.
30
31 As far as possible, the command-line options are identical to those
32 from rpmbuild, although several rpmbuild options are not supported:
33
34 --clean
35 --rmsource
36 --rmspec
37 --showrc
38 --target
39
40 Some of these could probably be trivially added. Feel free to send me
41 a patch. ;)
42
43 Complex spec files will most likely not work well, if at all. Rewrite
44 them from scratch – you’ll have to make heavy modifications anyway.
45
46 If you see something you don’t like, mail me. Send a patch if you feel
47 inspired. I don’t promise I’ll do anything other than say “Yup, that’s
48 broken” or “Got your message”.
49
50 The source package container I invented for debbuild, the .sdeb file,
51 can be installed with "debbuild -i" exactly the same way as a .src.rpm
52 can be installed with "rpm -i". Both will unpack the file and place
53 the source(s) and .spec file in the appropriate places in
54 %_topdir/SOURCES and %_topdir/SPECS respectively.
55
57 As with rpmbuild, debbuild makes some assumptions about your system.
58
59 · Either you have rights to do as you please under /usr/src/debian,
60 or you have created a file ~/.debmacros containing a suitable
61 “%_topdir” definition.
62
63 Both rpmbuild and debbuild require the directories
64 %_topdir/{BUILD,SOURCES,SPECS}. However, where rpmbuild requires
65 the %_topdir/{RPMS,SRPMS} directories, debbuild requires
66 %_topdir/{DEBS,SDEBS} instead. Create them in advance; some
67 subdirectories are created automatically as needed, but most are
68 not.
69
70 · /var/tmp must allow script execution – rpmbuild and debbuild both
71 rely on creating and executing shell scripts for much of their
72 functionality. By default, debbuild also creates install trees
73 under /var/tmp – however this is (almost) entirely under the
74 control of the package’s .spec file.
75
76 · If you wish to --rebuild a .src.rpm file, your %_topdir for both
77 debbuild and rpmbuild must either match, or be suitably symlinked
78 one direction or another so that both programs are effectively
79 working in the same tree. (Or you could just manually wrestle
80 files around your system.)
81
82 You could symlink ~/.rpmmacros to ~/.debmacros (or vice versa) and
83 save yourself some hassle if you need to rebuild .src.rpm packages
84 on a regular basis.
85
87 debbuild deliberately does a few things differently from rpmbuild.
88
89 Finding out what packages should be built (--showpkgs)
90 rpmbuild does not include any convenient method I know of to list the
91 packages a spec file will produce. Since I needed this ability for
92 another tool, I added it.
93
94 It requires the .spec file for the package, and produces a list of full
95 package filenames (without path data) that would be generated by one of
96 --rebuild, -ta, -tb, -ra, -rb, -ba, or -bb. This includes the .sdeb
97 source package.
98
100 debbuild was written by Kris Deugau <kdeugau@deepnet.cx>. The present
101 version was developed by Andreas Scherer <http://ascherer.github.io>
102 and is available at <http://github.com/ascherer/debbuild>.
103
105 Funky Things Happen if you forget a command-line option or two. I’ve
106 been too lazy to bother fixing this.
107
108 Many macro expansions are supported, some are incompletely supported,
109 some not at all.
110
111 The generated scriptlets don’t quite match those from rpmbuild exactly.
112 There are extra environment variables and preprocessing that I haven't
113 needed (yet).
114
115 Documentation, such as it is, will likely remain perpetually out of
116 date (in which way it follows in RPM’s tradition).
117
118 %_topdir and the five “working” directories under %_topdir could
119 arguably be created by debbuild. However, rpmbuild doesn't create
120 these directories either.
121
123 rpm(8), rpmbuild(8), and pretty much any document describing how to
124 write a .spec file.
125
126
127
128perl v5.28.1 2019-01-31 DEBBUILD(8)