You are not logged in.

#1 2018-07-30 10:42:22

Pol_M
Member
From: Sabadell, Barcelona, Spain
Registered: 2018-06-21
Posts: 8

[SOLVED] test my PKGBUILD, program doomseeker

I had an issue that required the creation of a patch, and it's the first time I make one.
here's all you need (git): https://gitlab.com/destroyerrocket/PKGB … seeker.git

Also, if builds but you see something that is not quite correct, please tell me!
I wouldn't like to publish anything broken hmm

Last edited by Pol_M (2018-07-31 09:57:24)


Have a nice day! smile

Offline

#2 2018-07-30 11:25:53

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

Re: [SOLVED] test my PKGBUILD, program doomseeker

Edit :

The patch looks ok and is applied correctly.

----------------------
Some comments about the PKGBUILD

$pkgname and $_bbdir are exactly the same. What is the reason for using $_bbdir ?

You are checking out a specific revision, but neither pkgver nor pkgrel reflects that.
Maybe you could add the hash for the revision to pkgrel ?

cmake -DCMAKE_BUILD_TYPE=Release .. && \
    make -j$(nproc)

Forcing  -j$(nproc) overrides settings made by the user in makepkg.conf and is frowned upon by many.
Is there a specific reason you use this ?

Last edited by Lone_Wolf (2018-07-30 11:27:23)


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

#3 2018-07-30 13:17:16

Pol_M
Member
From: Sabadell, Barcelona, Spain
Registered: 2018-06-21
Posts: 8

Re: [SOLVED] test my PKGBUILD, program doomseeker

Thank you so much!

There is no reason for using _bbdir, changing it.
I'll use the code found in the ArchWiki for mercurial. It uses the pkgver instead of the pkgrel, but I assume that if it is on the wiki, it is ok. I hope this doesn't break future updates.
About the -j$(nproc), is heritage of the old maintainer. I'm gonna fix it.
-----
Changes made, could you confirm everything is ok to push to the AUR?

Looking at what pacman says when installing the new generated package:

warning: downgrading package doomseeker (1.2-20180328 => r2191+.c2c7f37b1afb+-1)

I think that maybe the package won't show up as updated. Should I use epoch?

Last edited by Pol_M (2018-07-30 15:21:25)


Have a nice day! smile

Offline

#4 2018-07-30 18:24:52

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] test my PKGBUILD, program doomseeker

So a couple notes:

The url https://doomseeker.drdteam.org/ supports HTTPS, please use it. smile

The license in the PKGBUILD is GPL2, but the source code is actually LGPL (which encompasses LGPL2 and LGPL3), a much more lenient license. This seems to have been a recent change, see https://bitbucket.org/Doomseeker/doomse … 4357f6620a

It is wrong for you to depend on gcc and make, as they are already in the base-devel group which is mandatory for building packages with makepkg. P.S. In case people think "oh, it's just useless but not actually bad" I invite you to look at e.g. https://aur.archlinux.org/packages/ignition-msgs which makedepends on pkg-config and then pins the makedepends to a specific version, and is now unable to be built since Arch Linux switched to a different pkg-config implementation (the pkgconf package).

It is correct that you used pkgver, and not pkgrel, since pkgrel is specifically meant for when the source version itself is the same but the build instructions are different. I would go so far as to say, you don't need the revision in the pkgver at all, since there is a stable release tag 1.1-p1 -- is there a reason you aren't using that, but instead pinned the revision which is currently the development tip?

If for some reason you must use the latest version, and keeping in mind I don't know of a way to "hg identify" the number of commits since the latest tag, using your current pkgver arrangement will mean you must use epoch.

The PKGBUILD inconsistently quotes $srcdir and $pkgdir, these need to *always* be quoted.

Other than that it looks okay. smile


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2018-07-31 09:54:55

Pol_M
Member
From: Sabadell, Barcelona, Spain
Registered: 2018-06-21
Posts: 8

Re: [SOLVED] test my PKGBUILD, program doomseeker

Thank you so much! I'll implement the changes you mentioned.
About the release tag, we moved to the latest commit since the version 1.1 / 1.1-p1 gave quite a few errors to be handled at the moment and the latest version compiled without any need of patches.  I've taken another look at compiling those versions, and if I find a way to go through those error messages, I'll use a more stable release. For the moment I'm gonna use the script found in ArchWiki and that seems like other packages that use Mercurial use.


Have a nice day! smile

Offline

#6 2018-07-31 10:20:09

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] test my PKGBUILD, program doomseeker

If you want you could also replace the install loops.

     for f in *.so; do
         install -Dm755 $f "$pkgdir/usr/games/doomseeker/engines/$f"
     done
install -Dm755 -t "$pkgdir/usr/games/doomseeker/engines/" *.so

Edit: Since you use a fixed revision in your source, you could also manually declare the version, e.g.

pkgver="1.2+alpha+revc2c7f37b1afb"

Last edited by progandy (2018-07-31 10:28:12)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2018-07-31 10:39:22

Pol_M
Member
From: Sabadell, Barcelona, Spain
Registered: 2018-06-21
Posts: 8

Re: [SOLVED] test my PKGBUILD, program doomseeker

Oh, neat. smile Ok, I'll also implement those. Thank you for your help!


Have a nice day! smile

Offline

#8 2018-07-31 15:27:15

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] test my PKGBUILD, program doomseeker

If you're going to manually specify the pkgver, which I agree is pretty reasonable for a situation where you're only using a specific revision in order to get some build fixes, then I would say you could drop the epoch except now you've already published an epoch to the AUR, you cannot take it back...

In that case I'd have used:

pkgver=1.2.r2191.c2c7f37b1afb

There's no need for a pkgver() function in that case, since you don't plan on always pinning arbitrary revisions.

Last edited by eschwartz (2018-07-31 15:31:26)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2018-07-31 18:40:10

Pol_M
Member
From: Sabadell, Barcelona, Spain
Registered: 2018-06-21
Posts: 8

Re: [SOLVED] test my PKGBUILD, program doomseeker

I noticed that before publishing a PKGBUILD with

pkgver="1.2.r2191.c2c7f37b1afb"

That's what I get for publishing prematurely hmm


Have a nice day! smile

Offline

Board footer

Powered by FluxBB