Commit b181db40 authored by Seblu's avatar Seblu
Browse files

Improve fix against -dirty string in make kernelrelease

Do not remove .git directory because it cause successive call to makepkg to
not work. Use .scmversion file instead.
parent 2ceb00fd
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -36,14 +36,15 @@ prepare() {
	msg2 'Setting kernel suffix'
	sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${pkgname#linux*}\"|g" .config

  # remove git informations
  # these info will be used by make kernelrelease and produce wrong information
  # because ownership has fakely be changed by fakeroot during packaging.
  rm -rf .git

  # define current build version
  msg2 'Setting kernel build version'
  echo "$(($pkgrel - 1 ))" > .version

  # no scm version
  # this prevent an issue with “make kernelrelease” which add -dirty to version
  # because ownership of git files has fakely been changed by fakeroot when
  # called from makepkg
  echo '' > .scmversion
}

build() {