Skip to content

How do I edit PKGBUILD?

Srry if I'm a total noob but just got my first arch-install.

I'm having problem with showing some symbols in my terminal (urxvt). I searched the web and found this potential solution saying:

" In the PKGBUILD under build():

Change --disable-frills
to

--enable-frills
--enable-unicode3 "

I have no idea how to do this, I've looked at the wiki but still aren't sure how to do it. I know that when installing packages from yaourt I usually get the option to edit PKGBUILD but sadly that option isn't available when installing urxvt. Plz help a new arch linux user :)

8 points20 comments
Open on Reddit
About this post
Posted
Archived
Score
8 · 100% up
Kind
Text
ID
3pgtd3

Author

15
posts
46
comments
3
media
View profile

20 comments

PKGBUILD is a text file that can be edited with a text editor.

installing packages from yaourt

Install packages manually until you understand the process.

14 points

Since you use yaourt:

$ yaourt -G rxvt-unicode
$ cd rxvt-unicode
# Modify the PKGBUILD using any text editor
$ makepkg -i

And as advised by /r/moonarch, try to understand what's actually happening when you're building (AUR) packages instead of blindly relying on AUR helpers.

13 points

Really that? Fastest way is

yaourt -Sb rxvt-unicode

It will ask to modify PKGBUILD

7 points

I'm more used to downloading PKGBUILDs and keeping the source around for testing until I'm sure it satisfies me (e.g. for ffmpeg), hence the 2-step process, but thanks for pointing that out since he apparently knows exactly what to change :)

1 points

You've got lots of answers regarding how to fix your problem, but I figured I could still explain why Yaourt isn't giving you an option to edit the PKGBUILD.

The more commonly used packages are maintained by a set of people called package maintainers. When new versions of the software get released, they make sure the PKGBUILD is updated, but rather than requiring every user to recompile the package, they also upload a pre-compiled package to the Arch repositories.

When installing "rxvt-unicode", that's a pre-compiled package available in the Arch Community repo. Because of this, Yaourt never downloads a PKGBUILD (instead it tells Pacman to install the pre-compiled package straight from the repository), so obviously doesn't give you a chance to edit it.

7 points

It is very obvious that you do not understand the build process. I would compiling packages manually (via makepkg) until then.

1 points

If it's a pre complied package not in AUR then you probably won't get the option

-1 points

Ahh, there's ABS for such a scenario if the package came from the official repos..

3 points

True.. I should have suggested that.. ABS will work for this

1 points
  • Download a fresh tar file from the AUR.

  • cd to its location in CLI and use "tar -xvf <filename>"

  • cd into the folder.

  • "sudo nano PKGBUILD"

  • Make your changes.

  • Ctrl-o to save changes; Ctrl-x to exit nano.

  • "makepkg PKGBUILD"

  • "sudo pacman -U <newfilename-1>"

-2 points

"sudo nano PKGBUILD"

sudo is usually not needed here - unless you're storing your PKGBUILDs in places that your normal user can't access.

9 points

Ah yeah that's true. "sudo nano" is like a muscle memory reflex from the installation process. Also having checked the wiki "makepkg PKGBUILD" appears to be a slightly outdated way of compiling the package, but it should work fine here.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.