Toggle menu
Manjaro
Export translations
personal-extra
Toggle personal menu
Personal tools
English
Create account
Log in
Toggle search
Search
Random page
Export translations
Views
Language statistics
Message group statistics
Export
Actions
Namespaces
Translate
Variants
Tools
Printable version
Settings
Group
"What should I be aware of if I'm not on an LTS kernel?"
About Manjaro
Add a Storage Partition & Modify your System to Suit
Aliases in .bashrc
ALSA
Alternative way to install ManjaroISO
Amlogic TV boxes
Arch User Repository
Audio Players
Avidemux - Cutting out sections of video
Awesome Community Edition
Basic Submission Rules
Basic Tips for conky
BIOS and UEFI
Block Lists for Deluge & qBittorrent
Bmpanel2
Btrfs
Budgie
Build Manjaro ISOs with buildiso
Buildiso with AUR packages: Using buildpkg
Burn an ISO File
Change to a Different Download Server
CheatSheet
Check a Downloaded ISO Image For Errors
ClamAV
Configure Graphics Cards
Configure NVIDIA (non-free) settings and load them on Startup
Contributing
Create Manjaro Packages
Deepin
Desktop Environments and Window Managers
Developer Tools
Did X.server recognise your monitor correctly?
Display Managers / Login Screens
Displaymanager / Loginmanager
DMenu
Dolphin
Downgrading packages
Download Manjaro
Enable Touchpad Horizontal and Vertical Scrolling
Encfs
File Systems
Firejail
Firewalls
Firewalls and Security
Flatpak
Forum Rules
Fstab
Fstab - Use SystemD automount
GNOME
Graphical Software Managers
GRUB/Restore the GRUB Bootloader
How to mount Windows (NTFS) filesystem due to hibernation
How-to verify GPG key of official .ISO images
Important hidden .dot files in your home partition
Improve Font Rendering
Install Desktop Environments
Install Display Managers
Installation Guides
Installation with Manjaro Architect
Internet Browsers
KDE
Kernel Fails to Load (pata acpi error)
Keyboard and Mouse Sharing
Keyboard Shortcuts
Kvantum
Limit the size of .log files & the journal
Linux Security
List of Qt Applications
Locale
LXDM Configuration
LXQt
LXQt with kwin
Main Page
Make GRUB menu & boot-up/down fonts bigger
Makepkg
Manjaro
Manjaro FAQ
Manjaro Forums
Manjaro Hardware Detection
Manjaro Hardware Detection Overview
Manjaro IRC
Manjaro Kernels
Manjaro Mirrors
Manjaro Online
Manjaro Packaging Standards
Manjaro Polkit Rules
Manjaro Settings Manager
Manjaro-ARM
Manjaro-tools
Manjaro:A Different Kind of Beast
ManjaroISO
Mounting disk images
Mozilla Firefox
Mplayer
Networking
Octopi
Openbox
Pacman
Pacman Overview
Pacman troubleshooting
Pacman-mirrors
Page Translation
Pamac
Partitioning Overview and Existing Partition Tables
PCmanFM-Qt
PKGBUILD
Plymouth
Power Management
Preserve Manjaro Bootloader
Printing
Proper ~/.xinitrc File
Reactivating the Backlight
Repositories and Servers
Set all Java apps to use GTK+ font & theme settings
Set all Qt app's to use GTK+ font & theme settings
Setup Kmail & Davmail to connect to an Exchange server
Sharing files with Python
Snap
Software Applications
Some basics of MBR v/s GPT and BIOS v/s UEFI
Spotify
Swap
Switching Branches
Sync dynamic IP with openDNS service via ddclient
System Maintenance
Systemd-boot
TeamViewer
The Rolling Release Development Model
UEFI - Install Guide
Undervolt intel CPU
Using autofs (automount) with NFS
Using Compton for a tear-free experience in Xfce
Using Manjaro for Beginners
Using Manjaro for Windows users
Using Samba in your File Manager
Various screen tearing fixes
VCS PKGBUILD Guidelines
Viewing and editing configuration files
Virt-manager
VirtualBox
Vivaldi Browser
VMware
Wacom Tablet And Pen
Western Digital Green - Drive Fix - Linux
Wiki tweak page
Worker - An Introduction
Workflow states
Language
aa - Afar
ab - Abkhazian
abs - Ambonese Malay
ace - Achinese
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
ak - Akan
aln - Gheg Albanian
alt - Southern Altai
am - Amharic
ami - Amis
an - Aragonese
ang - Old English
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
ban-bali - ᬩᬲᬩᬮᬶ
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bcl - Central Bikol
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bg - Bulgarian
bgn - Western Balochi
bh - Bhojpuri
bho - Bhojpuri
bi - Bislama
bjn - Banjar
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
cdo - Min Dong Chinese
ce - Chechen
ceb - Cebuano
ch - Chamorro
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cr - Cree
crh - Crimean Turkish
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
din - Dinka
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dv - Divehi
dz - Dzongkha
ee - Ewe
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - español (formal)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
ff - Fulah
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gag - Gagauz
gan - Gan Chinese
gan-hans - Gan (Simplified)
gan-hant - Gan (Traditional)
gcr - Guianan Creole
gd - Scottish Gaelic
gl - Galician
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
grc - Ancient Greek
gsw - Swiss German
gu - Gujarati
guc - Wayuu
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
ht - Haitian Creole
hu - Hungarian
hu-formal - magyar (formal)
hy - Armenian
hyw - Western Armenian
hz - Herero
ia - Interlingua
id - Indonesian
ie - Interlingue
ig - Igbo
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kcg - Tyap
kg - Kongo
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kjp - Eastern Pwo
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lld - Ladin
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mad - Madurese
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Maori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mni - Manipuri
mnw - Mon
mo - Moldovan
mr - Marathi
mrh - Mara
mrj - Western Mari
ms - Malay
mt - Maltese
mus - Muscogee
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Min Nan Chinese
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
nia - Nias
niu - Niuean
nl - Dutch
nl-informal - Nederlands (informeel)
nn - Norwegian Nynorsk
no - Norwegian
nov - Novial
nqo - N’Ko
nrm - Norman
nso - Northern Sotho
nv - Navajo
ny - Nyanja
nys - Nyungar
oc - Occitan
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rm - Romansh
rmy - Vlax Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rw - Kinyarwanda
sa - Sanskrit
sah - Sakha
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy - Shawiya
shy-latn - Shawiya (Latin script)
si - Sinhala
simple - Simple English
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
smn - Inari Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - себертатар
su - Sundanese
sv - Swedish
sw - Swahili
szl - Silesian
szy - Sakizaya
ta - Tamil
tay - Tayal
tcy - Tulu
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tly-cyrl - толыши
tn - Tswana
to - Tongan
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
trv - Taroko
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
war - Waray
wo - Wolof
wuu - Wu Chinese
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
xsy - Saisiyat
yi - Yiddish
yo - Yoruba
yue - Cantonese
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
qqq - Message documentation
Format
Export for off-line translation
Export in native format
Fetch
<languages/> __TOC__ <div lang="en" dir="ltr" class="mw-content-ltr"> makepkg is used for compiling and building packages suitable for installation with [[pacman]]. makepkg is a script that automates the building of packages. It can download and validate source files, check dependencies, configure build-time settings, compile the sources, install into a temporary root, make customizations, generate meta-info, and package everything together. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> makepkg is provided by the [[pacman]] package. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Configuration == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{ic|/etc/makepkg.conf}} is the main configuration file for makepkg. Most users will wish to fine-tune makepkg configuration options prior to building any packages. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> A user specific configuration file which takes precedence over the system wide configuration may exist in {{ic|$HOME/.makepkg.conf}}. This is important to note if using i3, cinnamon, or deepin as the manjaro-desktop-settings packages for these desktop environments automatically create the user configuration file for new users by way of {{ic|/etc/skel/.makepkg.conf}}. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Architecture, compile flags === The {{ic|MAKEFLAGS}}, {{ic|CFLAGS}}, and {{ic|CXXFLAGS}} options are used by {{ic|make}}, {{ic|gcc}}, and {{ic|g++}} whilst compiling software with makepkg. By default, these options generate generic packages that can be installed on a wide range of machines. A performance improvement can be achieved by tuning compilation for the host machine. The downside is that packages compiled specifically for the compiling host's processor may not run on other machines. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{Note|Do keep in mind that not all package build systems will use your exported variables. Some override them in the original Makefiles or the [[PKGBUILD]].}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{hc|/etc/makepkg.conf|<nowiki> [...] </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### # CARCH="x86_64" CHOST="x86_64-unknown-linux-gnu" </div> <div lang="en" dir="ltr" class="mw-content-ltr"> #-- Exclusive: will only run on x86_64 # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family CPPFLAGS="-D_FORTIFY_SOURCE=2" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4" CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro" #-- Make Flags: change this for DistCC/SMP systems #MAKEFLAGS="-j2" </div> <div lang="en" dir="ltr" class="mw-content-ltr"> [...] </nowiki>}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The default makepkg.conf {{ic|CFLAGS}} and {{ic|CXXFLAGS}} are compatible with all machines within their respective architectures. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> On x86_64 machines, there are rarely significant enough real world performance gains that would warrant investing the time to rebuild official packages. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> As of version 4.3.0, GCC offers the {{ic|1=-march=native}} switch that enables CPU auto-detection and automatically selects optimizations supported by the local machine at GCC runtime. To use it, just modify the default settings by changing the {{ic|CFLAGS}} and {{ic|CXXFLAGS}} lines as follows: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> # -march=native also sets the correct -mtune= CFLAGS="-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" CXXFLAGS="${CFLAGS}" </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{Tip|To see what {{ic|1=march=native}} flags are, run: <nowiki>$ gcc -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p'</nowiki> }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Further optimizing for CPU type can theoretically enhance performance because {{ic|1=-march=native}} enables all available instruction sets and improves scheduling for a particular CPU. This is especially noticeable when rebuilding applications (for example: audio/video encoding tools, scientific applications, math-heavy programs, etc.) that can take heavy advantage of newer instructions sets not enabled when using the default options (or packages) provided by Manjaro Linux. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> It is very easy to reduce performance by using "non-standard" CFLAGS because compilers tend to heavily blow up the code size with loop unrolling, bad vectorization, crazy inlining, etc. depending on compiler switches. Unless you can verify/benchmark that something is faster, there is a very good chance it is not! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> See the GCC man page for a complete list of available options. The Gentoo [http://www.gentoo.org/doc/en/gcc-optimization.xml Compilation Optimization Guide] and [http://wiki.gentoo.org/wiki/Safe_CFLAGS Safe CFLAGS] wiki article provide more in-depth information. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ====MAKEFLAGS==== The {{ic|MAKEFLAGS}} option can be used to specify additional options for make. Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. This can be accomplished with the use of {{ic|nproc}} to determine the number of available processors, e.g. {{ic|-j4}} ''(where 4 is the output of {{ic|nproc}})''. Some [[PKGBUILD]]'s specifically override this with {{ic|-j1}}, because of race conditions in certain versions or simply because it is not supported in the first place. Packages that fail to build because of this should be [[Reporting Bug Guidelines|reported]] on the bug tracker after making sure that the error is indeed being caused by your MAKEFLAGS. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> See {{ic|man make}} for a complete list of available options. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Package output === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Next, one can configure where source files and packages should be placed and identify themselves as the packager. This step is optional; packages will be created in the working directory where makepkg is run by default. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{hc|/etc/makepkg.conf|<nowiki> [...] </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ######################################################################### # PACKAGE OUTPUT ######################################################################### # # Default: put built package and cached source in build directory # #-- Destination: specify a fixed directory where all packages will be placed #PKGDEST=/home/packages #-- Source cache: specify a fixed directory where source files will be cached #SRCDEST=/home/sources #-- Source packages: specify a fixed directory where all src packages will be placed #SRCPKGDEST=/home/srcpackages #-- Packager: name/email of the person or organization building packages #PACKAGER="John Doe <john@doe.com>" </div> <div lang="en" dir="ltr" class="mw-content-ltr"> [...] </nowiki>}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> For example, create the directory: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> $ mkdir /home/$USER/packages </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Then modify the {{ic|PKGDEST}} variable in {{ic|/etc/makepkg.conf}} accordingly. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The {{ic|PACKAGER}} variable will set the {{ic|packager}} value within compiled packages' {{ic|.PKGINFO}} metadata file. By default, user-compiled packages will display: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{hc|pacman -Qi package|<nowiki> [...] Packager : Unknown Packager [...] </nowiki>}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Afterwards: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{hc|pacman -Qi package|<nowiki> [...] Packager : John Doe <john@doe.com> [...] </nowiki>}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This is useful if multiple users will be compiling packages on a system, or you are otherwise distributing your packages to other users. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Signature checking === The following procedure is not necessary for compiling with makepkg, for your initial configuration proceed to [[#Usage]]. To temporarily disable signature checking call the makepkg command with the {{ic|--skippgpcheck}} option. If a signature file in the form of .sig is part of the [[PKGBUILD]] source array, makepkg validates the authenticity of source files. For example, the signature pkgname-pkgver.tar.gz.sig is used to check the integrity of the file pkgname-pkgver.tar.gz with the gpg program. If desired, signatures by other developers can be manually added to the gpg keyring. Look into the [[GnuPG]] article for further information. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{Note|The signature checking implemented in makepkg does not use pacman's keyring. Configure gpg as explained below to allow makepkg reading pacman's keyring.}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The gpg keys are expected to be stored in the user's {{ic|~/.gnupg/pubring.gpg}} file. In case it does not contain the given signature, makepkg shows a warning. {{hc|makepkg|<nowiki> [...] ==> Verifying source file signatures with gpg... pkgname-pkgver.tar.gz ... FAILED (unknown public key 1234567890) ==> WARNING: Warnings have occurred while verifying the signatures. Please make sure you really trust them. [...] </nowiki>}} To show the current list of gpg keys use the gpg command. {{bc|gpg --list-keys}} If the pubring.gpg file does not exist it will be created for you immediatly. You can now proceed with configuring gpg to allow compiling AUR packages submitted by Arch Linux developers with successful signature checking. Add the following line to the end of your gpg configuration file to include the pacman keyring in your user's personal keyring. {{hc|~/.gnupg/gpg.conf|<nowiki> [...] keyring /etc/pacman.d/gnupg/pubring.gpg </nowiki>}} When configured as before, the output of {{ic|gpg --list-keys}} contains a list of keyrings and developers. Now makepkg can compile AUR packages submitted by Arch Linux developers with successful signature checking. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Usage == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Before continuing, ensure the "base-devel" group is installed. Packages belonging to this group are not required to be listed as dependencies in [[PKGBUILD]] files. Install the "base-devel" group by issuing (as root): </div> <div lang="en" dir="ltr" class="mw-content-ltr"> # pacman -S base-devel </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{Note|Before complaining about missing (make) dependencies, remember that the "base" group is assumed to be installed on all Manjaro Linux systems. The group "base-devel" is assumed to be installed when building with '''makepkg'''.}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> To build a package, one must first create a [[PKGBUILD]], or build script, as described in [[Create Manjaro Packages]], or obtain one from the [https://gitlab.manjaro.org Manjaro Gitlab Repositories], [[Arch User Repository]], or some other source. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{Warning|Only build and/or install packages from trusted sources.}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Once in possession of a {{ic|PKGBUILD}}, change to the directory where it is saved and issue the following command to build the package described by said {{ic|PKGBUILD}}: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> $ makepkg </div> <div lang="en" dir="ltr" class="mw-content-ltr"> To have makepkg clean out leftover files and folders, such as files extracted to the $srcdir, add the following option. This is useful for multiple builds of the same package or updating the package version, while using the same build folder. It prevents obsolete and remnant files from carrying over to the new builds. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> $ makepkg -c </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If required dependencies are missing, makepkg will issue a warning before failing. To build the package and install needed dependencies automatically, simply use the command: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> $ makepkg -s </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Note that these dependencies must be available in the configured repositories; see [[pacman]] for details. Alternatively, one can manually install dependencies prior to building ({{ic|pacman -S --asdeps dep1 dep2}}). </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Once all dependencies are satisfied and the package builds successfully, a package file ({{ic|pkgname-pkgver.pkg.tar.xz}}) will be created in the working directory. To install, run (as root): </div> <div lang="en" dir="ltr" class="mw-content-ltr"> # pacman -U pkgname-pkgver.pkg.tar.xz </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Alternatively, to install, using the {{ic|-i}} flag is an easier way of running {{ic|pacman -U pkgname-pkgver.pkg.tar.xz}}, as in: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> $ makepkg -i </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Tips and Tricks == === Improving compile times === As an I/O intensive task, the use of a [[tmpfs]] for compiling packages may bring signifiant improvements in build times. Relevant option in {{ic|/etc/makepkg.conf}} is to be found at the end of the {{ic|BUILD ENVIRONMENT}} section: {{hc|/etc/makepkg.conf|<nowiki> [...] </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ######################################################################### # BUILD ENVIRONMENT ######################################################################### # # Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) # A negated environment option will do the opposite of the comments below. # #-- fakeroot: Allow building packages as a non-root user #-- distcc: Use the Distributed C/C++/ObjC compiler #-- color: Colorize output messages #-- ccache: Use ccache to cache compilation #-- check: Run the check() function if present in the PKGBUILD #-- sign: Generate PGP signature file # BUILDENV=(fakeroot !distcc color !ccache check !sign) # #-- If using DistCC, your MAKEFLAGS will also need modification. In addition, #-- specify a space-delimited list of hosts running in the DistCC cluster. #DISTCC_HOSTS="" # #-- Specify a directory for package building. #BUILDDIR=/tmp </div> <div lang="en" dir="ltr" class="mw-content-ltr"> [...] </nowiki>}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Uncommenting the {{ic|1=BUILDDIR=/tmp}} line and setting it to e.g. {{ic|1=BUILDDIR=/tmp/builds}} (or leaving it to its default value) will make use of Arch default {{ic|/tmp}} [[tmpfs]]. {{Note|The [[tmpfs]] folder needs to be mounted without the {{ic|noexec}} option, else it will prevent build scripts or utilities from being executed. Also, as stated in [[fstab#tmpfs]], its default size is half of the available RAM so you may run out of space.}} For more information, please refer to [[fstab]] and [[Tmpfs#Improving compile times]]. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Generate new md5sums === Since [http://allanmcrae.com/2013/04/pacman-4-1-released/ pacman 4.1] {{ic|makepkg -g >> PKGBUILD}} is no longer required as pacman-contrib was [https://projects.archlinux.org/pacman.git/tree/NEWS merged] along with the {{ic|updpkgsums}} script that will generate new checksums and replace them in the PKGBUILD: $ updpkgsums </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Makepkg source PKGBUILD twice === Makepkg sources the PKGBUILD twice (once when initially run, and the second time under fakeroot). Any non-standard functions placed in the PKGBUILD will be run twice as well. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === WARNING: Package contains reference to $srcdir === Somehow, the literal strings {{ic|$srcdir}} or {{ic|$pkgdir}} ended up in one of the installed files in your package. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> To identify which files, run the following from the makepkg build directory: $ grep -R "$(pwd)/src" pkg/ </div> <div lang="en" dir="ltr" class="mw-content-ltr"> [http://www.mail-archive.com/arch-general@archlinux.org/msg15561.html Link] to discussion thread. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Create uncompressed packages === If you only want to install packages locally, you can speed up the process by avoiding compression and subsequent decompression. In {{ic|makepkg.conf}}, change {{ic|<nowiki>PKGEXT='.pkg.tar.xz'</nowiki>}} to {{ic|<nowiki>PKGEXT='.pkg.tar'</nowiki>}}. </div> [[Category:Contents Page{{#translation:}}]]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
OK