APKBUILD examples:Special Subpackages Doc: Difference between revisions

From Alpine Linux
m (Fixed dead link. NOTE: New link does NOT go directly to the relevant part of the APKBUILD. Someone else please fix it.)
(use cat template)
 
Line 1: Line 1:
Sometimes there is a large amount of documentation files in the source available. If you want to ship these files in a -doc packages the snippet below can help you. Packaging only a license file and be done as described [[Creating_an_Alpine_package#license|here]].
Sometimes there is a large amount of documentation files in the source available. If you want to ship these files in a -doc packages the snippet below can help you. Packaging only a license file and be done as described [[Creating_an_Alpine_package#license|here]].


<pre>
{{cat|php81/APKBUILD|<nowiki>...
doc() {
doc() {
# Man pages
# Man pages
Line 17: Line 17:
done
done
}
}
</pre>
...</nowiki>}}


Source: [https://git.alpinelinux.org/aports/plain/community/php81/APKBUILD PHP APKBUILD]
Source: [https://git.alpinelinux.org/aports/plain/community/php81/APKBUILD PHP APKBUILD]


[[Category:Development]]
[[Category:Development]]

Latest revision as of 22:29, 16 September 2023

Sometimes there is a large amount of documentation files in the source available. If you want to ship these files in a -doc packages the snippet below can help you. Packaging only a license file and be done as described here.

Contents of php81/APKBUILD

... doc() { # Man pages mkdir -p "$subpkgdir"/usr/share/man || return 1 mv "$pkgdir"/usr/share/man/man* "$subpkgdir"/usr/share/man/ \ || return 1 # Doc files _docs="CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS \ README.EXTENSIONS README.EXT_SKEL README.MAILINGLIST_RULES \ TODO-PHP5 UPGRADING UPGRADING.INTERNALS" for _doc in $_docs; do install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1 done } ...

Source: PHP APKBUILD