Difference between revisions of "ABS FAQ"

From ArchWiki
Jump to: navigation, search
(Removed extra text from the edit PKGBUILD step. (it appeared to be a link to edit the wiki page?))
(add redirect)
 
(27 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[[Category:Package development (English)]]
+
#REDIRECT: [[Arch Build System]]
[[Category:About Arch (English)]]
 
[[Category:HOWTOs (English)]]
 
{{Article summary start}}
 
{{Article summary text|Very simple answers to questions about the Arch Build System and making your own Arch Linux packages.}}
 
{{Article summary heading|Related}}
 
{{Article summary wiki|Arch Build System}}
 
{{Article summary wiki|Arch User Repository}}
 
{{Article summary wiki|Creating Packages}}
 
{{Article summary wiki|pacman}}
 
{{Article summary wiki|PKGBUILD}}
 
{{Article summary end}}
 
 
 
== What is the ABS? ==
 
 
 
"ABS" stands for [[Arch Build System]]. It's the way you create and install Arch Linux packages from source.
 
 
 
== What do people mean when they say "Use ABS"? ==
 
 
 
They mean, "Make and install an Arch Linux package from source, using the provided Arch tools". If you want to learn how to do this yourself, then keep reading. It's easy!
 
 
 
== How do the Arch Linux developers create all of those binary packages that I install using [[pacman]]? ==
 
 
 
Arch Linux packages are created by first writing a [[PKGBUILD]] file. A PKGBUILD file is a Bash script that contains:
 
 
 
*The name of the package, the version number, and lots of other information.
 
*Instructions for downloading, compiling, and installing the software package.
 
 
 
The newly written PKGBUILD file is then used by the makepkg program which uses the instructions contained within it to create a pacman-installable, binary package with the extenstion '.pkg.tar.xz'.
 
 
 
== Can I get a copy of the PKGBUILD files that the Arch Linux developers use? ==
 
 
 
Sure! Install the program {{filename|abs}}:
 
 
 
# pacman -S abs
 
 
 
And then run it as root:
 
 
 
# abs
 
 
 
You now have every official Arch Linux PKGBUILD file in {{filename|/var/abs}}.
 
 
 
== What do I do to make a package? ==
 
 
 
All you need is a PKGBUILD file. I recommend that you make packages in a new directory. Let's say you want to make your own package for [http://www.archlinux.org/packages/core/i686/vi/ vi], just like the one you can install using pacman. Copy the PKGBUILD from {{filename|/var/abs}} to a new directory:
 
 
 
$ cp -r /var/abs/core/vi ~/vi
 
 
 
Now go to your new directory:
 
 
 
$ cd ~/vi
 
 
 
Make sure you have all of the development tools installed:
 
 
 
# pacman -S base-devel
 
 
 
Edit the PKGBUILD to your desired specifications with your editor of choice.
 
 
$ nano PKGBUILD
 
 
 
Use the [[makepkg]] command to make a package:
 
 
 
$ makepkg
 
 
 
That's it! You now have a {{filename|.pkg.tar.xz}} package for vi.
 
 
 
== What are all of those other files under {{filename|/var/abs}}? ==
 
 
 
Sometimes a PKGBUILD uses patches, or includes default settings files and examples.
 
 
 
== How do I install the package I just made? ==
 
 
 
Use pacman:
 
 
 
# pacman -U yourpackagename.pkg.tar.gz
 
 
 
The actual name of the file depends on the name of the package, the version number, and what processor architecture you are using.
 
 
 
== How do I make my own PKGBUILD file? ==
 
 
 
You can just copy one from {{filename|/var/abs}} and modify it. You can read more about PKGBUILD files [[Creating Packages | here]].
 
 
 
== Can somebody make a PKGBUILD file for me for a piece of software I want to use? ==
 
 
 
There's a good chance someone already did! Look in the "AUR", or [[Arch User Repository]]. ([http://aur.archlinux.org/]). You will find PKGBUILD files that other Arch Linux users made. You can also submit PKGBUILD files that you make yourself.
 
 
 
== Isn't there an easier way to install packages from the AUR? ==
 
 
 
Yes, you can use an [[AUR helper]] program. They are used to make it easy to find and install packages from the AUR. There are many different AUR helpers. For example, [http://aur.archlinux.org/packages.php?ID=33378 packer] is similar to pacman in functionality and is pretty easy to use.
 
 
 
== Installing To {{filename|/usr/local}}: Adding Approprite PATH Entries ==
 
You may want to consider exporting the following paths (e.g. to .bash_profile) if you choose to build and install to {{filename|/usr/local}}
 
 
 
export PATH=$PATH:/usr/local/bin:/usr/local/sbin
 
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
 

Latest revision as of 22:38, 29 June 2014

Redirect to: