<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AUR on miti99</title><link>https://miti99.com/en/tags/aur/</link><description>Recent content in AUR on miti99</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 16 Nov 2026 17:39:19 +0700</lastBuildDate><atom:link href="https://miti99.com/en/tags/aur/index.xml" rel="self" type="application/rss+xml"/><item><title>Speeding Up makepkg</title><link>https://miti99.com/en/post/2020/05/06/</link><pubDate>Tue, 05 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/06/</guid><description>&lt;p&gt;In this post, I&amp;rsquo;ll show you how to tweak your setup to make building packages from the AUR faster. However, every benefit comes with its own risks—there&amp;rsquo;s a chance you might run into some random error somewhere in a few edge cases :v&lt;/p&gt;
&lt;p&gt;To keep things quick and to the point, I&amp;rsquo;ll give you the &amp;ldquo;instant noodles&amp;rdquo; version right away!&lt;/p&gt;
&lt;p&gt;Install a few required packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S ccache lzop xz pigz pbzip2 zstd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Next, open &lt;code&gt;/etc/makepkg.conf&lt;/code&gt;, look for the UPPERCASE variables, and update them to match the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;-march=native -O2 -pipe -fstack-protector-strong -fno-plt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CXXFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CFLAGS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;BUILDDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp/makepkg
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PKGEXT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;.pkg.tar.lzo&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSXZ&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;xz -c -z - --threads&lt;span class="o"&gt;=&lt;/span&gt;0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSGZ&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;pigz -c -f -n&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSBZ2&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;pbzip2 -c -f&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSZST&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;zstd -c -z -q - --threads&lt;span class="o"&gt;=&lt;/span&gt;0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;BUILDENV&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;!distcc color ccache check !sign&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;MAKEFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;-j&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;nproc&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Reference: &lt;a href="https://wiki.archlinux.org/index.php/Makepkg" rel="noopener noreferrer"&gt;https://wiki.archlinux.org/index.php/Makepkg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;</description></item><item><title>Installing AUR Packages on Arch Linux</title><link>https://miti99.com/en/post/2020/04/13/</link><pubDate>Mon, 13 Apr 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/04/13/</guid><description>&lt;p&gt;The Arch User Repository (AUR) is a community-driven repository where anyone can create their own packages and share them with other users. It&amp;rsquo;s one of the main reasons Arch is so convenient and why so many people choose Arch as their daily distro.&lt;/p&gt;
&lt;p&gt;Pretty much any package you can find on other distros is available either in the Official Repositories or in the AUR. Well-known software almost always has an AUR package—for instance, &lt;code&gt;ibus-bamboo&lt;/code&gt;, my favorite Vietnamese input method, is right there in the AUR.&lt;/p&gt;
&lt;p&gt;Moreover, for open-source projects that only provide source code for users to build themselves (such as projects on GitHub), installing from the AUR is much easier and makes package management a breeze.&lt;/p&gt;
&lt;p&gt;At the time of writing, while the Official Repositories already have an impressive 11,278 packages, the AUR has a whopping 59,729 packages—pretty massive, right? :D&lt;/p&gt;
&lt;p&gt;Of course, that strength is also its weakness: since anyone can upload packages to the AUR, it has a reputation for potentially coming with a few &amp;ldquo;free&amp;rdquo; viruses or malware courtesy of the package author :v. So be careful and stick to packages from trusted sources—such as packages mentioned on the Arch Wiki, linked directly from the project&amp;rsquo;s official homepage (for example, &lt;code&gt;ibus-bamboo&lt;/code&gt; explicitly lists its AUR package for Arch and Arch-based distros), or packages with high vote counts and popularity scores.&lt;/p&gt;
&lt;h2 id="how-to-install-packages-from-the-aur-yay"&gt;How to Install Packages from the AUR (yay)&lt;/h2&gt;&lt;p&gt;Here I&amp;rsquo;ll walk you through installing &lt;code&gt;yay&lt;/code&gt; (a very popular AUR helper). Since this is a basic guide, I&amp;rsquo;ll skip advanced build configurations and just cover the 3 main steps.&lt;/p&gt;
&lt;p&gt;First, install the &lt;code&gt;base-devel&lt;/code&gt; package group, which contains the essential tools needed to build packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo pacman -S base-devel
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Next, clone the package repository from its AUR link—here I&amp;rsquo;m using &lt;code&gt;yay&lt;/code&gt; (&lt;a href="https://aur.archlinux.org/packages/yay/%29:" rel="noopener noreferrer"&gt;https://aur.archlinux.org/packages/yay/):&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://aur.archlinux.org/yay.git&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; yay
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;makepkg -si
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it :D Super simple, right? Once installed, the package can be managed by &lt;code&gt;pacman&lt;/code&gt; just like any regular package. However, &lt;code&gt;pacman&lt;/code&gt; cannot automatically update AUR packages—if you want to update them manually, you&amp;rsquo;d have to track updates yourself and repeat the steps above. To get around that inconvenience, we use AUR helpers, and here I use &lt;code&gt;yay&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="yay-yet-another-yogurt"&gt;yay (Yet another Yogurt)&lt;/h2&gt;&lt;p&gt;As mentioned above, installing a package from the AUR only takes 3 simple steps, but it doesn&amp;rsquo;t handle automatic updates. That&amp;rsquo;s why I&amp;rsquo;m introducing &lt;code&gt;yay&lt;/code&gt;: with &lt;code&gt;yay&lt;/code&gt;, installing an AUR package takes just a single command, identical to &lt;code&gt;pacman&lt;/code&gt; :v (since &lt;code&gt;yay&lt;/code&gt; is a Pacman wrapper, after all :D). The only difference during installation is an extra build step, so it takes a bit longer than usual. On top of that, &lt;code&gt;yay&lt;/code&gt; combines the best ideas from &lt;code&gt;yaourt&lt;/code&gt;, &lt;code&gt;apacman&lt;/code&gt;, and &lt;code&gt;pacaur&lt;/code&gt; (pretty big names if you&amp;rsquo;ve been around Arch for a while :v—though &lt;code&gt;yaourt&lt;/code&gt; is now discontinued, which is why &lt;code&gt;yay&lt;/code&gt; stepped in to replace it).&lt;/p&gt;
&lt;p&gt;Without further ado, I already showed how to install &lt;code&gt;yay&lt;/code&gt; above, so I won&amp;rsquo;t repeat myself :v&lt;/p&gt;
&lt;p&gt;As for how to use it&amp;hellip; well, since &lt;code&gt;yay&lt;/code&gt; uses the exact same syntax as &lt;code&gt;pacman&lt;/code&gt;, there&amp;rsquo;s barely anything to explain :v. If you want to install package &lt;code&gt;X&lt;/code&gt;, just run &lt;code&gt;yay -S X&lt;/code&gt; :v, read the prompts to pick whichever options you want, or if you&amp;rsquo;re feeling lazy, just keep hitting Enter—9 times out of 10 it&amp;rsquo;ll install just fine :v&lt;/p&gt;
&lt;p&gt;Oh, one quick tip: to update your entire system, all you need to run is &lt;code&gt;yay&lt;/code&gt; (it acts as a shorthand for &lt;code&gt;yay -Syyu&lt;/code&gt;, just like &lt;code&gt;sudo pacman -Syyu&lt;/code&gt; :v). No need to overcomplicate things—just type &lt;code&gt;yay&lt;/code&gt; :D&lt;/p&gt;</description></item></channel></rss>