Difference between revisions of "Manjaro Packaging Standards"

m
added languages and translate tags
imported>Philm
(Created page with "'''The submitted PKGBUILDs must not build applications already in any of the official binary repositories under any circumstances. Exception to this strict rule may only be pa...")
 
m (added languages and translate tags)
Line 1: Line 1:
<languages/>
__TOC__
<translate>
'''The submitted PKGBUILDs must not build applications already in any of the official binary repositories under any circumstances. Exception to this strict rule may only be packages having extra features enabled and/or patches in comparison to the official ones. In such an occasion, the pkgname array should be different.'''
'''The submitted PKGBUILDs must not build applications already in any of the official binary repositories under any circumstances. Exception to this strict rule may only be packages having extra features enabled and/or patches in comparison to the official ones. In such an occasion, the pkgname array should be different.'''


Line 5: Line 8:
to Manjaro Linux. You should also see the [https://archlinux.org/pacman/PKGBUILD.5.html PKGBUILD] and
to Manjaro Linux. You should also see the [https://archlinux.org/pacman/PKGBUILD.5.html PKGBUILD] and
[https://archlinux.org/pacman/makepkg.8.html makepkg] manpages.
[https://archlinux.org/pacman/makepkg.8.html makepkg] manpages.
 
</translate>
<translate>
==PKGBUILD prototype==
==PKGBUILD prototype==
{{bc|1=
{{bc|1=
Line 46: Line 50:


Other prototypes are found in {{ic|/usr/share/pacman}} from the pacman and abs packages.
Other prototypes are found in {{ic|/usr/share/pacman}} from the pacman and abs packages.
 
</translate>
<translate>
==Package etiquette==
==Package etiquette==


Line 106: Line 111:
</ul>
</ul>


==Package naming==
</translate>
<translate>
==Package naming==
==Package naming==
* Package names should consist of '''alphanumeric characters only'''; all letters should be '''lowercase'''.
* Package names should consist of '''alphanumeric characters only'''; all letters should be '''lowercase'''.
Line 112: Line 118:
* Package versions '''should be the same as the version released by the author'''. Versions can include letters if need be (eg, nmap's version is 2.54BETA32). '''Version tags may not include hyphens!''' Letters, numbers, and periods only.
* Package versions '''should be the same as the version released by the author'''. Versions can include letters if need be (eg, nmap's version is 2.54BETA32). '''Version tags may not include hyphens!''' Letters, numbers, and periods only.
* Package releases are '''specific to Arch Linux packages'''. These allow users to differentiate between newer and older package builds. When a new package version is first released, the '''release count starts at 1'''. Then as fixes and optimizations are made, the package will be '''re-released''' to the Arch Linux public and the '''release number will increment'''. When a new version comes out, the release count resets to 1. Package release tags follow the '''same naming restrictions as version tags'''.
* Package releases are '''specific to Arch Linux packages'''. These allow users to differentiate between newer and older package builds. When a new package version is first released, the '''release count starts at 1'''. Then as fixes and optimizations are made, the package will be '''re-released''' to the Arch Linux public and the '''release number will increment'''. When a new version comes out, the release count resets to 1. Package release tags follow the '''same naming restrictions as version tags'''.
 
</translate>
<translate>
==Directories==
==Directories==
* '''Configuration files''' should be placed in the {{ic|/etc}} directory. If there is more than one configuration file, it is customary to '''use a subdirectory''' in order to keep the {{ic|/etc}} area as clean as possible. Use {{ic|/etc/{pkgname}/}}  where {{ic|<nowiki>{pkgname}</nowiki>}} is the name of the package (or a suitable alternative, eg, apache uses {{ic|/etc/httpd/}}).
* '''Configuration files''' should be placed in the {{ic|/etc}} directory. If there is more than one configuration file, it is customary to '''use a subdirectory''' in order to keep the {{ic|/etc}} area as clean as possible. Use {{ic|/etc/{pkgname}/}}  where {{ic|<nowiki>{pkgname}</nowiki>}} is the name of the package (or a suitable alternative, eg, apache uses {{ic|/etc/httpd/}}).
Line 170: Line 177:
** {{ic|/var/tmp}}
** {{ic|/var/tmp}}
** {{ic|/run}}
** {{ic|/run}}
 
</translate>
<translate>
==Makepkg duties==
==Makepkg duties==


Line 220: Line 228:


</ol>
</ol>
 
</translate>
<translate>
==Architectures==
==Architectures==
The {{Ic|arch}} array should contain {{Ic|'i686'}} and/or {{Ic|'x86_64'}} depending on which architectures it can be built on. You can also use {{Ic|'any'}} for architecture independent packages.
The {{Ic|arch}} array should contain {{Ic|'i686'}} and/or {{Ic|'x86_64'}} depending on which architectures it can be built on. You can also use {{Ic|'any'}} for architecture independent packages.
 
</translate>
<translate>
==Licenses==
==Licenses==
The [[Licenses|license]] array is being implemented in the official repos, and it <b>should</b> be used in your packages as well. Use it as follows:
The [[Licenses|license]] array is being implemented in the official repos, and it <b>should</b> be used in your packages as well. Use it as follows:
Line 239: Line 249:
<li>The MIT, BSD, zlib/libpng and Python licenses are special cases and cannot be included in the 'common' licenses pkg.  For the sake of the license variable, it is treated like a common license (license=('BSD'), license=('MIT'), license=('ZLIB') or license=('Python')) but for the sake of the filesystem, it is a custom license, because each one has its own copyright line.  Each MIT, BSD, zlib/libpng or Python licensed package should have its unique license stored in /usr/share/licenses/$pkgname/.</li>
<li>The MIT, BSD, zlib/libpng and Python licenses are special cases and cannot be included in the 'common' licenses pkg.  For the sake of the license variable, it is treated like a common license (license=('BSD'), license=('MIT'), license=('ZLIB') or license=('Python')) but for the sake of the filesystem, it is a custom license, because each one has its own copyright line.  Each MIT, BSD, zlib/libpng or Python licensed package should have its unique license stored in /usr/share/licenses/$pkgname/.</li>
<li>Some packages may not be covered by a single license.  In these cases multiple entries may be made in the license array e.g. license=("GPL" "custom:some commercial license").  For the majority of packages these licenses apply in different cases, as opposed to applying at the same time.  When pacman gets the ability to filter on licenses (so you can say, "I only want GPL and BSD licensed software") dual (or more) licenses will be treated by pacman using OR, rather than AND logic, thus pacman will consider the above example as GPL licensed software, regardless of the other licenses listed.</li>
<li>Some packages may not be covered by a single license.  In these cases multiple entries may be made in the license array e.g. license=("GPL" "custom:some commercial license").  For the majority of packages these licenses apply in different cases, as opposed to applying at the same time.  When pacman gets the ability to filter on licenses (so you can say, "I only want GPL and BSD licensed software") dual (or more) licenses will be treated by pacman using OR, rather than AND logic, thus pacman will consider the above example as GPL licensed software, regardless of the other licenses listed.</li>
<li>The (L)GPL has many versions and permutations of those versions. For (L)GPL software, the convention is:
<li>The (L)GPL has many versions and permutations of those versions. For (L)GPL software, the convention is:</li>
<ul>
<ul>
<li>(L)GPL - (L)GPLv2 or any later version</li>
<li>(L)GPL - (L)GPLv2 or any later version</li>
Line 247: Line 257:
</li>
</li>
</ul>
</ul>
 
</translate>
<translate>
==Submitting packages to the AUR==
==Submitting packages to the AUR==
<p>Note the following before submitting any packages to the AUR:</p>
<p>Note the following before submitting any packages to the AUR:</p>
Line 308: Line 319:


</ol>
</ol>
</translate>
[[Category:Contents Page{{#translation:}}]]