summaryrefslogtreecommitdiff
path: root/libre/linux-libre/PKGBUILD
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2019-11-03 15:56:49 -0300
committerDavid P <megver83@parabola.nu>2019-11-03 15:56:49 -0300
commitb6f181e99f4b88fc54de24532601804b9c7f073e (patch)
treec34d582cf10c38f4a7cb93be3f404588dc38a94f /libre/linux-libre/PKGBUILD
parent992806096cd7b6a75d025e5525d7832237025334 (diff)
downloadabslibre-b6f181e99f4b88fc54de24532601804b9c7f073e.tar.gz
abslibre-b6f181e99f4b88fc54de24532601804b9c7f073e.tar.bz2
abslibre-b6f181e99f4b88fc54de24532601804b9c7f073e.zip
updpkg: libre/linux-libre 5.3.8_gnu-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre/PKGBUILD')
-rw-r--r--libre/linux-libre/PKGBUILD99
1 files changed, 37 insertions, 62 deletions
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index ee6461ead..25e1012eb 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -9,27 +9,24 @@
# Based on linux package
-pkgbase=linux-libre # Build stock kernel
-#pkgbase=linux-libre-custom # Build kernel with a different name
-_srcbasever=5.3-gnu
-_srcver=5.3.7-gnu
-
-_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
-_replacesoldkernels=() # '%' gets replaced with _kernelname
-_replacesoldmodules=() # '%' gets replaced with _kernelname
+_replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix
+_replacesoldkernels=() # '%' gets replaced with kernel suffix
+_replacesoldmodules=() # '%' gets replaced with kernel suffix
+pkgbase=linux-libre
+_srcbasever=5.3-gnu
+_srcver=5.3.8-gnu
_srcname=linux-${_srcbasever%-*}
-_archpkgver=${_srcver%-*}
pkgver=${_srcver//-/_}
pkgrel=1
-rcnver=5.3.6
-rcnrel=armv7-x12
-arch=(i686 x86_64 armv7h)
+rcnver=5.3.7
+rcnrel=armv7-x13
url='https://linux-libre.fsfla.org/'
+arch=(i686 x86_64 armv7h)
license=(GPL2)
makedepends=(
- xmlto kmod inetutils bc libelf python-sphinx python-sphinx_rtd_theme
- graphviz imagemagick
+ xmlto kmod inetutils bc libelf
+ python-sphinx python-sphinx_rtd_theme graphviz imagemagick
)
makedepends_armv7h=(uboot-tools vboot-utils dtc) # for linux-libre-chromebook
options=('!strip')
@@ -38,9 +35,7 @@ source=(
"https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcver/patch-$_srcbasever-$_srcver.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
- 60-linux.hook # pacman hook for depmod
- 90-linux.hook # pacman hook for initramfs regeneration
- linux.preset # standard config files for mkinitcpio ramdisk
+ linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk
"kernel"{.its,.keyblock,_data_key.vbprivk} # files for signing Chromebooks kernels
# maintain the TTY over USB disconnects
@@ -81,7 +76,7 @@ validpgpkeys=(
)
sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b7967a8988bd9e36d4e728cc573a36e6eac056dbcab2f9aa742f18cbb4fb3164f'
'SKIP'
- '22064d7cf6da426eff98b3fd72a52e6dc1349f1c5f53755041b487335fa8ff61fc1083440af38ef631056301d30d827c5c203566d1f720b9a65505e9c2cd3ee8'
+ 'eca168c4c460bf8d8fbf322e1aa9c6b509f205c7597142967648c09402de95c8438ae302b4920c8f120192b1a54286f0fb860955c66414f3a3c376e41f246391'
'SKIP'
'13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
'SKIP'
@@ -90,11 +85,9 @@ sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b796
'267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1'
'SKIP'
'526c9a439f6a933f4ce8e9c1a46607d7b8e0586c45a5346fbe7a9f2a8d4460c50441c61c4224b0dbb3ed84df9c9bb9709deffe62ce2caefc01cd77cd77c436b7'
- 'ffb132f754dc2a943f106232c8af0767d06d9ba0e4a0770bd7880f42ff7759b3fb67e5af79d4987c698664b037964a42fb6384beca797a0e64e0cd77e2998529'
- 'bffd1cb46d82871c84417be4698c1318cea50c64cded250f51af6506c1aa60ec339c2bdf1fc0f3348fab72a6c2a88b315e3958fd73d644c3c564bf28d78d9365'
- '6b57a66b870b2f525e2dedd8f224b89474fd4ec6ea18484b0a67a1a2b9a4fc95d025cac181504406ea42a35d6c1b184c0d4e38c92815022935fc55746c69c7c1'
- '2718b58dbbb15063bacb2bde6489e5b3c59afac4c0e0435b97fe720d42c711b6bcba926f67a8687878bd51373c9cf3adb1915a11666d79ccb220bf36e0788ab7'
- '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
+ '39776548cf08a77fab7da651637cd27a7195092e66e9820df8d22bba2f5d1e55e117419111c338e224d323f28870ef6068decf91fa8c4cb4f461aa842b88d554'
+ '0e80454eb0672d10d9497ef716a6474d3efc6ccdc4052fbd28146176167ca0d292124fc19e2b348bd31433dc046ed95ea40d61b49237ad72c6230d76fadb3419'
+ 'aca591b5a2e838754e3c5fd2c0e50098ad54c2d0f990de5bf9cff8608e881daf0e37132294ed1a0e0a7b9e1c194c0b89f95da001d94febdb25a01c409060e3ac'
'167bc73c6c1c63931806238905dc44c7d87c5a5c0f6293159f2133dfe717fb44081018d810675716d1605ec7dff5e8333b87b19e09e2de21d0448e447437873b'
'bb6718984a7357c9b00c37e4788480e5b8b75018c172ecc1441bc3fc5d2d42444eb5d8c7f9d2e3a7d6fed6d03acb565e3c0559486e494c40a7fe6bd0570c9ede'
'143dea30c6da00e504c99984a98a0eb2411f558fcdd9dfa7f607d6c14e9e7dffff9cb00121d9317044b07e3e210808286598c785ee854084b993ec9cb14d8232'
@@ -102,7 +95,7 @@ sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b796
'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
'5c48b0092ab6a31453e27e6345347fd2d066e1c306c4c8a9144260bf37d0d13879b5cfe688906a06627d39a40a37e229e5300a479b2c9159e93e05ea7adc6b0a'
'b07d84cac1c784f5652a4681efd54ef89ce9cb0778bd2a633709b7150f9fb59db978dc290b92bcb69b8d211471c22a0be2a81a129318cd7efff601a3c591483c')
-sha512sums_armv7h=('078f8dfaabccb2a51c3440ed67a438bad1a83d35ccbcf06cb2d6f7d3c7e140b96c116926a0c503ffc31f849834bc22350467c1f0a48f60815c0d2882e9e01b93'
+sha512sums_armv7h=('f465d4229c82280040dbbe4f24a99bf0318298659218e66e1c05645d5921f01c74517eb9a4401928d6b1a221d2c09e360d270b08b0285864a8eaac022796ce0a'
'SKIP'
'9724026836feefa67acb9644acf3ee89d465734af50b6637b8232b705c6259035d485cd1a1f0f08d189921eb75ad095b3e1f7f7e5e0e52302352c453f03ac820'
'41f9f7d58bb29311e09dd58105d173fb2e2a955c0e7d632bc8788c2f0a803a45281dfd2be1712d6ec93b58b9f440f3f8398f234bd7ded1c49b1c33b328478203'
@@ -114,16 +107,19 @@ sha512sums_armv7h=('078f8dfaabccb2a51c3440ed67a438bad1a83d35ccbcf06cb2d6f7d3c7e1
'c1191d35ef8ce8ffaa817e952916dfe5fff45758c13394bb3fc7eba7376fd2cdc94ef32a2a54d431d8258da10fa7ce2284b092b6871e9b357b71ac0144a655b8'
'e8e73026ac02645b5914ac97bfada4c94f48e490331a28960ee5939feb18dc5630831748cdd210b27d91590322cf564d3265feee9a8246a373cc117cd520c10d')
-_kernelname=${pkgbase#linux-libre}
-_replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}")
-_replacesoldkernels=("${_replacesoldkernels[@]/\%/${_kernelname}}")
-_replacesoldmodules=("${_replacesoldmodules[@]/\%/${_kernelname}}")
+_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="@${SOURCE_DATE_EPOCH:-$(date +%s)}"
+
prepare() {
cd $_srcname
@@ -139,7 +135,7 @@ prepare() {
msg2 "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
- echo "$_kernelname" > localversion.20-pkgname
+ echo "${pkgbase#linux-libre}" > localversion.20-pkgname
if [ "$CARCH" = "armv7h" ]; then
local src_armv7h
@@ -173,7 +169,7 @@ build() {
cd $_srcname
if [ "$CARCH" = "armv7h" ]; then
make zImage modules htmldocs dtbs
- elif [ "$CARCH" = "x86_64" ] || [ "$CARCH" = "i686" ]; then
+ else
make bzImage modules htmldocs
fi
}
@@ -183,11 +179,9 @@ _package() {
depends=(coreutils kmod initramfs)
optdepends=('crda: to set the correct wireless channels of your country'
'linux-libre-firmware: firmware images needed for some devices')
- provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}" "LINUX-ABI_VERSION=${_srcver%%-*}")
+ provides=("${_replacesarchkernel[@]/%/=${_srcver%%-*}}" "LINUX-ABI_VERSION=${_srcver%%-*}")
conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- backup=("etc/mkinitcpio.d/$pkgbase.preset")
- install=linux.install
cd $_srcname
local kernver="$(<version)"
@@ -200,7 +194,6 @@ _package() {
# 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"
- install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-$pkgbase"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
@@ -211,32 +204,14 @@ _package() {
# remove build and source links
rm "$modulesdir"/{source,build}
- msg2 "Installing hooks..."
- # sed expression for following substitutions
+ # armv7h kernels presets only work with ALL_kver=$kernver
if [ "$CARCH" = "armv7h" ]; then
- local subst="
- s|/boot/vmlinuz-%PKGBASE%|$kernver|g
- s|%PKGBASE%|$pkgbase|g
- s|%KERNVER%|$kernver|g
- "
- else
- local subst="
- s|%PKGBASE%|$pkgbase|g
- s|%KERNVER%|$kernver|g
- "
- fi
+ backup=("etc/mkinitcpio.d/$pkgbase.preset")
- # hack to allow specifying an initially nonexisting install file
- sed "$subst" "$startdir/$install" > "$startdir/$install.pkg"
- true && install=$install.pkg
-
- # fill in mkinitcpio preset and pacman hooks
- sed "$subst" ../linux.preset | install -Dm644 /dev/stdin \
- "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
- sed "$subst" ../60-linux.hook | install -Dm644 /dev/stdin \
- "$pkgdir/usr/share/libalpm/hooks/60-$pkgbase.hook"
- sed "$subst" ../90-linux.hook | install -Dm644 /dev/stdin \
- "$pkgdir/usr/share/libalpm/hooks/90-$pkgbase.hook"
+ msg2 "Installing mkinitcpio preset..."
+ sed "s|%PKGBASE%|$pkgbase|g;s|%KERNVER%|$kernver|g" ../linux-armv7h.preset \
+ | install -Dm644 /dev/stdin "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
+ fi
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
@@ -244,7 +219,7 @@ _package() {
_package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase^} kernel"
- provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}")
+ provides=("${_replacesarchkernel[@]/%/-headers=${_srcver%%-*}}")
conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
@@ -346,7 +321,7 @@ _package-headers() {
_package-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase^} kernel"
- provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}")
+ provides=("${_replacesarchkernel[@]/%/-docs=${_srcver%%-*}}")
conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
@@ -379,8 +354,8 @@ _package-docs() {
_package-chromebook() {
pkgdesc="Kernel image sign for ${pkgbase^} - Chromebooks"
- depends=(linux-libre=${_archpkgver})
- provides=("${_replacesarchkernel[@]/%/-armv7-chromebook=${_archpkgver}}")
+ depends=(linux-libre=${_srcver%%-*})
+ provides=("${_replacesarchkernel[@]/%/-armv7-chromebook=${_srcver%%-*}}")
conflicts=("${_replacesarchkernel[@]/%/-armv7-chromebook}" "${_replacesoldkernels[@]/%/-armv7-chromebook}")
replaces=("${_replacesarchkernel[@]/%/-armv7-chromebook}" "${_replacesoldkernels[@]/%/-armv7-chromebook}")
install=linux-chromebook.install