$ sudo pacman -Syu git base-devel --needed
$ git clone https://gitlab.manjaro.org/packages/core/linux510
$ cd linux510
$ nano PKGBUILD
Make the desired changes, bump pkgrel, save and build
$ makepkg -is
$ sudo pacman -Syu git base-devel --needed
$ git clone https://gitlab.manjaro.org/packages/core/linux510
$ cd linux510
$ nano PKGBUILD
Make the desired changes, bump pkgrel, save and build
$ makepkg -is