1
In Debian based distributions you can run apt-get source <package_name>
to fetch the source code for a package. What is the equivalent for pacman
on Arch Linux?
1
In Debian based distributions you can run apt-get source <package_name>
to fetch the source code for a package. What is the equivalent for pacman
on Arch Linux?
3
Install the Arch Build Source Management Tool (i.e. the asp
command, formerly abs
).
sudo pacman -S asp
Download the PKGBUILD
asp export <package_name>
Download the PKGBUILD source files
cd <package_name>
makepkg -do
-d, --nodeps
Do not perform any dependency checks. This will let you override and ignore any dependencies required. There is a good chance this option will break the build process if all of the dependencies are not installed.-o, --nobuild
Download and extract files, run the prepare() function, but do not build them. Useful with the --noextract option if you wish to tweak the files in $srcdir/ before building.
You may need to add --skippgpcheck
if you get this error
==> ERROR: One or more PGP signatures could not be verified!
Source will be be in src
sub-directory.
If you find that you're doing this frequently, you could add a function to your ~/.bashrc
or ~/.bash_profile
function get-source()
{
asp export $1 && \
pushd $1 && \
makepkg -do --skippgpcheck && \
pushd src
}
Then you can just run
get-source <package_name>