123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517 |
- # Maintainer: David P. <megver83@parabola.nu>
- # Based on linux-rt-lts package
- _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix
- _replacesoldkernels=() # '%' gets replaced with kernel suffix
- _replacesoldmodules=() # '%' gets replaced with kernel suffix
- pkgbase=linux-libre-rt-lts
- _kver=6.1.69
- _rtver=21
- pkgver=$_kver.$_rtver.realtime1
- pkgrel=2
- pkgdesc='Linux-libre RT LTS'
- url='https://linux-libre.fsfla.org/'
- arch=(i686 x86_64 armv7h)
- makedepends=(
- bc
- cpio
- gettext
- libelf
- pahole
- perl
- python
- tar
- xz
- # htmldocs
- graphviz
- imagemagick
- python-sphinx
- texlive-latexextra
- )
- options=('!strip')
- _srcname=linux-6.1
- source=(
- "https://cdn.kernel.org/pub/linux/kernel/projects/rt/${_srcname##*-}/older/patch-$_kver-rt$_rtver.patch"{.xz,.sign}
- "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign}
- "https://linux-libre.fsfla.org/pub/linux-libre/releases/$_kver-gnu/patch-${_srcname##*-}-gnu-$_kver-gnu.xz"{,.sign}
- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig}
- config.i686 config.x86_64 config.armv7h # the main kernel config files
- linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk
- # maintain the TTY over USB disconnects
- # http://www.coreboot.org/EHCI_Gadget_Debug
- 0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
- # fix Atmel maXTouch touchscreen support
- # https://labs.parabola.nu/issues/877
- # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html
- 0002-fix-Atmel-maXTouch-touchscreen-support.patch
- # Arch Linux patches
- # https://gitlab.archlinux.org/archlinux/packaging/upstream/linux-rt-lts
- 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
- 0002-Set-distribution-specific-version.patch
- )
- source_i686=(
- # avoid using zstd compression in ultra mode (exhausts virtual memory)
- no-ultra-zstd.patch
- )
- validpgpkeys=(
- 474402C8C582DAFBE389C427BCB7CF877E7D47A7 # Alexandre Oliva
- 6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78 # David P.
- 64254695FFF0AA4466CC19E67B96E8162A8CF5D1 # Sebastian Andrzej Siewior
- D5653EA39C8675DA4BD5971C13B55DD07C53B851 # Clark Williams
- )
- sha256sums=('8c027c3a0f67e262d2713fef0852a5d6eed45c3da817feee2a4cce86f226cc11'
- 'SKIP'
- 'b3fb50b6eae92e5f399d3dd9d723f473d9fb467ada2cb518f15c2341d678ba37'
- 'SKIP'
- 'a0c41c53fc6b5fdd1ce19c56f03c5da4807b9b08fa1b145ef2466e6d21bee0e4'
- 'SKIP'
- 'bfd4a7f61febe63c880534dcb7c31c5b932dde6acf991810b41a939a93535494'
- 'SKIP'
- '6de8a8319271809ffdb072b68d53d155eef12438e6d04ff06a5a4db82c34fa8a'
- 'SKIP'
- '13bd7a8d9ed6b6bc971e4cd162262c5a20448a83796af39ce394d827b0e5de74'
- 'SKIP'
- '20dbe3daec3b9d4b7514a56337a1f4b46d48310a0f80b1843ddf9293b365e711'
- '532a71b772eab5eff67ca6a3a087ac3e33682896776ce84e79abcaf83e5fbb45'
- 'f0070e55f002dddd8fb8f983c450399a224b568587126943a1d7cde2ff428a50'
- 'ca1708abbd2f8960c278722dc81a7c635973d92872386ad9e2fff10b86836e98'
- '0376bd5efa31d4e2a9d52558777cebd9f0941df8e1adab916c868bf0c05f2fc3'
- '351fd96be8cd5ebd0435c0a8a978673fc023e3b1026085e67f86d815b2285e25'
- '5be77a4886cab9ab3f650ff032b39b0a5cc5029c16b49fb5d6f4469a4994e9b6'
- 'f61249fe6f286037fd8be8217427df6bf4def5745e29d2d2d9fc186b72c39b91')
- sha256sums_i686=('d32270be5fd9c3e3ba50f3aef33f6cfcb85be0c8216f03b777287cc621fdff28')
- b2sums=('a43ef1c448a28131e92d6fc03021542cdb858c9ad3dd3529993cdce0f81896eb6b3add11d1462791ad1f171f924a4d2feb720594b3807fd5a64ea3f77dbc4392'
- 'SKIP'
- '1834a1cd5094caa933f23be04b610f028ae34bdc104dbea225df707e73ce4afc34272bd429d125cc3bf5b817360e403c99e4405b0f7a9790a13e0c87e4e6fbab'
- 'SKIP'
- 'fdb0ba0ed28b744c94472e584d1dd169d583689dd036ead5965d8550780581c725a23cea7b2b3fe8f3d6ad5a44807699eede7db2330a7a469324213598866209'
- 'SKIP'
- '73fee2ae5cb1ffd3e6584e56da86a8b1ff6c713aae54d77c0dab113890fc673dc5f300eb9ed93fb367b045ece8fa80304ff277fe61665eccf7b7ce24f0c045eb'
- 'SKIP'
- 'd02a1153a4285b32c774dca4560fe37907ccf30b8e487a681b717ed95ae9bed5988875c0a118938e5885ae9d2857e53a6f216b732b6fa3368e3c5fe08c86382c'
- 'SKIP'
- '580911af9431c066bbc072fd22d5e2ef65f12d8358cec5ff5a4f1b7deebb86cef6b5c1ad631f42350af72c51d44d2093c71f761234fb224a8b9dbb3b64b8201d'
- 'SKIP'
- '168ecd73b12ea6bb505fae968e863328efe72522d5d33b27743e083a293c047e8c98dae55b85ebb7e936d9907e8b316f41d294d0660659df30b81bba30bd144e'
- '241a95f8266b10118ecb3a5b7d2e6b10d6c622bf022160bd79d08d17e8aaeedc9337eaeb56246788648fe0504a2c82c16ae1579062b927481d0e4677d0f47e10'
- '57e9597cd8b0568d49070abf127868e02f250b02c6597fa4402858b068d9455f2b1a4c5606970a34f4a3c7ec49b5ff49410997af3462a8d8e1d62541f427fcc7'
- 'af69176b1117b94e56b043e97b0bd5873a2974a6a2fd52b102d0ffdca440ff68cfb241d6c4d4ef453cc8c220c236b739bad232e53fd500ce7672fa6e5ba87383'
- 'c2214154c36900e311531bfe68184f31639f5c50fed23bc3803a7f18439b7ff258552a39f02fed0ea92f10744e17a6c55cef0ef1a98187f978fe480fb3dddc14'
- '0c7ceba7cd90087db3296610a07886f337910bad265a32c052d3a703e6eb8e53f355ab9948d72d366408d968d8ee7435084dd89bef5ed0b69355fd884c2cd468'
- '7441d065d411f7c8449f7d809e6e5666d97de61ce7ced2ea54aa2a7cf98411eebafb0c724de27a93e43c9841dea871957a5977b959f4f88e0159fcaa9c1a88f9'
- 'ce25c92dc7ed569ac5cb99de6391bd980cbbd807ac2328e50a38bc7234ae104136418c6bf870deef5a38fff29ea4608311fbc7a488f68aa8cd34b939c347473b')
- b2sums_i686=('165ab9dd8cedeaae5327accc1581c19cf0be55f923b03feb889cad3351b74c7c4cd3d3c206938e5152bfe1d947513dea8f630f8f5544099ec13d16d254725c40')
- _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}")
- _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}")
- _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}")
- case "$CARCH" in
- i686|x86_64) KARCH=x86;;
- armv7h) KARCH=arm;;
- esac
- export KBUILD_BUILD_HOST=parabola
- export KBUILD_BUILD_USER=$pkgbase
- export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
- prepare() {
- cd $_srcname
- if [ "${_srcname##*-}" != "$_kver" ]; then
- echo "Applying upstream patch..."
- patch -Np1 < "../patch-${_srcname##*-}-gnu-$_kver-gnu"
- fi
- echo "Adding freedo as boot logo..."
- install -m644 -t drivers/video/logo \
- ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm}
- echo "Setting version..."
- echo "-$pkgrel" > localversion.10-pkgrel
- echo "${pkgbase#linux-libre}" > localversion.20-pkgname
- sed '/^EXTRAVERSION =/s/= .*/=/' -i Makefile
- local source=("${source[@]}")
- case "$CARCH" in
- "armv7h")
- source+=("${source_armv7h[@]}") ;;
- "i686")
- source+=("${source_i686[@]}") ;;
- esac
- local src
- for src in "${source[@]}"; do
- src="${src%%::*}"
- src="${src##*/}"
- # picking up the RT patch
- src="${src//patch.xz/patch}"
- [[ $src = *.patch ]] || continue
- echo "Applying patch $src..."
- patch -Np1 < "../$src"
- done
- echo "Setting config..."
- cp ../config.$CARCH .config
- make olddefconfig
- diff -u ../config.$CARCH .config || :
- make -s kernelrelease > version
- echo "Prepared $pkgbase version $(<version)"
- }
- build() {
- cd $_srcname
- make all
- # temporarily disabled documentation due to sphinx_rtd_theme (FS32#163)
- if [ "$CARCH" != "i686" ]; then
- make htmldocs
- fi
- }
- _package() {
- pkgdesc="The $pkgdesc kernel and modules"
- license=(
- 'Apache-2.0 OR MIT'
- 'BSD-2-Clause OR GPL-2.0-or-later'
- BSD-3-Clause
- 'BSD-3-Clause OR GPL-2.0-only'
- 'BSD-3-Clause OR GPL-2.0-or-later'
- BSD-3-Clause-Clear
- GPL-1.0-or-later
- 'GPL-1.0-or-later OR BSD-3-Clause'
- GPL-2.0-only
- 'GPL-2.0-only OR Apache-2.0'
- 'GPL-2.0-only OR BSD-2-Clause'
- 'GPL-2.0-only OR BSD-3-Clause'
- 'GPL-2.0-only OR CDDL-1.0'
- 'GPL-2.0-only OR Linux-OpenIB'
- 'GPL-2.0-only OR MIT'
- 'GPL-2.0-only OR MPL-1.1'
- 'GPL-2.0-only OR X11'
- 'GPL-2.0-only WITH Linux-syscall-note'
- GPL-2.0-or-later
- 'GPL-2.0-or-later OR BSD-2-Clause'
- 'GPL-2.0-or-later OR BSD-3-Clause'
- 'GPL-2.0-or-later OR MIT'
- 'GPL-2.0-or-later OR X11'
- 'GPL-2.0-or-later WITH GCC-exception-2.0'
- ISC
- LGPL-2.0-or-later
- 'LGPL-2.1-only'
- 'LGPL-2.1-only OR BSD-2-Clause'
- LGPL-2.1-or-later
- MIT
- MPL-1.1
- X11
- Zlib
- )
- depends=(
- coreutils
- initramfs
- kmod
- )
- optdepends=(
- 'wireless-regdb: to set the correct wireless channels of your country'
- 'linux-libre-firmware: firmware images needed for some devices'
- )
- provides=(
- KSMBD-MODULE
- VIRTUALBOX-GUEST-MODULES
- WIREGUARD-MODULE
- )
- provides+=("${_replacesarchkernel[@]/%/=$pkgver}" "LINUX-ABI_VERSION=$pkgver")
- conflicts+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- replaces+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- cd $_srcname
- local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
- echo "Installing boot image..."
- # systemd expects to find the kernel here to allow hibernation
- # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
- install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
- # On armv7h, the uboot4extlinux-* packages provide and use a extlinux.conf
- # file in /boot/extlinux/. This file is needed for the bootloader to find the
- # kernel, initramfs and devicetree. Because of that we need the kernel image
- # to also be installed in /boot for several reasons:
- #
- # - First the $modulesdir name contains the kernel version, and extlinux.conf
- # is supposed to be edited by hand by users. Users can't be expected to do
- # that at each kernel updates beause at some point they will forget and get
- # a mismatch between the kernel image and modules which often breaks boot.
- # In addition people know that the kernel image is in /boot. Having it in
- # $moduledir instead is not documented anywhere. And we don't have code that
- # can automatically generate an extlinux.conf.
- #
- # - Then we also need the kernel image in /boot to be able to use LVM rootfs
- # as this requires a separate /boot partition and u-boot can't read LVM.
- #
- # - Finally, doing the copy manually might be straigtforward in some cases,
- # as computers like the Lime 2 A20 are well supported, boot on a microSD or
- # other removable storage that can be read by a laptop/desktop computer and
- # even has a display that works at boot. But some of the supported ARM
- # computers have an internal eMMC and no display that works at boot (like
- # the TBS2910 or beaglebone black) and no way to export the internal storage
- # as an usb mass storage (because the ums command is not compiled in u-boot)
- # and sometimes even no way to connect a display at all (like the BegaleBone
- # green). So that makes the simple way of copying a file way more complex.
- # So it is a good idea not to break the boot if possible.
- if [ "$CARCH" = "armv7h" ]; then
- install -Dm644 "$(make -s image_name)" "$pkgdir/boot/vmlinuz-${pkgbase}"
- fi
- # Used by mkinitcpio to name the kernel
- echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
- echo "Installing modules..."
- ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
- DEPMOD=/doesnt/exist modules_install # Suppress depmod
- # remove build and source links
- rm "$modulesdir"/{source,build}
- # licenses
- install -vDm 644 LICENSES/deprecated/{GPL-1.0,ISC,Linux-OpenIB,X11,Zlib} -t "$pkgdir/usr/share/licenses/$pkgname/"
- install -vDm 644 LICENSES/preferred/{BSD,MIT}* -t "$pkgdir/usr/share/licenses/$pkgname/"
- install -vDm 644 LICENSES/exceptions/* -t "$pkgdir/usr/share/licenses/$pkgname/"
- if [ "$CARCH" = "armv7h" ]; then
- echo "Installing device tree binaries..."
- make INSTALL_DTBS_PATH="$pkgdir/boot/dtbs/$pkgbase" dtbs_install
- # armv7h presets only work with ALL_kver=$(<version)
- backup+=("etc/mkinitcpio.d/$pkgbase.preset")
- echo "Installing mkinitcpio preset..."
- sed "s|%PKGBASE%|$pkgbase|g;s|%KERNVER%|$(<version)|g" ../linux-armv7h.preset \
- | install -Dm644 /dev/stdin "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
- fi
- }
- _package-headers() {
- license=(
- BSD-3-Clause
- 'BSD-3-Clause OR GPL-2.0-only'
- GPL-1.0-or-later
- 'GPL-1.0-or-later WITH Linux-syscall-note'
- GPL-2.0-only
- 'GPL-2.0-only OR Apache-2.0'
- 'GPL-2.0-only OR BSD-2-Clause'
- 'GPL-2.0-only OR BSD-3-Clause'
- 'GPL-2.0-only OR CDDL-1.0'
- 'GPL-2.0-only OR Linux-OpenIB'
- 'GPL-2.0-only OR Linux-OpenIB OR BSD-2-Clause'
- 'GPL-2.0-only OR MIT'
- 'GPL-2.0-only OR MPL-1.1'
- 'GPL-2.0-only OR X11'
- 'GPL-2.0-only WITH Linux-syscall-note'
- '(GPL-2.0-only WITH Linux-syscall-note) AND MIT'
- '(GPL-2.0-only WITH Linux-syscall-note) OR BSD-2-Clause'
- '(GPL-2.0-only WITH Linux-syscall-note) OR BSD-3-Clause'
- '(GPL-2.0-only WITH Linux-syscall-note) OR CDDL-1.0'
- '(GPL-2.0-only WITH Linux-syscall-note) OR Linux-OpenIB'
- '(GPL-2.0-only WITH Linux-syscall-note) OR MIT'
- GPL-2.0-or-later
- 'GPL-2.0-or-later OR BSD-2-Clause'
- 'GPL-2.0-or-later OR BSD-3-Clause'
- 'GPL-2.0-or-later OR MIT'
- 'GPL-2.0-or-later WITH Linux-syscall-note'
- '(GPL-2.0-or-later WITH Linux-syscall-note) OR BSD-3-Clause'
- '(GPL-2.0-or-later WITH Linux-syscall-note) OR MIT'
- 'LGPL-2.0-or-later OR BSD-2-Clause'
- 'LGPL-2.0-or-later WITH Linux-syscall-note'
- ISC
- 'LGPL-2.0-or-later WITH Linux-syscall-note'
- 'LGPL-2.0-or-later OR BSD-2-Clause'
- LGPL-2.1-only
- 'LGPL-2.1-only OR BSD-2-Clause'
- 'LGPL-2.1-only OR MIT'
- 'LGPL-2.1-only WITH Linux-syscall-note'
- LGPL-2.1-or-later
- 'LGPL-2.1-or-later OR BSD-2-Clause'
- 'LGPL-2.1-or-later WITH Linux-syscall-note'
- MIT
- Zlib
- )
- pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
- depends=(pahole)
- provides=("${_replacesarchkernel[@]/%/-headers=$pkgver}")
- conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
- replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
- cd $_srcname
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
- echo "Installing build files..."
- install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
- localversion.* version vmlinux
- install -Dt "$builddir/kernel" -m644 kernel/Makefile
- install -Dt "$builddir/arch/$KARCH" -m644 arch/$KARCH/Makefile
- if [[ $CARCH = i686 ]]; then
- install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile_32.cpu
- fi
- cp -t "$builddir" -a scripts
- # required when STACK_VALIDATION is enabled
- if [[ -e tools/objtool/objtool ]]; then
- install -Dt "$builddir/tools/objtool" tools/objtool/objtool
- fi
- # required when DEBUG_INFO_BTF_MODULES is enabled
- if [[ -e tools/bpf/resolve_btfids/resolve_btfids ]]; then
- install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
- fi
- echo "Installing headers..."
- cp -t "$builddir" -a include
- cp -t "$builddir/arch/$KARCH" -a arch/$KARCH/include
- install -Dt "$builddir/arch/$KARCH/kernel" -m644 arch/$KARCH/kernel/asm-offsets.s
- install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
- install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
- # https://bugs.archlinux.org/task/13146
- install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
- # https://bugs.archlinux.org/task/20402
- install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
- install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
- install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
- # https://bugs.archlinux.org/task/71392
- install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
- echo "Installing KConfig files..."
- find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
- echo "Removing unneeded architectures..."
- local arch
- for arch in "$builddir"/arch/*/; do
- [[ $arch = */$KARCH/ ]] && continue
- echo "Removing $(basename "$arch")"
- rm -r "$arch"
- done
- echo "Removing documentation..."
- rm -r "$builddir/Documentation"
- echo "Removing broken symlinks..."
- find -L "$builddir" -type l -printf 'Removing %P\n' -delete
- echo "Removing loose objects..."
- find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
- echo "Stripping build tools..."
- local file
- while read -rd '' file; do
- case "$(file -Sib "$file")" in
- application/x-sharedlib\;*) # Libraries (.so)
- strip -v $STRIP_SHARED "$file" ;;
- application/x-archive\;*) # Libraries (.a)
- strip -v $STRIP_STATIC "$file" ;;
- application/x-executable\;*) # Binaries
- strip -v $STRIP_BINARIES "$file" ;;
- application/x-pie-executable\;*) # Relocatable binaries
- strip -v $STRIP_SHARED "$file" ;;
- esac
- done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
- echo "Stripping vmlinux..."
- strip -v $STRIP_STATIC "$builddir/vmlinux"
- echo "Adding symlink..."
- mkdir -p "$pkgdir/usr/src"
- ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
- # licenses
- install -vDm 644 LICENSES/deprecated/{ISC,Linux-OpenIB,X11,Zlib} -t "$pkgdir/usr/share/licenses/$pkgname/"
- install -vDm 644 LICENSES/preferred/{BSD*,MIT} -t "$pkgdir/usr/share/licenses/$pkgname/"
- install -vDm 644 LICENSES/exceptions/* -t "$pkgdir/usr/share/licenses/$pkgname/"
- }
- _package-docs() {
- license=(
- BSD-3-Clause
- GFDL-1.1-no-invariants-or-later
- GPL-2.0-only
- 'GPL-2.0-only OR BSD-2-Clause'
- 'GPL-2.0-only OR BSD-3-Clause'
- 'GPL-2.0-only OR GFDL-1.1-no-invariants-or-later'
- 'GPL-2.0-only OR GFDL-1.2-no-invariants-only'
- 'GPL-2.0-only OR MIT'
- GPL-2.0-or-later
- 'GPL-2.0-or-later OR BSD-2-Clause'
- 'GPL-2.0-or-later OR CC-BY-4.0'
- 'GPL-2.0-or-later OR MIT'
- 'GPL-2.0-or-later OR X11'
- 'LGPL-2.1-only OR BSD-2-Clause'
- MIT
- )
- pkgdesc="Documentation for the $pkgdesc kernel"
- provides=("${_replacesarchkernel[@]/%/-docs=$pkgver}")
- conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
- replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
- cd $_srcname
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
- echo "Installing documentation..."
- local src dst
- while read -rd '' src; do
- dst="${src#Documentation/}"
- dst="$builddir/Documentation/${dst#output/}"
- install -Dm644 "$src" "$dst"
- done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
- echo "Adding symlink..."
- mkdir -p "$pkgdir/usr/share/doc"
- ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
- # licenses
- install -vDm 644 LICENSES/deprecated/X11 -t "$pkgdir/usr/share/licenses/$pkgname/"
- install -vDm 644 LICENSES/preferred/{BSD*,MIT} -t "$pkgdir/usr/share/licenses/$pkgname/"
- }
- pkgname=(
- "$pkgbase"
- "$pkgbase-headers"
- "$pkgbase-docs"
- )
- for _p in "${pkgname[@]}"; do
- eval "package_$_p() {
- $(declare -f "_package${_p#$pkgbase}")
- _package${_p#$pkgbase}
- }"
- done
- # vim:set ts=8 sts=2 sw=2 et:
|