söndag 19 april 2015

archlinux - like apt-get source coreutils / buil-dep

I am using Arch Linux. I want to do the same thing like apt-get source coreutils; is it possible to download sources with Pacman? I didn't find a solution in the man pages.

How can I get the source code of a package?

As already mentioned you can use the ABS (Arch Build System):

Install it using pacman: sudo pacman -S base-devel abs

then download the ABS tree: sudo abs

or get a specific package: sudo abs [package_name]

Then copy the package, whose source you want to have, from the local abs tree (e.g. /var/abs/core/findutils) to another directory, e.g. /home/blabla/abs

Then run makepkg:

if you only want to get the sources and don't want to build the package you can run makepkg -od

otherwise run makepkg -s, which will then handle all the package's dependencies automatically

watch out becaouse makepkg will overwrite your modifications, use makepkg -e to build your local sources instead

If you want to install the package you've built, run pacman -U name-of-package.xz

Inga kommentarer: