add roadrunner2/macbook12-spi-driver
This commit is contained in:
parent
ff29aac0f0
commit
368a317e41
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ linux-*.tar.xz
|
||||
linux-*.sign
|
||||
kernel-*/
|
||||
config-base-*
|
||||
macbook12-spi-driver-*.tar.gz
|
||||
|
15
Makefile
15
Makefile
@ -50,7 +50,13 @@ HASH_FILE :=${SRC_FILE}.sha1sum
|
||||
URL := $(SRC_BASEURL)/$(SRC_FILE)
|
||||
URL_SIGN := $(SRC_BASEURL)/$(SIGN_FILE)
|
||||
|
||||
get-sources: $(SRC_FILE) $(SIGN_FILE)
|
||||
SPI_BASE_URL := https://github.com/roadrunner2/macbook12-spi-driver/archive
|
||||
SPI_REVISION := 31cc060adcb431efdf9cf547d600bb45bb00a7f4
|
||||
SPI_SRC_URL := $(SPI_BASE_URL)/$(SPI_REVISION).tar.gz
|
||||
SPI_SRC_FILE := macbook12-spi-driver-$(SPI_REVISION).tar.gz
|
||||
SPI_HASH_SHA256 := 46da514227bb2694e571ec4fff746d1302f41cdea5fe7cb2e522349f96ac83c1
|
||||
|
||||
get-sources: $(SRC_FILE) $(SIGN_FILE) $(SPI_SRC_FILE)
|
||||
|
||||
$(SRC_FILE):
|
||||
@wget -q -N $(URL)
|
||||
@ -58,6 +64,9 @@ $(SRC_FILE):
|
||||
$(SIGN_FILE):
|
||||
@wget -q -N $(URL_SIGN)
|
||||
|
||||
$(SPI_SRC_FILE):
|
||||
@wget -q -N -O $(SPI_SRC_FILE) $(SPI_SRC_URL)
|
||||
|
||||
import-keys:
|
||||
@if [ -n "$$GNUPGHOME" ]; then rm -f "$$GNUPGHOME/linux-kernel-trustedkeys.gpg"; fi
|
||||
@gpg --no-auto-check-trustdb --no-default-keyring --keyring linux-kernel-trustedkeys.gpg -q --import *-key.asc
|
||||
@ -72,12 +81,16 @@ else
|
||||
# with a new key... oh, well...
|
||||
sha1sum --quiet -c ${HASH_FILE}
|
||||
endif
|
||||
@gunzip -c $(SPI_SRC_FILE) | sha256sum | head -c64 | grep -q "^$(SPI_HASH_SHA256)$$"
|
||||
|
||||
.PHONY: clean-sources
|
||||
clean-sources:
|
||||
ifneq ($(SRC_FILE), None)
|
||||
-rm $(SRC_FILE)
|
||||
endif
|
||||
ifneq ($(SPI_SRC_FILE), None)
|
||||
-rm $(SPI_SRC_FILE)
|
||||
endif
|
||||
|
||||
|
||||
#RPM := rpmbuild --buildroot=/dev/shm/buildroot/
|
||||
|
@ -6,6 +6,7 @@
|
||||
%define plainrel @REL@
|
||||
%define rel %{plainrel}.%{variant}
|
||||
%define version @VERSION@
|
||||
%define spi_revision 31cc060adcb431efdf9cf547d600bb45bb00a7f4
|
||||
|
||||
%define _buildshell /bin/bash
|
||||
%define build_xen 1
|
||||
@ -96,6 +97,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
Source0: linux-%version.tar.xz
|
||||
Source6: macbook12-spi-driver-%spi_revision.tar.gz
|
||||
Source16: guards
|
||||
Source17: apply-patches
|
||||
Source33: check-for-config-changes
|
||||
@ -191,6 +193,10 @@ if [ -n "$u2mfn_ver" ]; then
|
||||
cp -r /usr/src/u2mfn-$u2mfn_ver %_builddir/u2mfn
|
||||
fi
|
||||
|
||||
rm -rf %_builddir/macbook12-spi-driver
|
||||
tar -x -C %_builddir -zf %{SOURCE6}
|
||||
mv %_builddir/$(basename %{SOURCE6} .tar.gz) %_builddir/macbook12-spi-driver
|
||||
|
||||
%build
|
||||
|
||||
cd %kernel_build_dir
|
||||
@ -212,6 +218,11 @@ if [ -d "%_builddir/u2mfn" ]; then
|
||||
make -C %kernel_build_dir M=%_builddir/u2mfn modules
|
||||
fi
|
||||
|
||||
# Build applespi, apple-ibridge, apple-ib-tb, apple-ib-als modules
|
||||
if [ -d "%_builddir/macbook12-spi-driver" ]; then
|
||||
make -C %kernel_build_dir M=%_builddir/macbook12-spi-driver modules
|
||||
fi
|
||||
|
||||
%install
|
||||
|
||||
# get rid of /usr/lib/rpm/brp-strip-debug
|
||||
@ -248,6 +259,9 @@ make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
|
||||
if [ -d "%_builddir/u2mfn" ]; then
|
||||
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/u2mfn
|
||||
fi
|
||||
if [ -d "%_builddir/macbook12-spi-driver" ]; then
|
||||
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/macbook12-spi-driver
|
||||
fi
|
||||
|
||||
mkdir -p %buildroot/%src_install_dir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user