Difference between revisions of "ABS FAQ"

From ArchWiki
Jump to: navigation, search
(removed AUR link; added Note box about AUR helpers; reordered the 'how do i make a package' section; updated to better comply with style guide)
Line 32: Line 32:
 
== Can I get a copy of the PKGBUILD files that the Arch Linux developers use? ==
 
== Can I get a copy of the PKGBUILD files that the Arch Linux developers use? ==
  
Sure! Install the program {{ic|abs}}:
+
Sure! Install the program {{pkg|abs}}:
  
 
  # pacman -S abs
 
  # pacman -S abs
Line 44: Line 44:
 
== What do I do to make a package? ==
 
== 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 {{ic|/var/abs}} to a new directory:
+
First, make sure you have all of the development tools installed:
  
  $ cp -r /var/abs/core/vi ~/vi
+
  # pacman -S base-devel
  
Now go to your new directory:
+
Now, 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 {{pkg|vi}}, just like the one you can install using pacman. Copy the PKGBUILD from {{ic|/var/abs}} to a new directory:
  
  $ cd ~/vi
+
  $ cp -r /var/abs/core/vi ~/vi
  
Make sure you have all of the development tools installed:
+
Go to your new directory, and edit the PKGBUILD to your desired specifications with your text editor of choice.
 
+
# 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:
 
Use the [[makepkg]] command to make a package:
Line 84: Line 78:
 
== Can somebody make a PKGBUILD file for me for a piece of software I want to use? ==
 
== 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.
+
There is a good chance someone already did! Look in the "AUR", or [[Arch User Repository]]. 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? ==
 
== Isn't there an easier way to install packages from the AUR? ==
  
 
Yes, you can use one of the existing [[AUR helper]] program that makes it easy to find and install packages from the AUR.
 
Yes, you can use one of the existing [[AUR helper]] program that makes it easy to find and install packages from the AUR.
 +
 +
{{Note|AUR helpers are not officially supported, and you essentially "void your warranty" by using one.}}
  
 
== Installing to {{ic|/usr/local}}: adding appropriate PATH entries ==
 
== Installing to {{ic|/usr/local}}: adding appropriate PATH entries ==
You may want to consider exporting the following paths (e.g. to .bash_profile) if you choose to build and install to {{ic|/usr/local}}
+
You may want to consider exporting the following paths (e.g. to {{ic|~/.bash_profile}}) if you choose to build and install to {{ic|/usr/local}}
  
 
  export PATH=$PATH:/usr/local/bin:/usr/local/sbin
 
  export PATH=$PATH:/usr/local/bin:/usr/local/sbin
 
  export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
 
  export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
 
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
 
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Revision as of 17:00, 8 March 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Merge-arrows-2.pngThis article or section is a candidate for merging with ABS.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:ABS FAQ#)
Template:Article summary start

Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end

What is the ABS?

"ABS" stands for Arch Build System. It is a convenient way to 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 abs:

# pacman -S abs

And then run it as root:

# abs

You now have every official Arch Linux PKGBUILD file in /var/abs.

What do I do to make a package?

First, make sure you have all of the development tools installed:

# pacman -S base-devel

Now, 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 vi, just like the one you can install using pacman. Copy the PKGBUILD from /var/abs to a new directory:

$ cp -r /var/abs/core/vi ~/vi

Go to your new directory, and edit the PKGBUILD to your desired specifications with your text editor of choice.

Use the makepkg command to make a package:

$ makepkg

That's it! You now have a .pkg.tar.xz package for vi.

What are all of those other files under /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 /var/abs and modify it. You can read more about PKGBUILD files here.

Can somebody make a PKGBUILD file for me for a piece of software I want to use?

There is a good chance someone already did! Look in the "AUR", or Arch User Repository. 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 one of the existing AUR helper program that makes it easy to find and install packages from the AUR.

Note: AUR helpers are not officially supported, and you essentially "void your warranty" by using one.

Installing to /usr/local: adding appropriate PATH entries

You may want to consider exporting the following paths (e.g. to ~/.bash_profile) if you choose to build and install to /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