You are not logged in.

#1 2014-07-26 15:21:55

pheerai
Member
Registered: 2014-07-26
Posts: 10
Website

[SOLVED] [PKGBUILD] chordii, revision request

Hey there,

after using chordii (a programm to generate guitar-songsheets from textfiles) for some years now, I discovered that the current version in the AUR is quite old (4.3 vs. 4.5.1).
I tried to create a PKGBUILD for the new version, as I'd like to adopt the package.

This is my first PKGBUILD, adopted and modified from the old one, so would it be possible for someone of you to take a glance?

I've got one particular question:
The Chordii-Team uses a URL for their downloads that contains a minor-release-number, not a patch version (i.e. there's "4.5" in the download-URL while the version is "4.5.1"). I've solved this by using "${pkgver:0:3}" in the source-variable which works, but I don't really like it: It only works as long as major- and minorversion are one-digit.
Is there a proposed/official way to handle this?

Other than that, namcap didn't produce any warnings, and the binary built with the file works for me (although I haven't done carefull checking).

Thanks in advance,

pheerai

Last edited by pheerai (2014-07-27 12:22:37)

Offline

#2 2014-07-26 15:32:31

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

Re: [SOLVED] [PKGBUILD] chordii, revision request

Would "${pkgver%.*}" work?  If not, you can just put the url in there as a static variable.  Every time the url changes, the checksum will have to be changed anyways.

Other than that, the only suggestion I'd have would be to remove the "|| return 1" bits -they are not needed.

EDIT: I just tried it - builds fine here.  And what a cool program - I'm glad you brought it up here or I'd never have seen it.

Last edited by Trilby (2014-07-26 15:36:44)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-07-26 15:53:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] [PKGBUILD] chordii, revision request

Also, please quote any paths that contain $srcdir or $pkgdir. They are external variables that could contain spaces.

Edit: namcap does give one warning on the PKGBUILD:
PKGBUILD (chordii) W: Variable license is not an array.

Last edited by Scimmia (2014-07-26 16:10:42)

Offline

#4 2014-07-27 12:22:19

pheerai
Member
Registered: 2014-07-26
Posts: 10
Website

Re: [SOLVED] [PKGBUILD] chordii, revision request

Ok, thanks a lot.

I've included the changes both of you stated and will soon adopt the package.

Offline

Board footer

Powered by FluxBB