summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorTimofey Titovets2016-10-23 17:44:19 +0300
committerTimofey Titovets2016-10-23 17:44:19 +0300
commitfc87ca91ddfa324c00999b673d887c8d4cc8008a (patch)
tree6e81a88fda11e97490c67ee0191d2bd38e9abeeb /PKGBUILD
parent43cfb5f7cf33c922e59441d2c07424a2f13787b5 (diff)
downloadaur-fc87ca91ddfa324c00999b673d887c8d4cc8008a.tar.gz
Port old functions
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD51
1 files changed, 49 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8a3d6f2b818a..886f56a9fa71 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ pkgbase=linux-next-git
#pkgname=("${pkgbase}")
_srcname=linux-next
pkgver=20161021
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
license=('GPL2')
@@ -22,9 +22,51 @@ md5sums=('SKIP'
_kernelname=${pkgbase#linux}
+#######
+# Set to e.g. menuconfig, xconfig or gconfig and etc.
+#
+# For a full list of supported commands, please have a look
+# at "Configuration targets" section of `make help`'s output
+# or the help target in scripts/kconfig/Makefile
+# https://kernel.org/doc/makehelp.txt
+#
+# If unset or set to an empty or space-only string, the
+# (manual) kernel configuration step will be skipped.
+#
+linux_next_git_config_cmd="${linux_next_git_config_cmd:-olddefconfig}"
+
+#######
+# Directory with patches
+# linux_next_git_patches_dir="path"
+
+#######
+# Use local config (non empty -> yes)
+# linux_next_git_local_config=1
+
+######
+# Reset to specified tag
+# linux_next_git_tag=""
+
+pkgver() {
+ cd "${_srcname}"
+ git describe --always | tr -d 'next-'
+}
+
prepare() {
cd "${srcdir}/${_srcname}"
+ #################
+ # Apply patches #
+ #################
+ if [ -d "${linux_next_git_patches_dir}" ]; then
+ msg "Applying patches..."
+ for i in "${linux_next_git_patches_dir}"/*; do
+ [[ ${i##*/} =~ .*\.patch$ ]] && msg "Applying ${i##*/}..." && \
+ git apply "$i" || (error "Applying ${i##*/} failed" && return 1)
+ msg "---"
+ done
+ fi
+
# add upstream patch
# patch -p1 -i "${srcdir}/patch-${pkgver}"
@@ -42,6 +84,10 @@ prepare() {
cat "${srcdir}/config" > ./.config
fi
+ if [ -n "${linux_next_git_local_config}" ]; then
+ [ -f /proc/config.gz ] && zcat /proc/config.gz > ./.config
+ fi
+
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
@@ -65,7 +111,8 @@ prepare() {
# ... or manually edit .config
# rewrite configuration
- yes "" | make config >/dev/null
+ yes "" | make config > /dev/null
+ make ${linux_next_git_config_cmd}
}
build() {