summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Figueras2020-02-10 12:31:52 +0100
committerJoan Figueras2020-02-10 12:31:52 +0100
commit8d62577de19bfa32304e0e273b9b37ad8b69229f (patch)
treeb5b66fbf0e6018b89fb0b2bbb8e88fa62f11e1a1
parent787774547b90abcc4468f7928984571c3e0ce0b2 (diff)
downloadaur-8d62577de19bfa32304e0e273b9b37ad8b69229f.tar.gz
Added _localmodcfg. Fixed deps.
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD30
2 files changed, 29 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2a63578abfa..302c32fa6bd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,12 +10,11 @@ pkgbase = linux-xanmod-rt
makedepends = inetutils
makedepends = bc
makedepends = libelf
- makedepends = git
+ makedepends = cpio
makedepends = python-sphinx
makedepends = python-sphinx_rtd_theme
makedepends = graphviz
makedepends = imagemagick
- makedepends = cpio
options = !strip
source = https://github.com/xanmod/linux/archive/5.4.17-rt9-xanmod.tar.gz
source = choose-gcc-optimization.sh
diff --git a/PKGBUILD b/PKGBUILD
index 89342e58bbb..895ed7f00ba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -49,6 +49,20 @@ if [ -z ${use_ns+x} ]; then
fi
##
+# Compile ONLY used modules to VASTLYreduce the number of modules built
+# and the build time.
+#
+# To keep track of which modules are needed for your specific system/hardware,
+# give module_db script a try: https://aur.archlinux.org/packages/modprobed-db
+# This PKGBUILD read the database kept if it exists
+#
+# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db
+if [ -z ${_localmodcfg} ]; then
+ _localmodcfg=n
+fi
+
+### IMPORTANT: Do no edit below this line unless you know what you're doing
+
pkgbase=linux-xanmod-rt
pkgver=5.4.17
xanmod=9
@@ -59,8 +73,8 @@ arch=(x86_64)
url="http://www.xanmod.org/"
license=(GPL2)
makedepends=(
- xmlto kmod inetutils bc libelf git python-sphinx python-sphinx_rtd_theme
- graphviz imagemagick cpio
+ xmlto kmod inetutils bc libelf cpio
+ python-sphinx python-sphinx_rtd_theme graphviz imagemagick
)
options=('!strip')
_srcname="linux-${pkgver}-rt${xanmod}-xanmod${_rev}"
@@ -142,6 +156,18 @@ prepare() {
make olddefconfig
+ ### Optionally load needed modules for the make localmodconfig
+ # See https://aur.archlinux.org/packages/modprobed-db
+ if [ "$_localmodcfg" = "y" ]; then
+ if [ -f $HOME/.config/modprobed.db ]; then
+ msg2 "Running Steven Rostedt's make localmodconfig now"
+ make LSMOD=$HOME/.config/modprobed.db localmodconfig
+ else
+ msg2 "No modprobed.db data found"
+ exit
+ fi
+ fi
+
make -s kernelrelease > version
msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
}