You are not logged in.
The Wiki pages for Creating Packages, PKGBUILD and Makepkg all provide information for making packages from the source code. I've already built the binary for my application and wish to create the package from that, but I'm having trouble.
I've created a PKGBUILD file which contains the mandatory variables (I'll add more optional variables later):
pkgname=eskdale
pkgver=1.0
pkgrel=1
arch=('x86_64')
In the same directory as the PKGBUILD file I've created a directory called pkg. The pkg directory is a fakeroot with all the application files in the relevant directories. When I run makepkg I get this output:
==> Making package: eskdale 1.0-1 (Sat 4 Mar 16:02:01 GMT 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "eskdale"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: eskdale 1.0-1 (Sat 4 Mar 16:02:01 GMT 2017)
Unfortunately, the package that is created doesn't contain the application files. The reason appears to be barbecue of the line "==> Removing existing $pkgdir/ directory..." which deletes all the application files before it builds the package.
I can't find any information in the wiki as to how to build a package from the binaries, so I'm at a loss as to what to do.
How can I get this working?
Last edited by Eskdale (2017-03-04 22:15:45)
Offline
You shouldn't be pre-populating the pkg directory before running makepkg. Your PKGBUILD should take the files declared in the source array, and do whatever is needed (e.g. compiling binaries, moving files, etc) to populate the pkg directory. You don't have to compile from source (although since you have the source, I'm unsure why you don't want to do this), just take a look at the existing -bin packages on the AUR, such as atom-editor-bin
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
Forcing you to combine the building and packaging process seems inconvenient and unnatural to me.
Surely there must be a way to make the package from the binaries, like you do with .deb?
Offline
Forcing you to combine the building and packaging process seems inconvenient and unnatural to me.
Surely there must be a way to make the package from the binaries, like you do with .deb?
He told you how... you aren't building anything by definition, so go directly to packaging. Another example: https://aur.archlinux.org/cgit/aur.git/ … mprime-bin
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
He told you how... you aren't building anything by definition, so go directly to packaging. Another example: https://aur.archlinux.org/cgit/aur.git/ … mprime-bin
Sorry, I completely misunderstood. I understand now after seeing that example.
Thanks a lot for the assistance.
Offline