diff options
author | David Cohen | 2023-05-11 22:37:17 -0500 |
---|---|---|
committer | David Cohen | 2023-05-11 22:42:21 -0500 |
commit | 7a743c2112f27a0a1d38d06ba4d9ea47b3df0808 (patch) | |
tree | 9211b1cd280b11917436f7e09db2798ed1fd2093 | |
parent | 6b2c889d09c6068fed735f6f6858a5e9715abefd (diff) | |
download | aur-7a743c2112f27a0a1d38d06ba4d9ea47b3df0808.tar.gz |
make linux-git package customization more user-friendly
This patch adds a README file with proper instructions, implements
support to customizations in case no previous verions of linux-git is
installed, and adds linux-git.install file to print customization
instructions post package installation / upgrade.
Signed-off-by: David Cohen <dacohen@pm.me>
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | README | 20 | ||||
-rw-r--r-- | linux-git.install | 29 |
4 files changed, 61 insertions, 8 deletions
@@ -1,6 +1,6 @@ pkgbase = linux-git pkgdesc = Linus Torvalds' Mainline Linux - pkgver = v6.4.rc1.r12.16a8829130ca + pkgver = v6.4.rc1.r109.cc3c44c9fda2 pkgrel = 1 url = https://www.kernel.org arch = x86_64 @@ -34,12 +34,13 @@ pkgbase = linux-git sha256sums = SKIP sha256sums = 6b337a9d3cfdc00005589a80b8d36fa500f6a92ed21565a3aceec48d7202a7da sha256sums = 6e41a729c2f2946d3606ca2c0cb3a058c9700b0f73110eed36dcba91a271e50f - sha256sums = efa6b2082cda719b01d15c5374331784c841a38648da63f95904eb7e1b195e62 - sha256sums = b5560bc5fb8967aec989b757af8eb4d2f5166a830abb732c8c880fb953dcb52f + sha256sums = SKIP + sha256sums = SKIP sha256sums = 986e39ee1cb41d342b19f1c5af8016d48afa1e182237dbdcc3f222ae4203ef2d pkgname = linux-git pkgdesc = The Linus Torvalds' Mainline Linux kernel and modules + install = linux-git.install depends = coreutils depends = kmod depends = initramfs @@ -6,7 +6,7 @@ # will be on config.extra file. pkgbase=linux-git -pkgver=v6.4.rc1.r12.16a8829130ca +pkgver=v6.4.rc1.r109.cc3c44c9fda2 pkgrel=1 pkgdesc="Linus Torvalds' Mainline Linux" url="https://www.kernel.org" @@ -39,11 +39,11 @@ validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) -sha256sums=('SKIP' +sha256sums=('SKIP' # linux git source '6b337a9d3cfdc00005589a80b8d36fa500f6a92ed21565a3aceec48d7202a7da' # config '6e41a729c2f2946d3606ca2c0cb3a058c9700b0f73110eed36dcba91a271e50f' # config.extra - 'efa6b2082cda719b01d15c5374331784c841a38648da63f95904eb7e1b195e62' # config.user - 'b5560bc5fb8967aec989b757af8eb4d2f5166a830abb732c8c880fb953dcb52f' # remote + 'SKIP' # config.user + 'SKIP' # remote '986e39ee1cb41d342b19f1c5af8016d48afa1e182237dbdcc3f222ae4203ef2d' # patches ) @@ -65,7 +65,7 @@ pkgver() { prepare() { cd $_srcname - [[ -f "$_userremote" ]] && source "$_userremote" + [[ -f "$_userremote" ]] && source "$_userremote" || source "../${_userremote##*/}" if [[ -n "$REMOTE" && -n "$COMMIT" ]]; then REMOTE_PREFIX=${source[0]##${_srcname}::git+} REMOTE_PREFIX=${REMOTE_PREFIX%%torvalds/linux} @@ -113,6 +113,8 @@ prepare() { cat ../config ../config.extra > .config if [[ -f "$_userconfig" ]]; then cat $_userconfig >> .config + else + cat ../config.user >> .config fi make olddefconfig diff -u ../config .config || : @@ -133,6 +135,7 @@ _package() { 'linux-firmware: firmware images needed for some devices') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE) replaces=(virtualbox-guest-modules-arch wireguard-arch) + install="${pkgbase}.install" cd $_srcname local kernver="$(<version)" diff --git a/README b/README new file mode 100644 index 000000000000..c8f9c846faeb --- /dev/null +++ b/README @@ -0,0 +1,20 @@ +These are the instructions to customize the linux-git package compilation in +case using the current Linux mainline is not desired: + +* How to customize the git remote / branch: + If a previous linux-git installation exists, please consult and edit the file + /etc/linux-git/remote, otherwise use the file ./remote included in this AUR + package. + +* How to add user-customized config options: + If a previous linux-git installation exists, please consult and edit the file + /etc/linux-git/config, otherwise use the file ./config.user included in this + AUR package. + +* How to add extra patches on top of the selected remote / branch: + If a previous linux-git installation exists, please consult and edit the file + /etc/linux-git/patches/patches. If not, you can add the patches + directly to the src/linux-torvalds/ git source. After compilation and + installation, you can copy the patches to the directory + /etc/linux-git/patches and follow the instructions included on + /etc/linux-git/patches/patches file. diff --git a/linux-git.install b/linux-git.install new file mode 100644 index 000000000000..09a4846ae520 --- /dev/null +++ b/linux-git.install @@ -0,0 +1,29 @@ +README="$(cat << EOF + +=============================================================================== + +These are the instructions to customize the next linux-git package compilation +in case using the current Linux mainline is not desired: + +* How to customize the git remote / branch: + Please consult and edit the file /etc/linux-git/remote + +* How to add user-customized config options: + Please consult and edit the file /etc/linux-git/config + +* How to add extra patches on top of the selected remote / branch: + Please consult and edit the file /etc/linux-git/patches/patches + +=============================================================================== + +EOF +)" + +post_install() { + echo "${README}" +} + +post_upgrade() { + echo "${README}" +} + |