diff --git a/PKGBUILD b/PKGBUILD
index 044eebdbfaf8cc4ee46fe3152a6385d8e7ee6354..559f6b644db980905241b198eec3bfbb267d4d8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,6 @@
 
 pkgname=linux-seblu
 pkgver=4.12
-_repourl='git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
-#_repourl='git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
 pkgrel=1
 pkgdesc='The Linux Kernel cooked by Seblu'
 arch=('x86_64')
@@ -14,13 +12,20 @@ options=('!strip')
 makedepends=('kmod' 'git' 'make' 'gcc' 'bc' 'sed')
 depends=('linux-firmware' 'kernel-install-hook')
 install=linux-seblu.install
-_reponame=${_repourl##*/}
+_repourl='git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
+#_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() {
-  cd ${_reponame%.git}
+  # fake linux directory if necessary
+  if [[ ${_repourl##*/} != 'linux.git' ]]; then
+    local _reponame="${_repourl##*/}"
+    ln -sfT "${_reponame%.git}" linux
+  fi
+
+  cd linux
 
   # apply patches
   for _f in "${source[@]}"; do
@@ -51,7 +56,7 @@ prepare() {
 }
 
 build() {
-  cd ${_reponame%.git}
+  cd linux
 
   msg2 'Make prepare'
   make prepare
@@ -64,7 +69,7 @@ build() {
 }
 
 package() {
-  cd ${_reponame%.git}
+  cd linux
 
   # get real compiled kernel version
   kernrel=$(make kernelrelease)
@@ -106,7 +111,7 @@ install_sources() {
   ln -rs  "$kernsrc" "$pkgdir/usr/lib/modules/$kernrel"/build
 
   # Copy kernel config files
-  cd "$srcdir/${_reponame%.git}"
+  cd "$srcdir/linux"
   install -D -m644 Makefile "$kernsrc/Makefile"
   install -D -m644 kernel/Makefile "$kernsrc/kernel/Makefile"
   install -D -m644 .config "$kernsrc/.config"