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?
- 6,270
1 Answers
Install the Arch Build Source Management Tool (i.e. the
aspcommand, formerlyabs).sudo pacman -S aspDownload 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
--skippgpcheckif you get this error==> ERROR: One or more PGP signatures could not be verified!
Source will be be in
srcsub-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>
- 6,270