You are not logged in.

#1 2018-03-29 14:55:46

inversechi
Member
From: Berlin
Registered: 2018-03-29
Posts: 12

[SOLVED] Binary not being copied during package step

I'm new to arch and creating packages, but am trying to create an arch package for a tool called lando which has the following package function:

pkgname=lando
pkgver=3.0.0.beta.37
_realver=3.0.0-beta.37
pkgrel=1
pkgdesc="Lando is for developers who want to quickly specify and painlessly spin up the services and tools needed to develop their projects."
url="https://docs.devwithlando.io"
arch=('x86_64')
license=('GPL3')
depends=('docker')
makedepends=('yarn')
source=("https://github.com/lando/lando/archive/v$_realver.tar.gz")
sha256sums=('7d02ea87478841b643b57b6cbbb88d0163c20d76ea2bd2c99593662418d81175')

build() {
    cd "${srcdir}/$pkgname-$_realver"
    yarn
    yarn pkg:cli
}

package() {

  cd "${srcdir}/$pkgname-$_realver"

  # Install binary
  install -D -m 755 "dist/cli/lando-linux-x64-v$_realver" "{pkgdir}/usr/bin/lando"

  # Install licence
  install -D -m 644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  # Install Readme
  install -D -m 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}

After running makepkg which succeeds, when I run tree on the pkg dir I can see the two licence and readme files exist but the binary isn't present.

pkg/
└── lando
    └── usr
        └── share
            ├── doc
            │   └── lando
            │       └── README.md
            └── licenses
                └── lando
                    └── LICENSE

7 directories, 2 files

What am I missing? I looked at several existing packages which do similar things but am unable to replicate what I want.

Last edited by inversechi (2018-03-29 18:38:09)

Offline

#2 2018-03-29 15:12:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Binary not being copied during package step

First, if you want help, post the full PKGBUILD.  But on your actual question, the answer is clear: absolutely nothing in that package function installs a binary file: it looks like you had a command to do this, but somehow it got jumbled with comments.  I *suspect* you mean for it to be something like this:

package() {

  cd "${srcdir}/$pkgname-$_realver"

  # Install binary
  install -D -m 755 "dist/cli/lando-linux-x64-v$_realver" "${pkgdir}/usr/bin/lando"

  # Install licence
  install -D -m 644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  # Install Readme
  install -D -m 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}

Last edited by Trilby (2018-03-29 15:21:51)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-03-29 15:13:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] Binary not being copied during package step

"install -D" does nothing, and the next line where you install the binary is commented out.

Online

#4 2018-03-29 15:15:51

inversechi
Member
From: Berlin
Registered: 2018-03-29
Posts: 12

Re: [SOLVED] Binary not being copied during package step

I have no Idea how that got so jumbled when posting - apologies for that.

I've updated my original post with full PGKBUILD.

Last edited by inversechi (2018-03-29 15:16:11)

Offline

#5 2018-03-29 15:22:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Binary not being copied during package step

install to ${pkgdir} not {pkgdir}


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2018-03-29 15:27:55

inversechi
Member
From: Berlin
Registered: 2018-03-29
Posts: 12

Re: [SOLVED] Binary not being copied during package step

Trilby wrote:

install to ${pkgdir} not {pkgdir}

How did I miss that? Thanks so much!

Offline

#7 2018-03-29 16:40:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Binary not being copied during package step

Please edit your thread title to describe your actual issue: https://wiki.archlinux.org/index.php/Co … ow_to_post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB