summaryrefslogtreecommitdiff
path: root/libre-testing/linux-libre/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre-testing/linux-libre/PKGBUILD')
-rw-r--r--libre-testing/linux-libre/PKGBUILD66
1 files changed, 34 insertions, 32 deletions
diff --git a/libre-testing/linux-libre/PKGBUILD b/libre-testing/linux-libre/PKGBUILD
index 5812b9dcb..8cb4e3807 100644
--- a/libre-testing/linux-libre/PKGBUILD
+++ b/libre-testing/linux-libre/PKGBUILD
@@ -156,7 +156,7 @@ prepare() {
# Make the radeon driver load without the firmwares
# http://www.fsfla.org/pipermail/linux-libre/2015-August/003098.html
- if [ "${CARCH}" != "armv7h" ]; then ## This patch is only needed for x86 computers, so we disable it for others
+ if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then ## This patch is only needed for x86 computers, so we disable it for others
patch -p1 -i "${srcdir}/0001-drm-radeon-Make-the-driver-load-without-the-firmwares.patch"
fi
@@ -186,10 +186,10 @@ prepare() {
build() {
cd "${srcdir}/${_srcname}"
- if [ "${CARCH}" != "armv7h" ]; then
- make ${MAKEFLAGS} LOCALVERSION= bzImage modules
- else
+ if [ "${CARCH}" = "armv7h" ]; then
make ${MAKEFLAGS} LOCALVERSION= zImage modules dtbs
+ elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+ make ${MAKEFLAGS} LOCALVERSION= bzImage modules
fi
}
@@ -197,18 +197,16 @@ _package() {
pkgdesc="The ${pkgbase^} kernel and modules"
[ "${pkgbase}" = "linux-libre" ] && groups=('base')
depends=('coreutils' 'linux-libre-firmware' 'kmod')
- if [ "${CARCH}" != "armv7h" ]; then
- depends+=('mkinitcpio>=0.7')
- fi
optdepends=('crda: to set the correct wireless channels of your country')
- provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}")
- conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- if [ "${CARCH}" = "armv7h" && "${pkgbase}" != "linux-libre"]; then
- provides+=("${_replacesarchkernel%${_kernelname}}")
- conflicts+=("${_replacesarchkernel%${_kernelname}}")
- fi
- if [ "${CARCH}" != "armv7h" ]; then
+ if [ "${CARCH}" = "armv7h" ]; then
+ provides=("${_replacesarchkernel%${_kernelname}}")
+ conflicts=("${_replacesarchkernel%${_kernelname}}")
+ replaces=("${_replacesarchkernel%${_kernelname}}")
+ elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+ depends+=('mkinitcpio>=0.7')
+ provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}")
+ conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
+ replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
fi
install=linux.install
@@ -225,11 +223,11 @@ _package() {
mkdir -p "${pkgdir}"/boot/dtbs
fi
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
- if [ "${CARCH}" != "armv7h" ]; then
- cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
- else
+ if [ "${CARCH}" = "armv7h" ]; then
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/zImage"
cp arch/$KARCH/boot/dts/*.dtb "${pkgdir}/boot/dtbs"
+ elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+ cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
fi
# set correct depmod command for install
@@ -240,7 +238,7 @@ _package() {
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \
-i "${startdir}/${install}"
- if [ "${CARCH}" != "armv7h" ]; then
+ if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
# install mkinitcpio preset file for kernel
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
sed \
@@ -272,7 +270,7 @@ _package() {
mkdir -p "${pkgdir}/usr"
mv "${pkgdir}/lib" "${pkgdir}/usr/"
- if [ "${CARCH}" != "armv7h" ]; then
+ if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
# add vmlinux
install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
fi
@@ -280,12 +278,14 @@ _package() {
_package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase^} kernel"
- provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}")
- conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
- replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
- if [ "${CARCH}" = "armv7h" && "${pkgbase}" != "linux-libre"]; then
- provides+=("${_replacesarchkernel%${_kernelname}}-headers")
- conflicts+=("${_replacesarchkernel%${_kernelname}}-headers")
+ if [ "${CARCH}" = "armv7h" ]; then
+ provides=("${_replacesarchkernel%${_kernelname}}-headers")
+ conflicts=("${_replacesarchkernel%${_kernelname}}-headers")
+ replaces=("${_replacesarchkernel%${_kernelname}}-headers")
+ elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+ provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}")
+ conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
+ replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
fi
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
@@ -412,12 +412,14 @@ _package-headers() {
_package-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase^} kernel"
- provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}")
- conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
- replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
- if [ "${CARCH}" = "armv7h" && "${pkgbase}" != "linux-libre"]; then
- provides+=("${_replacesarchkernel%${_kernelname}}-docs")
- conflicts+=("${_replacesarchkernel%${_kernelname}}-docs")
+ if [ "${CARCH}" = "armv7h" ]; then
+ provides=("${_replacesarchkernel%${_kernelname}}-docs")
+ conflicts=("${_replacesarchkernel%${_kernelname}}-docs")
+ replaces=("${_replacesarchkernel%${_kernelname}}-docs")
+ elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+ provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}")
+ conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
+ replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
fi
cd "${srcdir}/${_srcname}"