Package guidelines 📦

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I want to suggest including all or some of these in the package guidelines <https://wiki.archlinux.org/index.php/Arch_package_guidelines>, or the appropriate documentation:


*New items:*

- Write your PKGBUILD in a way that will work by itself as long as possible, for example by automatically generating the list of archives instead of hard coding them.

- As far as practicable don't work around bugs on the package, but fix them as upstream as possible.

- In package() "mv" locally built files, and "cp" or "install" the rest.

- In pkgdesc don't describe what the package is, but rather what it does. Using a natural wording that any person will understand. For example don't say "GTK UVC video viewer", but "Captures image from a webcam".

- If the license is a Creative Commons one, write it like "CCPL:by-sa".


*Modifications:*

- Start new variables and functions names with a capital letter, to avoid clashes with those in makepkg itself.

- In pkgver(), any printf() line shall finish with the new line char (\n).


*Useful functions:*

In package(), you can set permissions recursively with:
find "${pkgdir}" -type d -exec chmod u=rwx,g=rx,o=rx {} \;
find "${pkgdir}" -type f -exec chmod u=rw,g=r,o=r {} \;
chmod +x "${pkgdir}/usr/bin/${Name}"

In pkgver(), you can get the version from a web-site with something like this:
curl --silent "${url}" | grep "${string}" | cut --delimiter='"' --fields=1


(Reply to this email including me on the recipients list, or I won't receive it)

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux