4

When you download source codes with apt-get source command, it usually consists of multiple packages, e.g the eglibc source package contains glibc-doc, libc-bin, etc.

Now with dpkg-buildpackage command it builds all packages at once.

So, can I selectively build the package I want? It can be too slow building them all?

5
  • I don't understand the question. What are you trying to do? Jan 18 '14 at 12:44
  • @FaheemMitha added an example
    – daisy
    Jan 18 '14 at 12:45
  • Oh, I see. You want to know whether you need to build all the binary packages corresponding to a source package. Why don't you want to build them all? If you want we can do this in chat. The main chat room. I'm on there. If you want to, ping me there. Jan 18 '14 at 12:47
  • @FaheemMitha It's slow
    – daisy
    Jan 18 '14 at 12:47
  • Well, it depends on the package. If there is a separate build process for different binary packages, then you can remove the build processes you don't want. However, in general, this is not the case. I.e. the different binary packages are the outcome of one build process. Jan 18 '14 at 12:48
2

It depends on the package. If there is a separate build process for different binary packages, then you can remove the build processes you don't want. However, in general, this is not the case. I.e. the different binary packages are the outcome of a single build process.

The build is defined in the debian/rules file. You should look there to see how the package is built.

If you are concerned about the build speed, it may be possible to parallelize the build. Note that debian/rules is just a Make file, and is called by make -f debian/rules.

One other thing that can speed things up is removing the test step, which many packages support (docs):

DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage <package name>
-1

In order to build a package from sources on debian you can use folowing steps:

apt-get build-dep stellarium
apt-get source -b stellarium

or step by step with dpkg-buildpackage

apt-get build-dep stellarium
apt-get source stellarium
cd stellarium*/
dpkg-buildpackage -uc -us -rfakeroot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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