1DEBBUILD(8)                 System Manager's Manual                DEBBUILD(8)
2
3
4

NAME

6       debbuild — Build Debian-compatible .deb packages from RPM .spec files
7
9       2005-2015 © Kris Deugau <kdeugau@deepnet.cx>
10       2015-2019 © Andreas Scherer <https://ascherer.github.io/>
11       2015-2019 © Neal Gompa ngompa13@gmail.com
12       2017-2019 © Datto, Inc. <https://datto.com>
13

SHORT DESCRIPTION

15       Build .deb packages from RPM-style .spec files.
16       debbuild supports most package-building options rpmbuild does.
17

OPTIONS

19       Build options with [ <specfile> | <tarball> | <source package> ]:
20
21         -b.                        build from <specfile> ...
22         -t.                        build from <tarball> ...
23         -r.                        build from <source package> ...
24               -.p      ... through %prep (unpack sources and apply patches)
25               -.c      ... through %build (%prep, then compile)
26               -.i      ... through %install (%prep, %build, then install)
27               -.l      verify %files section
28               -.a      ... source and binary packages
29               -.b      ... binary package only
30               -.s      ... source package only
31         --rebuild (-rb)            build binary package from <source package>
32         --recompile (-ri)          build through %install from <source package>
33         --buildroot=DIRECTORY      override build root
34         --short-circuit            skip straight to specified stage (only c,i)
35
36       Common options:
37
38         -D, --define='MACRO EXPR'  define MACRO with value EXPR
39         --with/--without FLAG      define build conditionals from FLAG
40         -S, --scm=SCM              short for '--define "__scm SCM"'
41
42       debbuild-specific options:
43
44         -i, --install              Unpack a .sdeb in the %_topdir tree
45         --showpkgs                 Show package names that would be built.
46         --nobuild                  Parse <specfile>, but do no processing
47

DESCRIPTION

49       debbuild attempts to build Debian-friendly semi-native packages from
50       RPM spec files, RPM-friendly tarballs, and RPM source packages
51       (.src.rpm files).  It accepts most of the options rpmbuild does, and
52       should be able to interpret most spec files usefully.  Perl modules
53       should be handled via CPAN+dh-make-perl instead as it’s simpler than
54       even tweaking a .spec template.
55
56       As far as possible, the command-line options are identical to those
57       from rpmbuild, although several rpmbuild options are not supported:
58
59        --clean
60        --rmsource
61        --rmspec
62        --target
63
64       Some of these could probably be trivially added.  Feel free to send me
65       a patch.  ;)
66
67       Complex spec files will most likely not work well, if at all.  Rewrite
68       them from scratch – you’ll have to make heavy modifications anyway.
69
70       If you see something you don’t like, mail me.  Send a patch if you feel
71       inspired.  I don’t promise I’ll do anything other than say “Yup, that’s
72       broken” or “Got your message”.
73
74       The source package container I invented for debbuild, the .sdeb file,
75       can be installed with "debbuild -i" exactly the same way as a .src.rpm
76       can be installed with "rpm -i".  Both will unpack the file and place
77       the source(s) and .spec file in the appropriate places in
78       %_topdir/SOURCES and %_topdir/SPECS respectively.
79

ASSUMPTIONS

81       As with rpmbuild, debbuild makes some assumptions about your system.
82
83       •   Either you have rights to do as you please under /usr/src/debian,
84           or you have created a file ~/.debmacros containing a suitable
85           “%_topdir” definition.
86
87           Both rpmbuild and debbuild require the directories
88           %_topdir/{BUILD,SOURCES,SPECS}.  However, where rpmbuild requires
89           the %_topdir/{RPMS,SRPMS} directories, debbuild requires
90           %_topdir/{DEBS,SDEBS} instead.  Create them in advance; some
91           subdirectories are created automatically as needed, but most are
92           not.
93
94/var/tmp must allow script execution – rpmbuild and debbuild both
95           rely on creating and executing shell scripts for much of their
96           functionality.  By default, debbuild also creates install trees
97           under /var/tmp – however this is (almost) entirely under the
98           control of the package’s .spec file.
99
100       •   If you wish to --rebuild a .src.rpm file, your %_topdir for both
101           debbuild and rpmbuild must either match, or be suitably symlinked
102           one direction or another so that both programs are effectively
103           working in the same tree.  (Or you could just manually wrestle
104           files around your system.)
105
106           You could symlink ~/.rpmmacros to ~/.debmacros (or vice versa) and
107           save yourself some hassle if you need to rebuild .src.rpm packages
108           on a regular basis.
109

ERRATA

111       debbuild deliberately does a few things differently from rpmbuild.
112
113   Finding out what packages should be built (--showpkgs)
114       rpmbuild does not include any convenient method I know of to list the
115       packages a spec file will produce.  Since I needed this ability for
116       another tool, I added it.
117
118       It requires the .spec file for the package, and produces a list of full
119       package filenames (without path data) that would be generated by one of
120       --rebuild, -ta, -tb, -ra, -rb, -ba, or -bb.  This includes the .sdeb
121       source package.
122

AUTHOR

124       debbuild was written by Kris Deugau.  The present version was developed
125       by Andreas Scherer, Neal Gompa, and others. It is available at
126       <http://github.com/debbuild/debbuild>.
127

BUGS

129       Funky Things Happen if you forget a command-line option or two.  I’ve
130       been too lazy to bother fixing this.
131
132       Many macro expansions are supported, some are incompletely supported,
133       some not at all.
134
135       The generated scriptlets don’t quite match those from rpmbuild exactly.
136       There are extra environment variables and preprocessing that I haven't
137       needed (yet).
138
139       Documentation, such as it is, will likely remain perpetually out of
140       date (in which way it follows in RPM’s tradition).
141
142       %_topdir and the five “working” directories under %_topdir could
143       arguably be created by debbuild.  However, rpmbuild doesn't create
144       these directories either.
145

SEE ALSO

147       rpm(8), rpmbuild(8), and pretty much any document describing how to
148       write a .spec file.
149
150
151
152Release 20.04.0                   2022-01-20                       DEBBUILD(8)
Impressum