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__ A '''PKGBUILD''' is an Manjaro Linux package build description file (actually it is a shell script) used when [[Create Manjaro Packages|creating packages]]. Packages in Manjaro Linux are built using the [[makepkg]] utility and information stored in PKGBUILDs. When '''makepkg''' is run, it searches for a {{Ic|PKGBUILD}} in the current directory and follows the instructions therein to either compile or otherwise acquire the files to build a package file ({{ic|''pkgname''.pkg.tar.xz}}). The resulting package contains binary files and installation instructions, readily installed with [[pacman]]. == Variables == The following are variables that can be filled out in the PKGBUILD file. {{ic|pkgname}}, {{ic|pkgver}}, {{ic|pkgrel}}, and {{ic|arch}} are all mandatory. {{ic|license}} is not strictly necessary to build a package, but it is recommended for any PKGBUILDS you might want to share with others. {{ic|makepkg}} produces warnings if it isn't present. It is common practice to define the variables in the PKGBUILD in same order as given here. However, this is not mandatory, as long as correct [[Bash]] syntax is used. === pkgname === The name of the package. It should consist of ''alphanumeric and any of the following characters @ . _ + - (at symbol, dot, underscore, plus, hyphen)''. All letters should be ''lowercase'' and ''names are not allowed to start with hyphens''. For the sake of consistency, {{ic|pkgname}} should match the name of the source tarball of the software you are packaging. For instance, if the software is in {{ic|foobar-2.5.tar.gz}}, the {{ic|pkgname}} value should be {{Ic|foobar}}. The present working directory the PKGBUILD file is in should also match the {{ic|pkgname}}. === pkgver === The version of the package. The value should be the same as the version released by the author of the package. It can contain letters, numbers, periods and underscore but CANNOT contain a hyphen. If the author of the package uses a hyphen in their version numbering scheme, replace it with an underscore. For instance, if the version is ''0.99-10'', it should be changed to ''0.99_10''. If the {{ic|pkgver}} variable is used later in the PKGBUILD then the underscore can easily be substituted for a dash on usage e.g.: source=($pkgname-${pkgver//_/-}.tar.gz) === pkgrel === The release number of the package specific to Arch Linux. This value allows users to differentiate between consecutive builds of the same version of a package. When a new package version is first released, the '''release number starts at 1'''. As fixes and optimizations are made to the {{ic|PKGBUILD}} file, the package will be '''re-released''' and the '''release number''' will increment by 1. When a new version of the package comes out, the release number resets to 1. === pkgdir === This variable reflects the root directory of what will be put into the package. It is commonly used in {{ic|1=make DESTDIR="$pkgdir" install}}. === epoch === Used to force the package to be seen as newer than any previous versions with a lower epoch, even if the version number would normally not trigger such an upgrade. This value is required to be a positive integer; the default value if left unspecified is 0. This is useful when the version numbering scheme of a package changes (or is alphanumeric), breaking normal version comparison logic. See pacman(8) for more information on version comparisons. === pkgbase === An optional global directive is available when building a split package, pkgbase is used to refer to the group of packages in the output of makepkg and in the naming of source-only tarballs. If not specified, the first element in the pkgname array is used. All options and directives for the split packages default to the global values given in the PKGBUILD. Nevertheless, the following ones can be overridden within each split package's packaging function: pkgver, pkgrel, epoch, pkgdesc, arch, url, license, groups, depends, optdepends, provides, conflicts, replaces, backup, options, install and changelog. The variable is not allowed to begin with a hyphen. === pkgdesc === The description of the package. The description should be about 80 characters or less and should not include the package name in a self-referencing way. For instance, "Nedit is a text editor for X11" should be written as "A text editor for X11." {{Note|Do not follow this rule thoughtlessly when submitting packages to [[AUR]]. If package name differs from application name for some reason, inclusion of full name into description can be the only way to ensure that package can be found during search.}} === arch === An array of architectures that the {{ic|PKGBUILD}} file is known to build and work on. Currently, it should contain {{ic|i686}} and/or {{ic|x86_64}}, {{ic|1=arch=('i686' 'x86_64')}}. The value {{ic|any}} can also be used for architecture-independent packages. You can access the target architecture with the variable {{ic|$CARCH}} during a build, and even when defining variables. See also [https://bugs.archlinux.org/task/16352 FS16352]. Example: depends=(foobar) if test "$CARCH" == x86_64; then depends+=(lib32-glibc) fi === url === The URL of the official site of the software being packaged. === license === The license under which the software is distributed. A {{ic|licenses}} package has been created in {{ic|[core]}} that stores common licenses in {{ic|/usr/share/licenses/common}}, e.g. {{ic|/usr/share/licenses/common/GPL}}. If a package is licensed under one of these licenses, the value should be set to the directory name, e.g. {{ic|1=license=('GPL')}}. If the appropriate license is not included in the official {{ic|licenses}} package, several things must be done: # The license file(s) should be included in: {{ic|/usr/share/licenses/''pkgname''/}}, e.g. {{ic|/usr/share/licenses/foobar/LICENSE}}. # If the source tarball does NOT contain the license details and the license is only displayed elsewhere, e.g. a website, then you need to copy the license to a file and include it. # Add {{ic|custom}} to the {{ic|license}} array. Optionally, you can replace {{ic|custom}} with {{ic|custom:name of license}}. Once a license is used in two or more packages in an official repository (including {{ic|[community]}}), it becomes a part of the {{ic|licenses}} package. * The [[Wikipedia:BSD License|BSD]], [[Wikipedia:MIT License|MIT]], [[Wikipedia:ZLIB license|zlib/png]] and [[Wikipedia:Python License|Python]] licenses are special cases and could not be included in the {{ic|licenses}} package. For the sake of the {{ic|license}} array, it is treated as a common license ({{ic|1=license=('BSD')}}, {{ic|1=license=('MIT')}}, {{ic|1=license=('ZLIB')}} and {{ic|1=license=('Python')}}) but technically each one is a custom license because each one has its own copyright line. Any packages licensed under these four should have its own unique license stored in {{ic|/usr/share/licenses/''pkgname''}}. Some packages may not be covered by a single license. In these cases, multiple entries may be made in the license array, e.g. {{ic|1=license=('GPL' 'custom:name of license')}}. * Additionally, the (L)GPL has many versions and permutations of those versions. For (L)GPL software, the convention is: ** (L)GPL - (L)GPLv2 or any later version ** (L)GPL2 - (L)GPL2 only ** (L)GPL3 - (L)GPL3 or any later version * If after researching the issue no license can be determined, {{ic|PKGBUILD.proto}} suggests using {{ic|unknown}}. However, upstream should be contacted about the conditions under which the software is (and is not) available. {{Tip|Some software authors do not provide separate license file and describe distribution rules in section of common ReadMe.txt. This information can be extracted in separate file during {{Ic|build}} phase with something like this: {{Ic|sed -n '/'''This software'''/,/''' thereof.'''/p' ReadMe.txt > LICENSE}}.}} === groups === The group the package belongs in. For instance, when you install the {{ic|kdebase}} package, it installs all packages that belong in the {{ic|kde}} group. === depends === An array of package names that must be installed before this software can be run. Version restrictions can be specified with comparison operators, e.g. {{ic|1=depends=('foobar>=1.8.0')}}; if multiple restrictions are needed, the dependency can be repeated for each of them [https://mailman.archlinux.org/pipermail/arch-general/2012-July/029022.html], e.g. {{ic|1=depends=('foobar>=1.8.0' 'foobar<2.0.0')}}. You do not need to list packages that your software depends on if other packages your software depends on already have those packages listed in their dependency. For instance, {{ic|gtk2}} depends on {{ic|glib2}} and {{ic|glibc}}. However, {{ic|glibc}} does not need to be listed as a dependency for {{ic|gtk2}} because it is a dependency for {{ic|glib2}}. === optdepends === An array of package names that are not needed for the software to function but provides additional features. A short description of what each package provides should also be noted. An {{ic|optdepends}} may look like this: optdepends=( 'cups: printing support' 'sane: scanners support' 'libgphoto2: digital cameras support' 'alsa-lib: sound support' 'giflib: GIF images support' 'libjpeg: JPEG images support' 'libpng: PNG images support' ) ===makedepends=== An array of package names that must be installed to build the software but unnecessary for using the software after installation. You can specify the minimum version dependency of the packages in the same format as the {{ic|depends}} array. {{Note|Specifying packages that are already in {{ic|depends}} is not necessary.}} {{Warning|The group {{ic|base-devel}} is assumed already installed when building with makepkg . Members of "base-devel" '''should not''' be included in {{ic|makedepends}} arrays.}} === checkdepends === An array of packages this package depends on to run its test suite but are not needed at runtime. Packages in this list follow the same format as depends. These dependencies are only considered when the [[Creating Packages#The check() function|check()]] function is present and is to be run by makepkg. === provides === An array of package names that this package provides the features of (or a virtual package such as {{Ic|cron}} or {{Ic|sh}}). Packages that provide the same things can be installed at the same time unless conflict with each other (see below). If you use this variable, you should add the version ({{ic|pkgver}} and perhaps the {{ic|pkgrel}}) that this package will provide if dependencies may be affected by it. For instance, if you are providing a modified ''qt'' package named ''qt-foobar'' version 3.3.8 which provides ''qt'' then the {{ic|provides}} array should look like {{ic|1=provides=('qt=3.3.8')}}. Putting {{ic|1=provides=('qt')}} will cause to fail those dependencies that require a specific version of ''qt''. Do not add {{ic|pkgname}} to your provides array, this is done automatically. === conflicts === An array of package names that may cause problems with this package if installed. Package with this name and all packages which {{Ic|provides}} virtual packages with this name will be removed. You can also specify the version properties of the conflicting packages in the same format as the {{ic|depends}} array. === replaces === An array of obsolete package names that are replaced by this package, e.g. {{ic|1=replaces=('ethereal')}} for the {{ic|wireshark}} package. After syncing with {{ic|pacman -Sy}}, it will immediately replace an installed package upon encountering another package with the matching {{ic|replaces}} in the repositories. If you are providing an alternate version of an already existing package, use the {{ic|conflicts}} variable which is only evaluated when actually installing the conflicting package. === backup === An array of files that can contain user-made changes and should be preserved during upgrade or removal of a package, primarily intended for configuration files in {{ic|/etc}}. When updating, new version may be saved as {{ic|file.pacnew}} to avoid overwriting a file which already exists and was previously modified by the user. Similarly, when the package is removed, user-modified file will be preserved as {{ic|file.pacsave}} unless the package was removed with {{ic|pacman -Rn}} command. The file paths in this array should be relative paths (e.g. {{ic|etc/pacman.conf}}) not absolute paths (e.g. {{ic|/etc/pacman.conf}}). See also the Arch Wiki on [https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave Pacnew and Pacsave Files]. === options === This array allows you to override some of the default behavior of {{ic|makepkg}}, defined in {{Ic|/etc/makepkg.conf}}. To set an option, include the option name in the array. To reverse the default behavior, place an '''{{ic|!}}''' at the front of the option. The following options may be placed in the array: * '''''strip''''' - Strips symbols from binaries and libraries. If you frequently use a debugger on programs or libraries, it may be helpful to disable this option. * '''''docs''''' - Save {{ic|/doc}} directories. * '''''libtool''''' - Leave ''libtool'' ({{ic|.la}}) files in packages. * '''''staticlibs''''' - Leave static library (.a) files in packages * '''''emptydirs''''' - Leave empty directories in packages. * '''''zipman''''' - Compress ''man'' and ''info'' pages with ''gzip''. * '''''purge''''' - Remove files specified by the {{ic|PURGE_TARGETS}} variable from the package. * '''''upx''''' - Compress binary executable files using UPX. Additional options can be passed to UPX by specifying the {{ic|UPXFLAGS}} variable. * '''''ccache''''' - Allow the use of {{ic|ccache}} during build. More useful in its negative form {{ic|!ccache}} with select packages that have problems building with {{ic|ccache}}. * '''''distcc''''' - Allow the use of {{ic|distcc}} during build. More useful in its negative form {{ic|!distcc}} with select packages that have problems building with {{ic|distcc}}. * '''''buildflags''''' - Allow the use of user-specific {{ic|buildflags}} (CFLAGS, CXXFLAGS, LDFLAGS) during build. More useful in its negative form {{ic|!buildflags}} with select packages that have problems building with custom {{ic|buildflags}}. * '''''makeflags''''' - Allow the use of user-specific {{ic|makeflags}} during build. More useful in its negative form {{ic|!makeflags}} with select packages that have problems building with custom {{ic|makeflags}}. === install === The name of the {{ic|.install}} script to be included in the package. pacman has the ability to store and execute a package-specific script when it installs, removes or upgrades a package. The script contains the following functions which run at different times: * '''''pre_install''''' - The script is run right before files are extracted. One argument is passed: new package version. * '''''post_install''''' - The script is run right after files are extracted. One argument is passed: new package version. * '''''pre_upgrade''''' - The script is run right before files are extracted. Two arguments are passed in the following order: new package version, old package version. * '''''post_upgrade''''' - The script is run right after files are extracted. Two arguments are passed in the following order: new package version, old package version. * '''''pre_remove''''' - The script is run right before files are removed. One argument is passed: old package version. * '''''post_remove''''' - The script is run right after files are removed. One argument is passed: old package version. Each function is run chrooted inside the pacman install directory. See [https://bbs.archlinux.org/viewtopic.php?pid=913891 this thread]. {{Tip|A prototype {{ic|.install}} is provided at {{ic|/usr/share/pacman/proto.install}}.}} === changelog === The name of the package changelog. To view changelogs for installed packages (that have this file): pacman -Qc ''pkgname'' {{Tip|A prototype changelog file is provided at {{ic|/usr/share/pacman/ChangeLog.proto}}.}} === source === An array of files which are needed to build the package. It must contain the location of the software source, which in most cases is a full HTTP or FTP URL. The previously set variables {{ic|pkgname}} and {{ic|pkgver}} can be used effectively here (e.g. {{ic|<nowiki>source=(http://example.com/$pkgname-$pkgver.tar.gz)</nowiki>}}) {{Note|If you need to supply files which are not downloadable on the fly, e.g. self-made patches, you simply put those into the same directory where your {{ic|PKGBUILD}} file is in and add the filename to this array. Any paths you add here are resolved relative to the directory where the {{ic|PKGBUILD}} lies. Before the actual build process is started, all of the files referenced in this array will be downloaded or checked for existence, and {{ic|makepkg}} will not proceed if any are missing.}} {{Tip|You can specify a different name for the downloaded file - if the downloaded file has a different name for some reason like the URL had a GET parameter - using the following syntax: {{Ic|''filename''::''fileuri''}}, for example {{Ic|$pkgname-$pkgver.zip::<nowiki>http://199.91.152.193/7pd0l2tpkidg/jg2e1cynwii/Warez_collection_16.4.exe</nowiki>}}}} === noextract === An array of files listed under the {{ic|source}} array which should not be extracted from their archive format by {{ic|makepkg}}. This most commonly applies to archives which cannot be handled by {{ic|/usr/bin/bsdtar}} because {{ic|libarchive}} processes all files as streams rather than random access as {{ic|unzip}} does. In these situations, the alternative unarchiving tool (e.g., {{ic|unzip}}, {{ic|p7zip}}, etc.) should be added in the {{ic|makedepends}} array and the first line of the [[Creating Packages#The prepare() function|prepare()]] function should extract the source archive manually; for example: unzip [source].zip Note that while the {{ic|source}} array accepts URLs, {{ic|noextract}} is '''just''' the file name portion. So, for example, you would do something like this (simplified from [https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/grub grub2's PKGBUILD]): source=(<nowiki>"http://ftp.archlinux.org/other/grub2/grub2_extras_lua_r20.tar.xz"</nowiki>) noextract=("grub2_extras_lua_r20.tar.xz") To extract ''nothing'', you can do something fancy like this (taken from [https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/firefox-i18n#n123 firefox-i18n]): noextract=(${source[@]%%::*}) {{Note|More conservative Bash substitution would include quotes, or possibly even a loop that calls {{ic|basename}}. If you have read this far, you should get the idea.}} === md5sums === An array of MD5 checksums of the files listed in the {{ic|source}} array. Once all files in the {{ic|source}} array are available, an MD5 hash of each file will be automatically generated and compared with the values of this array in the same order they appear in the {{ic|source}} array. While the order of the source files itself does not matter, it is important that it matches the order of this array since {{ic|makepkg}} cannot guess which checksum belongs to what source file. You can generate this array quickly and easily using the commands {{ic|updpkgsums}} or {{ic|makepkg -g}} in the directory that contains the {{ic|PKGBUILD}} file. {{Note|The MD5 algorithm is known to have weaknesses, you should consider using a stronger alternative.}} === sha1sums === An array of SHA-1 160-bit checksums. This is an alternative to {{ic|md5sums}} described above, but it is also known to have weaknesses, so you should consider using a stronger alternative. To enable use and generation of these checksums, be sure to set up the {{ic|INTEGRITY_CHECK}} option in {{ic|/etc/makepkg.conf}}. See {{ic|man makepkg.conf}}. === sha256sums, sha384sums, sha512sums === An array of SHA-2 checksums with digest sizes 256, 384 and 512 bits respectively. These are alternatives to {{ic|md5sums}} described above and are generally believed to be stronger. To enable use and generation of these checksums, be sure to set up the {{ic|INTEGRITY_CHECK}} option in {{ic|/etc/makepkg.conf}}. See {{ic|man makepkg.conf}}. == See also == *[https://www.archlinux.org/pacman/PKGBUILD.5.html PKGBUILD(5) Manual Page] *[http://ix.io/66p Example PKGBUILD file] *[http://ix.io/66o Example .install file] [[Category:Contents Page{{#translation:}}]]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
OK