Commit c3226381 authored by Seblu's avatar Seblu
Browse files

Change way of handle with various repo names

parent a1f726ec
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -12,11 +12,18 @@ options=('!strip')
makedepends=('kmod' 'git' 'make' 'gcc' 'bc' 'sed')
depends=('linux-firmware' 'kernel-install-hook')
install=linux-seblu.install
source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=v${pkgver/_/-}"
_repourl='git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
source=("$_repourl#tag=v${pkgver/_/-}"
        "config.$CARCH")
md5sums=('SKIP' 'SKIP')

prepare() {
  # fake linux directory if necessary
  if [[ ${_repourl##*/} != 'linux.git' ]]; then
    local _reponame="${_repourl##*/}"
    ln -sfT "${_reponame%.git}" linux
  fi

  cd linux

  # apply patches
@@ -102,7 +109,7 @@ install_sources() {
  ln -rs  "$kernsrc" "$pkgdir/usr/lib/modules/$kernrel"/build

  # Copy kernel config files
  cd "$srcdir"/linux
  cd "$srcdir/linux"
  install -D -m644 Makefile "$kernsrc/Makefile"
  install -D -m644 kernel/Makefile "$kernsrc/kernel/Makefile"
  install -D -m644 .config "$kernsrc/.config"