summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore13
-rw-r--r--PKGBUILD50
-rw-r--r--dkms.conf6
-rw-r--r--hid-apple-patched-dkms.install22
-rw-r--r--hid-apple-patched.conf1
-rw-r--r--hid_apple_pclayout.conf5
7 files changed, 120 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5d06110904a4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by mksrcinfo v8
+# Mon Apr 17 15:08:34 UTC 2017
+pkgbase = hid-apple-patched-git-dkms
+ pkgdesc = Allows to swap the Fn key and left Control key on Macbook Pro and Apple keyboards in GNU/Linux (DKMS)
+ pkgver = 20170406.61dce7d
+ pkgrel = 1
+ url = https://github.com/free5lot/hid-apple-patched
+ install = hid-apple-patched-dkms.install
+ arch = any
+ license = GPL2
+ makedepends = git
+ depends = dkms
+ source = git+https://github.com/free5lot/hid-apple-patched#branch=master
+ source = hid-apple-patched.conf
+ source = hid_apple_pclayout.conf
+ source = dkms.conf
+ sha256sums = SKIP
+ sha256sums = 4b94f1f55febddad5ff60a8918487b883ceadd4e6c3fb280e98e4e235cd09663
+ sha256sums = 2a493d3973b80b815779643b2c1039f52c05e2e9a65cebd00b2a1da105630cbb
+ sha256sums = 5d2457728a93e73a96f2ca88f66455859363f083097ad20e661bdc12dc44a9ba
+
+pkgname = hid-apple-patched-git-dkms
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..8db5aa808c80
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+# Ignore downloaded source files
+*.tar.gz
+*.tar.xz
+*.tgz
+
+# Ignore packages
+*.pkg.tar.xz
+
+# Ignore log files
+*.log
+
+# Ignore all subdirs
+*/*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6335e3d4ffc5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Aetf <aetf@unlimitedcodeworks.xyz>
+# Contributor: juantascon <juantascon.aur@horlux.org>
+# Contributor: Ilya Kuzmin <i.g.kuzmin.spb@gmail.com>
+
+pkgname='hid-apple-patched-git-dkms'
+_pkgname=hid-apple-patched
+
+pkgver=20170406.61dce7d
+pkgrel=1
+
+url="https://github.com/free5lot/hid-apple-patched"
+arch=('any')
+license=('GPL2')
+pkgdesc="Allows to swap the Fn key and left Control key on Macbook Pro and Apple keyboards in GNU/Linux (DKMS)"
+
+conflicts=('hid-apple-patched-git-dkms')
+depends=('dkms')
+makedepends=('git')
+
+install=hid-apple-patched-dkms.install
+
+source=("git+https://github.com/free5lot/$_pkgname#branch=master"
+ "hid-apple-patched.conf"
+ "hid_apple_pclayout.conf"
+ "dkms.conf")
+
+sha256sums=('SKIP'
+ '4b94f1f55febddad5ff60a8918487b883ceadd4e6c3fb280e98e4e235cd09663'
+ '2a493d3973b80b815779643b2c1039f52c05e2e9a65cebd00b2a1da105630cbb'
+ '5d2457728a93e73a96f2ca88f66455859363f083097ad20e661bdc12dc44a9ba')
+
+pkgver() {
+ cd "$srcdir"/"$_pkgname"
+ git log -1 --format=%cd.%h --date=short|tr -d -
+}
+
+package() {
+
+ ## Copy sources
+ install -dm755 "${pkgdir}"/usr/src/${_pkgname}-${pkgver}/
+ install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgname}-${pkgver}/
+ install -Dm644 ${_pkgname}/{hid-apple.c,hid-ids.h,Makefile} "${pkgdir}"/usr/src/${_pkgname}-${pkgver}/
+
+ sed -e "s/@PKGNAME@/${_pkgname}/" \
+ -e "s/@PKGVER@/${pkgver}/" \
+ -i "${pkgdir}"/usr/src/${_pkgname}-${pkgver}/dkms.conf
+
+ install -Dm644 hid_apple_pclayout.conf "${pkgdir}"/etc/modprobe.d/hid_apple_pclayout.conf
+ install -Dm644 hid-apple-patched.conf "$pkgdir"/etc/depmod.d/hid-apple-patched.conf
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 000000000000..59f7f49e9951
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,6 @@
+BUILT_MODULE_NAME=hid-apple
+DEST_MODULE_LOCATION='/extra'
+PACKAGE_NAME=@PKGNAME@
+PACKAGE_VERSION=@PKGVER@
+REMAKE_INITRD=yes
+AUTOINSTALL=yes
diff --git a/hid-apple-patched-dkms.install b/hid-apple-patched-dkms.install
new file mode 100644
index 000000000000..29543320c89e
--- /dev/null
+++ b/hid-apple-patched-dkms.install
@@ -0,0 +1,22 @@
+post_install() {
+ do_install ${1}
+}
+
+post_upgrade() {
+ do_install ${1}
+}
+
+# -----------------------------------------------------------------------------------
+
+do_install() {
+ cat << EOF
+
+==> hid-apple-patched install/upgrade note:
+------------------------------------------------------------------------------
+Configuration file is installed to /etc/modprobe.d/hid_apple_pclayout.conf.
+By default PC-like layout is enabled. You can tweak it to suit your needs
+according to https://github.com/free5lot/hid-apple-patched#configuration.
+
+EOF
+}
+
diff --git a/hid-apple-patched.conf b/hid-apple-patched.conf
new file mode 100644
index 000000000000..85cab0d67386
--- /dev/null
+++ b/hid-apple-patched.conf
@@ -0,0 +1 @@
+override hid-apple * extra
diff --git a/hid_apple_pclayout.conf b/hid_apple_pclayout.conf
new file mode 100644
index 000000000000..e4c1d8ab4d9c
--- /dev/null
+++ b/hid_apple_pclayout.conf
@@ -0,0 +1,5 @@
+options hid_apple fnmode=2
+options hid_apple swap_fn_leftctrl=1
+options hid_apple swap_opt_cmd=1
+options hid_apple rightalt_as_rightctrl=1
+options hid_apple ejectcd_as_delete=1