You are not logged in.

#1 2022-02-14 02:31:51

InvisibleRasta
Member
Registered: 2017-04-12
Posts: 111

Help writing a PKGBUILD

Hello, would anyone help me with a PKGBUILD?
I have been trying these days but I dont really understand much..
I went trought the wiki regarding custom PKGBUILD but i am not really sure how it works for this package.
There was a version in the aur some days ago but it disappeared. I checked the mailing list
https://github.com/cangzhang/champ-r/re … 1.17-beta2

Last edited by InvisibleRasta (2022-02-14 02:44:01)

Offline

#2 2022-02-14 05:44:08

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Help writing a PKGBUILD

What part don't you understand?
What have you tried so far?

Offline

#3 2022-02-14 08:24:11

InvisibleRasta
Member
Registered: 2017-04-12
Posts: 111

Re: Help writing a PKGBUILD

I wrote a couple of lines in the past 2 days but i am not sure how to continue:

_pkgname=champ-r
pkgver=1.1.17-beta2
pkgrel=1
pkgdesc="Yet another League of Legends helper"
arch=('x86_64')
url="https://github.com/cangzhang/champ-r"
license=(custom)
groups=()
depends=()
makedepends=(yarn,nodejs)
checkdepends=()
optdepends=()
provides=amp-r)
conflicts=()
replaces=()
backup=()
options=()
source=("git+$url")
noextract=()
md5sums=('SKIP')
validpgpkeys=()

pkgver() {
  cd "${_pkgname}"

}

package() {
  cd ${_pkgname}  

Offline

#4 2022-02-14 20:14:17

loqs
Member
Registered: 2014-03-06
Posts: 17,369

Re: Help writing a PKGBUILD

_pkgname=champ-r

you missed declaring pkgname

pkgver=1.1.17-beta2

pkgver must include a hyphen

makedepends=(yarn,nodejs)

arrays are seperate by whitespace not commas,  missing git

provides=amp-r)

missing (

pkgver() {
  cd "${_pkgname}"

}

See The_pkgver()_function.  If you are tracking the upstream repo then the package should have the -git suffix.

package() {
  cd ${_pkgname}  

missing } and does not install anything.

Not seeing a section covering yarn in Creating_packages.
Edit:

_pkgname=champ-r
pkgname=champ-r-git
pkgver=1.1.17beta2
pkgrel=1
pkgdesc="Yet another League of Legends helper"
arch=('x86_64')
url="https://github.com/cangzhang/champ-r"
license=(custom)
depends=(libpng)
makedepends=(yarn nodejs git)
provides=(champ-r)
source=("git+$url")
md5sums=('SKIP')

build() {
  cd ${_pkgname}
  yarn install
  yarn build
}

package() {
  cd ${_pkgname}
}
Creating an optimized production build...
imagemin-webp-webpack-plugin: 1.6 MB saved
Compiled successfully.

File sizes after gzip:

  127.66 KB  build/static/js/0.3bd3fc49.chunk.js
  25.26 KB   build/static/js/5.4ec01677.chunk.js
  22.67 KB   build/static/css/popup.c8901a27.chunk.css
  12.73 KB   build/static/js/main.bc0fcc58.chunk.js
  11.51 KB   build/static/js/popup.ca13fd3a.chunk.js
  10.84 KB   build/static/js/6.27a045a2.chunk.js
  10.23 KB   build/static/css/main.62583db5.chunk.css
  775 B      build/static/css/5.109ac53f.chunk.css
  732 B      build/static/js/runtime-main.ca673fe6.js
  732 B      build/static/js/runtime-popup.2bde7c68.js

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment

  • electron-builder  version=22.11.7 os=5.16.8-1-stable
  • loaded configuration  file=package.json ("build" field)
  • packaging       platform=win32 arch=x64 electron=13.3.0 appOutDir=dist/win-unpacked
  • downloading     url=https://github.com/electron/electron/releases/download/v13.3.0/electron-v13.3.0-win32-x64.zip size=83 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v13.3.0/electron-v13.3.0-win32-x64.zip duration=7.729s
  • downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
  • downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=7.56s
  ⨯ wine is required, please see https://electron.build/multi-platform-build#linux  
  ⨯ /build/champ-r-git/src/champ-r/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE  failedTask=build stackTrace=Error: /build/champ-r-git/src/champ-r/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (/build/champ-r-git/src/champ-r/node_modules/builder-util/src/util.ts:249:14)
    at Object.onceWrapper (node:events:510:26)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1062:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
From previous event:
    at processImmediate (node:internal/timers:473:21)
From previous event:
    at WinPackager.signApp (/build/champ-r-git/src/champ-r/node_modules/app-builder-lib/src/winPackager.ts:376:27)
    at WinPackager.doSignAfterPack (/build/champ-r-git/src/champ-r/node_modules/app-builder-lib/src/platformPackager.ts:315:16)
    at WinPackager.doPack (/build/champ-r-git/src/champ-r/node_modules/app-builder-lib/src/platformPackager.ts:300:7)
    at WinPackager.pack (/build/champ-r-git/src/champ-r/node_modules/app-builder-lib/src/platformPackager.ts:136:5)
    at Packager.doBuild (/build/champ-r-git/src/champ-r/node_modules/app-builder-lib/src/packager.ts:441:9)
    at Object.executeFinally (/build/champ-r-git/src/champ-r/node_modules/builder-util/src/promise.ts:12:14)
    at Packager._build (/build/champ-r-git/src/champ-r/node_modules/app-builder-lib/src/packager.ts:376:31)
    at Packager.build (/build/champ-r-git/src/champ-r/node_modules/app-builder-lib/src/packager.ts:337:12)
    at Object.executeFinally (/build/champ-r-git/src/champ-r/node_modules/builder-util/src/promise.ts:12:14)

https://github.com/cangzhang/champ-r/bl … e.json#L26
The project wants to build electron for Windows x64?

Last edited by loqs (2022-02-14 20:28:55)

Offline

#5 2022-02-15 23:00:14

InvisibleRasta
Member
Registered: 2017-04-12
Posts: 111

Re: Help writing a PKGBUILD

i found a packaged version for arch that works but its outdated. I dont know if it can help somehow.  I downlaoded it and extracted it to see if i could grab the PKGBUILD from it but i dont think its possible to generate a PKGBUILD from an alredy packaged program.
Ill leave you the link, for sure you understand more than i do: https://github.com/GeorgeV220/champ-r/

Offline

#6 2022-02-16 12:31:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: Help writing a PKGBUILD

You mean https://github.com/GeorgeV220/champ-r/r … .14.pacman  ?

That's automatically generated by fpm and may or may not work.
The .pkginfo it creates may be somewhat useful for determining dependencies, but that's all.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2022-02-16 14:33:49

InvisibleRasta
Member
Registered: 2017-04-12
Posts: 111

Re: Help writing a PKGBUILD

yes that, well i installed it and it works but it is outdated

Offline

#8 2022-02-20 18:55:11

InvisibleRasta
Member
Registered: 2017-04-12
Posts: 111

Re: Help writing a PKGBUILD

Thank you i wiwll try to build it.
Edit: Seems like it is failing to build

  • downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z duration=994ms
  • building block map  blockMapFile=dist/ChampR Setup 1.1.17-beta2.exe.blockmap
  ⨯ Cannot cleanup:

Error #1 --------------------------------------------------------------------------------
Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
    at new GitHubPublisher (/tmp/test/src/champ-r/node_modules/electron-publish/src/gitHubPublisher.ts:47:15)
    at createPublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:295:14)
    at PublishManager.getOrCreatePublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:214:19)
    at PublishManager.scheduleUpload (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:148:28)
    at PublishManager.artifactCreatedWithoutExplicitPublishConfig (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:194:14)

Error #2 --------------------------------------------------------------------------------
Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
    at new GitHubPublisher (/tmp/test/src/champ-r/node_modules/electron-publish/src/gitHubPublisher.ts:47:15)
    at createPublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:295:14)
    at PublishManager.getOrCreatePublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:214:19)
    at PublishManager.scheduleUpload (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:148:28)
    at PublishManager.artifactCreatedWithoutExplicitPublishConfig (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:194:14)  failedTask=build stackTrace=Error: Cannot cleanup:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Error #1 --------------------------------------------------------------------------------
Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
    at new GitHubPublisher (/tmp/test/src/champ-r/node_modules/electron-publish/src/gitHubPublisher.ts:47:15)
    at createPublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:295:14)
    at PublishManager.getOrCreatePublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:214:19)
    at PublishManager.scheduleUpload (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:148:28)
    at PublishManager.artifactCreatedWithoutExplicitPublishConfig (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:194:14)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Error #2 --------------------------------------------------------------------------------
Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
    at new GitHubPublisher (/tmp/test/src/champ-r/node_modules/electron-publish/src/gitHubPublisher.ts:47:15)
    at createPublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:295:14)
    at PublishManager.getOrCreatePublisher (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:214:19)
    at PublishManager.scheduleUpload (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:148:28)
    at PublishManager.artifactCreatedWithoutExplicitPublishConfig (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:194:14)
    at throwError (/tmp/test/src/champ-r/node_modules/builder-util/src/asyncTaskManager.ts:88:11)
    at checkErrors (/tmp/test/src/champ-r/node_modules/builder-util/src/asyncTaskManager.ts:53:9)
    at AsyncTaskManager.awaitTasks (/tmp/test/src/champ-r/node_modules/builder-util/src/asyncTaskManager.ts:58:5)
    at PublishManager.awaitTasks (/tmp/test/src/champ-r/node_modules/app-builder-lib/src/publish/PublishManager.ts:228:28)
    at /tmp/test/src/champ-r/node_modules/app-builder-lib/src/index.ts:114:32
    at Object.executeFinally (/tmp/test/src/champ-r/node_modules/builder-util/src/promise.ts:23:9)
==> ERROR: A failure occurred in build().
    Aborting...                                                                                                                                             /2m-5.5s
/tmp/test took 1m 54s  

Last edited by InvisibleRasta (2022-02-20 20:36:18)

Offline

#9 2022-02-21 00:22:12

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Help writing a PKGBUILD

Did you bother to read the output?

Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"

Offline

#10 2022-02-22 14:21:08

InvisibleRasta
Member
Registered: 2017-04-12
Posts: 111

Re: Help writing a PKGBUILD

yes i did, but I am not sure what it means. Else i would of have not posted.
Do I need to generate a token or this is up to the developer?

Last edited by InvisibleRasta (2022-02-22 14:36:50)

Offline

#11 2022-02-23 18:19:25

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: Help writing a PKGBUILD

Some actions on github are only possible when you're authenticated by your own personal acces token .

Without seeing the whole output and commands you executed there's no way to tell which action caused the warning and whether that action is necessary.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#12 2022-02-23 21:29:30

FabioLolix
Member
Registered: 2021-06-27
Posts: 5
Website

Re: Help writing a PKGBUILD

Using:

_pkgname=champ-r
pkgname=champ-r-git
pkgver=1.1.17.beta2.r2.g5b54b84
pkgrel=1
pkgdesc="Yet another League of Legends helper"
arch=('x86_64')
url="https://github.com/cangzhang/champ-r"
license=(MIT)
depends=(libpng)
makedepends=(yarn nodejs git)
provides=(champ-r)
conflicts=(champ-r)
source=("git+$url")
md5sums=('SKIP')

pkgver() {
  cd ${_pkgname}
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd ${_pkgname}
  yarn install
  yarn build --linux
}

package() {
  cd ${_pkgname}

  install -D LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

Fails and produce

$ LANG=C makepkg
==> Making package: champ-r-git 1.1.17.beta2.r2.g5b54b84-1 (Wed Feb 23 22:22:54 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating champ-r git repo...
Fetching origin
==> Validating source files with md5sums...
    champ-r ... Skipped
==> Extracting sources...
  -> Creating working copy of champ-r git repo...
Reset branch 'makepkg'
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
➤ YN0000: ┌ Resolution step
➤ YN0002: │ champ-r@workspace:. doesn't provide @testing-library/dom (pf1bed), requested by @testing-library/user-event
➤ YN0060: │ champ-r@workspace:. provides @types/webpack (p40695) with version 5.28.0, which doesn't satisfy what @pmmmwh/react-refresh-webpack-plugin requests
➤ YN0060: │ champ-r@workspace:. provides eslint-plugin-react-hooks (p8f55f) with version 3.0.0, which doesn't satisfy what eslint-config-react-app requests
➤ YN0060: │ champ-r@workspace:. provides react (p40676) with version 17.0.2, which doesn't satisfy what baseui and some of its descendants request
➤ YN0060: │ champ-r@workspace:. provides react (pb942b) with version 17.0.2, which doesn't satisfy what react-custom-scrollbars requests
➤ YN0060: │ champ-r@workspace:. provides react-dom (p0780e) with version 17.0.2, which doesn't satisfy what baseui and some of its descendants request
➤ YN0060: │ champ-r@workspace:. provides react-dom (p281e3) with version 17.0.2, which doesn't satisfy what react-custom-scrollbars requests
➤ YN0060: │ champ-r@workspace:. provides react-refresh (p72b57) with version 0.10.0, which doesn't satisfy what @pmmmwh/react-refresh-webpack-plugin requests
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide typescript (p79ddf), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide webpack (p2af19), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ react-hot-toast@npm:2.1.1 [1bf2c] doesn't provide csstype (p65574), requested by goober
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 214ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 372ms
➤ YN0000: ┌ Link step
➤ YN0076: │ fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=18f3a7 The linux-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ dmg-license@npm:1.0.9 The linux-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ iconv-corefoundation@npm:1.1.6 The linux-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ fsevents@patch:fsevents@npm%3A1.2.13#~builtin<compat/fsevents>::version=1.2.13&hash=18f3a7 The linux-x64 architecture is incompatible with this module, link skipped.
➤ YN0000: └ Completed in 0s 768ms
➤ YN0000: Done with warnings in 1s 455ms
Creating an optimized production build...
imagemin-webp-webpack-plugin: 1.6 MB saved
Compiled successfully.

File sizes after gzip:

  127.66 KB  build/static/js/0.3bd3fc49.chunk.js
  25.26 KB   build/static/js/5.4ec01677.chunk.js
  22.67 KB   build/static/css/popup.c8901a27.chunk.css
  14.41 KB   build/static/js/main.68bfd3f9.chunk.js
  11.51 KB   build/static/js/popup.ca13fd3a.chunk.js
  10.84 KB   build/static/js/6.27a045a2.chunk.js
  10.23 KB   build/static/css/main.62583db5.chunk.css
  775 B      build/static/css/5.109ac53f.chunk.css
  732 B      build/static/js/runtime-main.ca673fe6.js
  732 B      build/static/js/runtime-popup.2bde7c68.js

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment

  • electron-builder  version=22.11.7 os=5.15.24-1-lts
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=13.3.0 appOutDir=dist/linux-unpacked
  • building        target=snap arch=x64 file=dist/champ-r_1.1.17-beta2_amd64.snap
  • building        target=AppImage arch=x64 file=dist/ChampR-1.1.17-beta2.AppImage
  • application Linux category is set to default "Utility"  reason=linux.category is not set and cannot map from macOS docs=https://www.electron.build/configuration/linux
  • default Electron icon is used  reason=application icon is not set
  • packaging       platform=win32 arch=x64 electron=13.3.0 appOutDir=dist/win-unpacked
  • application Linux category is set to default "Utility"  reason=linux.category is not set and cannot map from macOS docs=https://www.electron.build/configuration/linux
  • publishing      publisher=Snap Store
  • uploading       file=champ-r_1.1.17-beta2_amd64.snap provider=snapStore
  ⨯ snapcraft is not installed, please: sudo snap install snapcraft --classic 
  • building        target=nsis file=dist/ChampR Setup 1.1.17-beta2.exe archs=x64 oneClick=true perMachine=true
  ⨯ /home/fabio/.cache/electron-builder/nsis/nsis-3.0.4.1/linux/makensis exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
FATAL: main argv conversion failed!
  failedTask=build stackTrace=Error: /home/fabio/.cache/electron-builder/nsis/nsis-3.0.4.1/linux/makensis exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
FATAL: main argv conversion failed!
                                                                                                                                                                                  at ChildProcess.<anonymous> (/home/fabio/Dev/pkg_make/TO_BUILD8/champ-r/src/champ-r/node_modules/builder-util/src/util.ts:249:14)
    at Object.onceWrapper (events.js:520:26)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1058:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
==> ERROR: A failure occurred in build().
    Aborting...

Offline

Board footer

Powered by FluxBB