├── .gitignore ├── README.md ├── dkms.conf.in ├── .SRCINFO ├── PKGBUILD └── .drone.yml /.gitignore: -------------------------------------------------------------------------------- 1 | src/ 2 | pkg/ 3 | *.tar.xz 4 | *.sign 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | apple-bce-arch 2 | ============== 3 | 4 | [![Build Status](https://cloud.drone.io/api/badges/t2linux/apple-bce-arch/status.svg)](https://cloud.drone.io/t2linux/apple-bce-arch) 5 | 6 | Arch Linux package for the Apple BCE Driver. 7 | -------------------------------------------------------------------------------- /dkms.conf.in: -------------------------------------------------------------------------------- 1 | PACKAGE_NAME="@_PKGBASE@" 2 | PACKAGE_VERSION="@PKGVER@" 3 | MAKE[0]="make KVERSION=$kernelver" 4 | CLEAN="make clean" 5 | BUILT_MODULE_NAME[0]="@_PKGBASE@" 6 | DEST_MODULE_LOCATION[0]="/kernel/drivers/misc" 7 | AUTOINSTALL="yes" 8 | -------------------------------------------------------------------------------- /.SRCINFO: -------------------------------------------------------------------------------- 1 | pkgbase = apple-bce-git 2 | pkgdesc = Apple BCE (Buffer Copy Engine) driver for T2-based devices. 3 | pkgver = r185.f93c656 4 | pkgrel = 10 5 | url = https://github.com/t2linux/apple-bce-drv 6 | arch = x86_64 7 | license = GPL2 8 | makedepends = git 9 | makedepends = linux-headers 10 | makedepends = pahole 11 | depends = linux 12 | options = !strip 13 | source = apple-bce::git+https://github.com/t2linux/apple-bce-drv.git#branch=aur 14 | source = dkms.conf.in 15 | sha256sums = SKIP 16 | sha256sums = 06c389cbfb9e771397c962a782e7217a56be85ac4eee652d927e1e0f63a78ed6 17 | 18 | pkgname = apple-bce-git 19 | depends = linux-mbp=5.12.19 20 | depends = linux-mbp-headers=5.12.19 21 | 22 | pkgname = apple-bce-dkms-git 23 | depends = dkms 24 | depends = pahole 25 | provides = apple-bce 26 | conflicts = apple-bce 27 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Aun-Ali Zaidi 2 | 3 | _pkgbase=('apple-bce') 4 | pkgname=(${_pkgbase}-git ${_pkgbase}-dkms-git) 5 | pkgdesc="Apple BCE (Buffer Copy Engine) driver for T2-based devices." 6 | pkgver=r185.f93c656 7 | pkgrel=10 8 | 9 | arch=('x86_64') 10 | url="https://github.com/t2linux/apple-bce-drv" 11 | license=('GPL2') 12 | 13 | depends=('linux') 14 | makedepends=('git' 'linux-headers' 'pahole') 15 | options=(!strip) 16 | 17 | source=("apple-bce::git+https://github.com/t2linux/apple-bce-drv.git#branch=aur" 18 | "dkms.conf.in") 19 | 20 | sha256sums=('SKIP' 21 | '06c389cbfb9e771397c962a782e7217a56be85ac4eee652d927e1e0f63a78ed6') 22 | 23 | pkgver() { 24 | cd "$_pkgbase" 25 | ( set -o pipefail 26 | git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || 27 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 28 | ) 29 | } 30 | 31 | prepare() { 32 | # Set name and version 33 | sed -e "s/@PKGVER@/$pkgver/" \ 34 | -e "s/@_PKGBASE@/$_pkgbase/" dkms.conf.in > dkms.conf 35 | } 36 | 37 | build() { 38 | cd "$_pkgbase" 39 | _kernver=$(> /etc/pacman.conf 21 | - pacman --noconfirm -Syyu 22 | - pacman-key --init 23 | - pacman-key --populate archlinux 24 | - curl -O http://dl.t2linux.org/archlinux/key.asc 25 | - pacman-key --add key.asc 26 | - pacman-key --finger 7F9B8FC29F78B339 27 | - pacman-key --lsign-key 7F9B8FC29F78B339 28 | - pacman --noconfirm --needed -S base-devel sudo linux-mbp linux-mbp-headers 29 | - useradd builduser -m 30 | - passwd -d builduser 31 | - echo "PKGEXT='.pkg.tar.zst'" | tee -a /etc/makepkg.conf 32 | - echo "COMPRESSZST=(zstd -c -T0 -20 --ultra -)" | tee -a /etc/makepkg.conf 33 | - printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers # passwordless sudo 34 | - chown -R builduser:builduser ./ 35 | - sudo -u builduser bash -c 'makepkg -s --noconfirm' 36 | - ls -lah *.pkg.tar.zst 37 | - mv *.pkg.tar.zst /tmp/products 38 | 39 | - name: sign 40 | image: plugins/gpgsign 41 | volumes: 42 | - name: build-products 43 | path: /tmp/products 44 | settings: 45 | key: 46 | from_secret: signing_key 47 | passphrase: 48 | from_secret: signing_key_password 49 | files: 50 | - /tmp/products/* 51 | armor: false 52 | detach_sign: true 53 | when: 54 | event: tag 55 | 56 | - name: publish-github 57 | image: plugins/github-release 58 | volumes: 59 | - name: build-products 60 | path: /tmp/products 61 | settings: 62 | api_key: 63 | from_secret: github_token 64 | files: /tmp/products/* 65 | prerelease: yes 66 | when: 67 | event: tag 68 | 69 | - name: publish-repo 70 | image: archlinux 71 | pull: always 72 | volumes: 73 | - name: arch-bootstrap 74 | path: /tmp/bootstrap 75 | - name: build-products 76 | path: /tmp/products 77 | - name: temp-repo 78 | path: /tmp/repo 79 | environment: 80 | S3_ACCESS_ID: 81 | from_secret: s3_access_id 82 | S3_SECRET: 83 | from_secret: s3_secret 84 | S3_REGION: 85 | from_secret: s3_region 86 | S3_HOST: 87 | from_secret: s3_host 88 | S3_BUCKET_HOST: 89 | from_secret: s3_bucket_host 90 | S3_BUCKET: 91 | from_secret: s3_bucket 92 | commands: 93 | - /tmp/bootstrap/pacman-static --noconfirm -Syy 94 | - printf 'y\ny\n' | /tmp/bootstrap/pacman-static -U /tmp/bootstrap/glibc-linux4-2.33-5-x86_64.pkg.tar.zst /tmp/bootstrap/lib32-glibc-linux4-2.33-5-x86_64.pkg.tar.zst 95 | - pacman --noconfirm -Syyu 96 | - pacman --noconfirm --needed -S base s3cmd 97 | - s3cmd -s --region=$S3_REGION --host=$S3_HOST --host-bucket="$S3_BUCKET_HOST" --access_key=$S3_ACCESS_ID --secret_key=$S3_SECRET sync --follow-symlinks s3://$S3_BUCKET/archlinux/mbp/x86_64/ /tmp/repo/ 98 | - mv /tmp/products/* /tmp/repo/ 99 | - cd /tmp/repo/ 100 | - repo-add -n -R -p $PWD/mbp.db.tar.gz *.pkg.tar.zst 101 | - s3cmd -s --region=$S3_REGION --host=$S3_HOST --host-bucket="$S3_BUCKET_HOST" --access_key=$S3_ACCESS_ID --secret_key=$S3_SECRET sync --follow-symlinks --delete-removed /tmp/repo/ s3://$S3_BUCKET/archlinux/mbp/x86_64/ 102 | when: 103 | event: tag 104 | 105 | volumes: 106 | - name: arch-bootstrap 107 | temp: {} 108 | - name: build-products 109 | temp: {} 110 | - name: temp-repo 111 | temp: {} 112 | --------------------------------------------------------------------------------