diff options
author | qzed | 2019-09-09 00:38:00 +0200 |
---|---|---|
committer | qzed | 2019-09-09 00:38:00 +0200 |
commit | 52cb8d356f0b5a701ae5a0c6fac7268a56fdaac6 (patch) | |
tree | ca5b4629760d939a708f582d3dca50f7d7f3916d | |
download | aur-52cb8d356f0b5a701ae5a0c6fac7268a56fdaac6.tar.gz |
Initial release
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 72 | ||||
-rw-r--r-- | surface-dtx-daemon.install | 7 |
4 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..658b47c8c095 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = surface-dtx-daemon + pkgdesc = Surface Detachment System (DTX) Daemon + pkgver = 0.1.3 + pkgrel = 1 + url = https://github.com/qzed/linux-surface-dtx-daemon + install = surface-dtx-daemon.install + arch = x86_64 + license = MIT + makedepends = rust + makedepends = cargo + depends = dbus + depends = gcc-libs + provides = surface-dtx-daemon + backup = etc/surface-dtx/surface-dtx-daemon.conf + backup = etc/surface-dtx/surface-dtx-userd.conf + backup = etc/surface-dtx/detach.sh + backup = etc/surface-dtx/attach.sh + source = surface-dtx-daemon::git+https://github.com/qzed/linux-surface-dtx-daemon.git#tag=v0.1.3 + sha256sums = SKIP + +pkgname = surface-dtx-daemon + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..be3bd5f15eb2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg +src +surface-dtx-daemon +*.tar.* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c0a37aeec3c0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: Maximilian Luz <luzmaximilian@gmail.com> + +pkgname="surface-dtx-daemon" +pkgver=0.1.3 +pkgrel=1 +pkgdesc="Surface Detachment System (DTX) Daemon" +url="https://github.com/qzed/linux-surface-dtx-daemon" +license=('MIT') +arch=('x86_64') +depends=('dbus' 'gcc-libs') +makedepends=('rust' 'cargo') +provides=('surface-dtx-daemon') +install=surface-dtx-daemon.install + +source=( + "${pkgname}::git+https://github.com/qzed/linux-surface-dtx-daemon.git#tag=v${pkgver}" +) + +sha256sums=( + 'SKIP' +) + +backup=( + 'etc/surface-dtx/surface-dtx-daemon.conf' + 'etc/surface-dtx/surface-dtx-userd.conf' + 'etc/surface-dtx/detach.sh' + 'etc/surface-dtx/attach.sh' +) + +build() { + cd "${pkgname}" + env CARGO_TARGET_DIR="$PWD/target" CARGO_INCREMENTAL=0 cargo build --release --locked + strip --strip-all "target/release/surface-dtx-daemon" + strip --strip-all "target/release/surface-dtx-userd" +} + +package() { + cd "${pkgname}" + + # binary files + install -D -m755 "target/release/surface-dtx-daemon" "$pkgdir/usr/bin/surface-dtx-daemon" + install -D -m755 "target/release/surface-dtx-userd" "$pkgdir/usr/bin/surface-dtx-userd" + + # application files + install -D -m644 "etc/dtx/surface-dtx-daemon.conf" "$pkgdir/etc/surface-dtx/surface-dtx-daemon.conf" + install -D -m644 "etc/dtx/surface-dtx-userd.conf" "$pkgdir/etc/surface-dtx/surface-dtx-userd.conf" + install -D -m755 "etc/dtx/attach.sh" "$pkgdir/etc/surface-dtx/attach.sh" + install -D -m755 "etc/dtx/detach.sh" "$pkgdir/etc/surface-dtx/detach.sh" + + # systemd service files + install -D -m644 "etc/systemd/surface-dtx-daemon.service" "$pkgdir/usr/lib/systemd/system/surface-dtx-daemon.service" + install -D -m644 "etc/systemd/surface-dtx-userd.service" "$pkgdir/usr/lib/systemd/user/surface-dtx-userd.service" + + # dbus config file + install -D -m644 "etc/dbus/org.surface.dtx.conf" "$pkgdir/etc/dbus-1/system.d/org.surface.dtx.conf" + + # udev rules + install -D -m644 "etc/udev/40-surface_dtx.rules" "$pkgdir/etc/udev/rules.d/40-surface_dtx.rules" + + # completion files + install -D -m644 "target/surface-dtx-daemon.bash" "$pkgdir/usr/share/bash-completion/completions/surface-dtx-daemon" + install -D -m644 "target/surface-dtx-userd.bash" "$pkgdir/usr/share/bash-completion/completions/surface-dtx-userd" + + install -D -m644 "target/_surface-dtx-daemon" "$pkgdir/usr/share/zsh/site-functions/_surface-dtx-daemon" + install -D -m644 "target/_surface-dtx-userd" "$pkgdir/usr/share/zsh/site-functions/_surface-dtx-userd" + + install -D -m644 "target/surface-dtx-daemon.fish" "$pkgdir/usr/share/fish/completions/surface-dtx-daemon.fish" + install -D -m644 "target/surface-dtx-userd.fish" "$pkgdir/usr/share/fish/completions/surface-dtx-userd.fish" + + # license + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/surface-dtx-daemon/LICENSE" +} diff --git a/surface-dtx-daemon.install b/surface-dtx-daemon.install new file mode 100644 index 000000000000..d51b0c84b563 --- /dev/null +++ b/surface-dtx-daemon.install @@ -0,0 +1,7 @@ +post_install() { + echo ">> <<" + echo ">> Don't forget to start/enable the systemd services via: <<" + echo ">> systemctl enable surface-dtx-daemon.service <<" + echo ">> systemctl enable --user surface-dtx-userd.service <<" + echo ">> <<" +}
\ No newline at end of file |