You are not logged in.

#1 2013-12-29 03:38:02

jonlorusso
Member
Registered: 2013-12-29
Posts: 7

[Solved] Modifying AUR packages

I'd like to install a package from the AUR which requires me to modify the source in order to configure it.  What's the best way to do this? Should I just download the source and make install (to /usr/local) myself?  Should I create a patch and modify the PKGBUILD?

Forgive me if this has been answered already. I found it difficult to formulate an effective search term.

Last edited by jonlorusso (2013-12-29 04:36:25)

Offline

#2 2013-12-29 03:45:35

jonlorusso
Member
Registered: 2013-12-29
Posts: 7

Re: [Solved] Modifying AUR packages

There's some useful stuff here, though I don't know if that is the best way to go.  What are the advantages of installing it as a package, rather than maintaining the source myself?

Offline

#3 2013-12-29 03:49:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Modifying AUR packages

You don't need to use makepkg for simple packages like this, but it is a good idea to learn how to do it and have pacman track the installed package before you decide to freestyle it.

Download the tarball, extract it. Build it with makepkg. Make your changes and then rebuild and install it. Rinse and repeat.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2013-12-29 03:51:02

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: [Solved] Modifying AUR packages

jonlorusso wrote:

I'd like to install a package from the AUR which requires me to modify the source in order to configure it.  What's the best way to do this? Should I just download the source and make install (to /usr/local) myself?  Should I create a patch and modify the PKGBUILD?

Forgive me if this has been answered already. I found it difficult to formulate an effective search term.

IMO, it's usually best to keep the package manager in on the loop when installing anything, which implies you should be doing things with a PKGBUILD at some point. So I guess my answer is ... just modify the PKGBUILD. You don't even need a patch for that (unless you want the package maintainer to change the PKGBUILD in the AUR).

Offline

#5 2013-12-29 04:10:54

jonlorusso
Member
Registered: 2013-12-29
Posts: 7

Re: [Solved] Modifying AUR packages

jasonwryan wrote:

Download the tarball, extract it. Build it with makepkg. Make your changes and then rebuild and install it. Rinse and repeat.

The reason I though I needed a patch is that, it seems like my modifications always get overridden:

==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found st-0.4.1.tar.gz
==> Validating source files with md5sums...
    st-0.4.1.tar.gz ... Passed
==> Extracting sources...
  -> Extracting st-0.4.1.tar.gz with bsdtar
==> Removing existing pkg/ directory...
==> Starting build()...

Is there some way to skip the (re)extract via makepkg?

Thanks--

Offline

#6 2013-12-29 04:11:40

jonlorusso
Member
Registered: 2013-12-29
Posts: 7

Re: [Solved] Modifying AUR packages

Ah nevermind --help is your friend:

 -e, --noextract  Do not extract source files (use existing src/ dir) 

Offline

#7 2013-12-29 04:28:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Modifying AUR packages

man makepgk

is even friendlier smile

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2013-12-29 11:59:38

xtraroot
Member
Registered: 2013-12-17
Posts: 59

Re: [Solved] Modifying AUR packages

Yea, just replace the url source in the makepkg with the package's name and put it in the same folder as the makepkg. Then you have to use --skipinteg option because it won't pass the md5sums.

Last edited by xtraroot (2013-12-29 12:02:11)

Offline

#9 2013-12-29 13:23:37

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [Solved] Modifying AUR packages

The *correct* thing to do is to patch in prepare()

Last edited by Mr.Elendig (2013-12-29 13:23:55)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2018-10-03 18:23:10

aabbcc1241
Member
Registered: 2017-12-13
Posts: 1

Re: [Solved] Modifying AUR packages

besides leaving comment on the package, how do I feedback a fix to a package?
For example, the conflict of brave-beta-bin is marked as brave-beta-bin, but it should be brave-bin actually.
How do I "fork and submit a pull request" of the PKGBUILD file?

package under reference: https://aur.archlinux.org/packages/brave-beta-bin

Offline

#11 2018-10-03 21:51:21

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [Solved] Modifying AUR packages

aabbcc1241, please do not necrobump old threads like this one.  As far as I know, leaving a comment is the only way to give feedback to an aur package.  You can also use the Submit Request button on the right to ask for a merge / deletion.

Offline

#12 2018-10-03 21:55:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,449

Re: [Solved] Modifying AUR packages

1. Don't expect people to immediately answer to an AUR comment
2. There usually are email addresses that can be used to contact the maintainer
3. Definitely do not necrobump a completely unrelated solved thread.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Last edited by V1del (2018-10-03 21:56:00)

Offline

Board footer

Powered by FluxBB