LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > s.verma
User Name
Password

Notices


Rate this Entry

Building Arch Linux Package from precompiled Binaries.

Posted 02-28-2014 at 05:03 AM by s.verma
Updated 04-08-2014 at 01:01 AM by s.verma

This article shows how to create an Arch Linux package
1) when you have got pre-compiled binary files available
or
2) have debian/fedora .deb/.rpm packages available and you have extracted them and got usr/, etc/, etc. directories with installable files in them. Hence want to convert deb/rpm packages into Arch Linux packages.

For this you have to create a directory structure let say
~/foobar/src
Also create ~/foobar/PKGBUILD.
Edit this PKGBUILD file and put in it

Quote:
pkgname=Test
pkgver=1.0
pkgrel=1
pkgdesc="Test package."
arch=('i686' 'x86_64')
url="home"
license=('GPL')
depends=('bash')

package() {

cp -r * $pkgdir

}
See https://wiki.archlinux.org/index.php/PKGBUILD‎ for more info on individual line.

The main thing here is to include package() function to PKGBUILD which copies all files to package.

Now copy your binaries directory structure to src. e.g.
if you have /usr/bin/yourprogram /usr/share/files* /etc/* etc. after unpacking a distro package then put them as ~/foobar/src/usr/bin/yourprogram, ~/foobar/src/usr/share/files*, ~/foobar/src/etc/* etc.

Now open terminal emulator in ~/foobar directory and run
Code:
makepkg
This will generate abc.pkg.tar.xz file in your current directory.
abc is name supplied for the package name in PKGBUILD.

Now you can install it via
Code:
pacman -U abc.pkg.tar.xz
Posted in On Arch Linux
Views 2722 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 09:23 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration