You are not logged in.

#1 2014-07-21 08:50:42

loris1123
Member
From: 127.0.0.1
Registered: 2014-07-21
Posts: 4

Where to put .bashrc additions in a PKGBUILD?

Hello everybody,

I'm creating my first package for AUR. After installation the package needs some changes in .bashrc in order to work.
Where is the best place to do these changes?
Of course I could it in any function of the PKGBUILD. But I think this would brake some conventions, wouldnt it?
Thank you.

Last edited by loris1123 (2014-07-21 09:22:21)

Offline

#2 2014-07-21 10:35:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Where to put .bashrc additions in a PKGBUILD?

Packages shouldn't touch my dotfiles.
What exactly is the change, post the PKGBUILD.

Last edited by karol (2014-07-21 10:36:16)

Offline

#3 2014-07-21 11:00:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Where to put .bashrc additions in a PKGBUILD?

You can either echo the needed lines with instructions to include manually in a post_install section of readme.install or if too large, you can simply include them in /usr/share/pkgname/foo with instructions for the user to merge them in his/her .bashrc in the same scriptet.

Last edited by graysky (2014-07-21 11:01:33)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2014-07-21 11:31:29

loris1123
Member
From: 127.0.0.1
Registered: 2014-07-21
Posts: 4

Re: Where to put .bashrc additions in a PKGBUILD?

I just need to add a environmental variable and add something to PATH

Offline

#5 2014-07-21 11:35:42

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,538

Re: Where to put .bashrc additions in a PKGBUILD?

Why not add a script to /etc/profile.d ?

Offline

#6 2014-07-21 13:05:55

loris1123
Member
From: 127.0.0.1
Registered: 2014-07-21
Posts: 4

Re: Where to put .bashrc additions in a PKGBUILD?

/etc/profile.d sounds like a good idea. The good thing is, that the changes will be for every user then.
Sadly the user has to relogin, but I think this is okay.

Offline

#7 2014-07-21 13:11:07

Awebb
Member
Registered: 2010-05-06
Posts: 6,272

Re: Where to put .bashrc additions in a PKGBUILD?

graysky wrote:

You can either echo the needed lines with instructions to include manually in a post_install section of readme.install or if too large, you can simply include them in /usr/share/pkgname/foo with instructions for the user to merge them in his/her .bashrc in the same scriptet.

This is the way to go, if you want to upload it to the AUR. The majority of users will hate you for everything else.

loris1123 wrote:

I just need to add a environmental variable and add something to PATH

Even the JRE package only informs you about a possibly missing PATH item. In my opinion, pacman has no business altering anything on the user side.

Last edited by Awebb (2014-07-21 13:12:35)

Online

#8 2014-07-21 13:23:53

loris1123
Member
From: 127.0.0.1
Registered: 2014-07-21
Posts: 4

Re: Where to put .bashrc additions in a PKGBUILD?

Awebb wrote:
graysky wrote:

You can either echo the needed lines with instructions to include manually in a post_install section of readme.install or if too large, you can simply include them in /usr/share/pkgname/foo with instructions for the user to merge them in his/her .bashrc in the same scriptet.

This is the way to go, if you want to upload it to the AUR. The majority of users will hate you for everything else.

If you say so, I will take this advice from expirienced users like you. Thank you smile

Offline

Board footer

Powered by FluxBB