You are not logged in.

#1 2020-11-30 08:11:12

adigitoleo
Member
From: Australia
Registered: 2020-08-02
Posts: 31

[SOLVED] Installing editor tools in PKGBUILD?

Hey, so I recently published an AUR package for enaml. I just found out that upstream provides some editor tools that are useful for working with this library (syntax/enaml.vim etc.) I went ahead and symlinked them on my end, but then I thought that I could do it from package() in the PKGBUILD.

Let's say I add something like:

package() {
cd "$srcdir/$_shortname"  # now in src/python-enaml
...  # install python package and license
install -Dm644 ./tools/vim/ftdetect/enaml.vim -t "$pkgdir/usr/share/vim/vimfiles/ftdetect/"
...  # also the indent and syntax files
}

Is that the right way to go about this? Also, similar tools are provided for other editors, so should I verify that they are installed before copying stuff to /usr/share/{editor}?

Any other advice is welcome (it's my first PKGBUILD so there could be mistakes - thanks to caltlgin for finding some already).

Last edited by adigitoleo (2020-12-14 05:21:11)

Offline

#2 2020-12-10 20:32:30

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,936

Re: [SOLVED] Installing editor tools in PKGBUILD?

It's customary to install all support files on the rationale that users possessing those editors will then have it work out of the box.

P.S. Do not do this: https://aur.archlinux.org/cgit/aur.git/ … a497fcaa84
AUR helpers usually have a --devel flag for this.


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

Offline

#3 2020-12-14 01:25:58

adigitoleo
Member
From: Australia
Registered: 2020-08-02
Posts: 31

Re: [SOLVED] Installing editor tools in PKGBUILD?

Thanks, I'll update to include installation of those files soon.

eschwartz wrote:

P.S. Do not do this: https://aur.archlinux.org/cgit/aur.git/ … a497fcaa84
AUR helpers usually have a --devel flag for this.

Do you mean that I should only update the pkgver at major version changes? I skimmed the guidelines again but couldn't see explicit suggestions on how to deal with dynamic sources.

In my defence, the new commit I was pulling from upstream was my own contribution that I wanted to use smile but I can see how it wouldn't make sense to change the pkgver for every single upstream commit...

Offline

#4 2020-12-14 01:54:01

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,175

Re: [SOLVED] Installing editor tools in PKGBUILD?

You should only change the $pkgver when the PKGBUILD needs to be updated due to changes in the build process. If no edits are required not even major version changes should bump it.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2020-12-14 01:55:19

loqs
Member
Registered: 2014-03-06
Posts: 13,014

Re: [SOLVED] Installing editor tools in PKGBUILD?

adigitoleo wrote:

In my defence, the new commit I was pulling from upstream was my own contribution that I wanted to use smile but I can see how it wouldn't make sense to change the pkgver for every single upstream commit...

_shortname="${pkgname%-git}"
...
url="https://github.com/nucleic/enaml"
...
source=("$_shortname::git+$url")

makepkg will fetch the default branch as none is specified of project enaml,  it will checkout the HEAD of the default branch as no tag,  commit or branch is specified.
If you want to make a newer version of the package just run makepkg without pushing the updated pkgver to AUR.

Offline

#6 2020-12-14 05:20:50

adigitoleo
Member
From: Australia
Registered: 2020-08-02
Posts: 31

Re: [SOLVED] Installing editor tools in PKGBUILD?

Alright thanks everyone for the tips and clarification, marking as solved.

Offline

Board footer

Powered by FluxBB