Difference between revisions of "ABS FAQ"
Drcouzelis (talk | contribs) m (moved Introduction to the ABS to ABS FAQ: To prevent duplicating information about the ABS.) |
(→How do I install the package I just made?) |
||
(34 intermediate revisions by 13 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Package development | + | [[Category:Package development]] |
− | [[Category:About Arch | + | [[Category:About Arch]] |
− | [[ | + | [[ja:ABS FAQ]] |
+ | [[ru:ABS FAQ]] | ||
+ | {{merge|ABS}} | ||
{{Article summary start}} | {{Article summary start}} | ||
− | {{Article summary text| | + | {{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 heading|Related}} | ||
{{Article summary wiki|Arch Build System}} | {{Article summary wiki|Arch Build System}} | ||
Line 11: | Line 13: | ||
{{Article summary wiki|PKGBUILD}} | {{Article summary wiki|PKGBUILD}} | ||
{{Article summary end}} | {{Article summary end}} | ||
− | |||
− | |||
− | |||
− | |||
== What is the ABS? == | == What is the ABS? == | ||
− | "ABS" stands for [[Arch Build System]]. It | + | "ABS" stands for [[Arch Build System]]. It is a convenient way to create and install Arch Linux packages. |
== What do people mean when they say "Use ABS"? == | == What do people mean when they say "Use ABS"? == | ||
− | They mean, "Make and install an Arch Linux package". If you want to learn how to do this yourself, then keep reading. It's easy! | + | They mean, "Make and install an Arch Linux package using the provided Arch Linux 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 packages that I install using [[pacman]]? == | + | == How do the Arch Linux developers create all of those binary packages that I install using [[pacman]]? == |
− | Arch Linux packages are created by | + | 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. | *The name of the package, the version number, and lots of other information. | ||
*Instructions for downloading, compiling, and installing the software package. | *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? == | == Can I get a copy of the PKGBUILD files that the Arch Linux developers use? == | ||
− | Sure! Install the program {{ | + | Sure! Install the program {{pkg|abs}}: |
# pacman -S abs | # pacman -S abs | ||
Line 41: | Line 41: | ||
# abs | # abs | ||
− | You now have every official Arch Linux PKGBUILD file in {{ | + | You now have every official Arch Linux PKGBUILD file in {{ic|/var/abs}}. |
== What do I do to make a package? == | == What do I do to make a package? == | ||
− | + | First, make sure you have all of the development tools installed: | |
− | + | # pacman -S base-devel | |
− | Now | + | 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: |
− | $ | + | $ 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: | Use the [[makepkg]] command to make a package: | ||
Line 61: | Line 59: | ||
$ makepkg | $ makepkg | ||
− | That's it! You now have a {{ | + | That's it! You now have a {{ic|.pkg.tar.xz}} package for vi. |
− | == | + | == What are all of those other files under {{ic|/var/abs}}? == |
Sometimes a PKGBUILD uses patches, or includes default settings files and examples. | Sometimes a PKGBUILD uses patches, or includes default settings files and examples. | ||
Line 71: | Line 69: | ||
Use pacman: | Use pacman: | ||
− | # pacman -U yourpackagename.pkg.tar. | + | # pacman -U yourpackagename.pkg.tar.xz |
The actual name of the file depends on the name of the package, the version number, and what processor architecture you are using. | The actual name of the file depends on the name of the package, the version number, and what processor architecture you are using. | ||
Line 77: | Line 75: | ||
== How do I make my own PKGBUILD file? == | == How do I make my own PKGBUILD file? == | ||
− | You can | + | You can copy an example PKGBUILD file from {{ic|/usr/share/pacman}} or {{ic|/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? == | == Can somebody make a PKGBUILD file for me for a piece of software I want to use? == | ||
− | There | + | 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. |
− | |||
− | |||
− | |||
− |
Revision as of 23:34, 21 July 2013
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
Contents
- 1 What is the ABS?
- 2 What do people mean when they say "Use ABS"?
- 3 How do the Arch Linux developers create all of those binary packages that I install using pacman?
- 4 Can I get a copy of the PKGBUILD files that the Arch Linux developers use?
- 5 What do I do to make a package?
- 6 What are all of those other files under /var/abs?
- 7 How do I install the package I just made?
- 8 How do I make my own PKGBUILD file?
- 9 Can somebody make a PKGBUILD file for me for a piece of software I want to use?
What is the ABS?
"ABS" stands for Arch Build System. It is a convenient way to create and install Arch Linux packages.
What do people mean when they say "Use ABS"?
They mean, "Make and install an Arch Linux package using the provided Arch Linux 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.xz
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 copy an example PKGBUILD file from /usr/share/pacman
or /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.