You are not logged in.
Hello!
I understand that makepkg extracts automatically (unless specify in the noextract array) compress and package files (deb, rpm, tar.gz files).
But what is the right approach when, for example, the source is a deb.zip or a rpm.zip? In the srcdir I find the rpm/deb file, but I would to get directly what is inside those packages without having to use other tools (e.g. rpmextract). Is it possible to indicate to extract to a second level?
I try in the wiki, man PKGBUILD, etc. but I couldn't find anything. Thanks!
Offline
Welcome to the arch linux forums iyanmv. Use bsdtar in prepare() to extract the rpm/deb.tgz after makepkg has extracted the .zip?
Offline
As loqs is saying. You may look at this PKGBUILD for a full example.
Offline
Welcome to the arch linux forums iyanmv. Use bsdtar in prepare() to extract the rpm/deb.tgz after makepkg has extracted the .zip?
Ok, perfect! I'll do that. Thanks for the quick answer.
Offline
Do you think that this is ok? Instead of extracting in prepare() to later having to copy, can I just extract directly in the pkgdir like the example @2ion mentioned?
pkgname=linux-intel-undervolt-gui
pkgver=1.0.1
pkgrel=1
pkgdesc="GUI frontend for undervolting intel CPUs on Linux"
arch=('x86_64')
url="https://github.com/lukechadwick/linux-intel-undervolt-gui"
license=('MIT')
depends=('python-undervolt')
source=("${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.x86_64.rpm.zip")
sha512sums=('397e46e5cbd05d0a0c20e1c4542d2575b595e497d520842bece5acea2ca4eed09d90812c1f768bd64310ffff6f1eac142ec1493d49e80b7c43525abe32700f3d')
package() {
cd ${srcdir}/
bsdtar -xf ${pkgname}-${pkgver}.x86_64.rpm -C ${pkgdir}
}
Last edited by iyanmv (2019-02-06 22:17:16)
Offline
Have you tried building the electron app from source?
Offline
Yes, but it failed. I guess I can give it a second try during the weekend with more time. Is it preferable to use the source instead of the package from the release?
Offline
It is preferred to build from source. Alternately you can add the -bin suffix to the package to indicate it is a repacked binary (not sure this applies to electron).
I have no experience with electron but if you provide the makepkg output from the build failure others who do may be able to resolve the issue.
Last edited by loqs (2019-02-06 22:55:20)
Offline
I understand that makepkg extracts automatically (unless specify in the noextract array) compress and package files (deb, rpm, tar.gz files).
But what is the right approach when, for example, the source is a deb.zip or a rpm.zip?
makepkg does not *recursively* extract sources. Recommended plan of action:
Step one: do it yourself using bsdtar.
Step two: Start a dialog with upstream, asking why they did something so bizarre as to take a compressed .deb or .rpm, and stick it inside a zipfile. It's not like zipfiles are even good at compressing things to begin with, but it is pretty silly to even try when .deb natively supports much better compression by internally using e.g. data.tar.xz
Do you think that this is ok? Instead of extracting in prepare() to later having to copy, can I just extract directly in the pkgdir like the example @2ion mentioned?
You can do that for rpm, but .deb will extract to the three files debian-binary control.tar.gz and data.tar.xz which makes no sense to extract directly to "${pkgdir}".
It is preferred to build from source. Alternately you can add the -bin suffix to the package to indicate it is a repacked binary (not sure this applies to electron).
I have no experience with electron but if you provide the makepkg output from the build failure others who do may be able to resolve the issue.
It's not about whether it applies to electron or not. It applies to all packages, and the only arguable exception is when the binary is closed-source and thus there is no source to build.
Electron apps are simply the most frequent sort of package to violate the -bin guidelines. That doesn't make it okay.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Ok, thanks for the detailed answer @eschwartz. Then, I will give it a try to do a proper PKGBUILD from the sources.
Offline