summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikołaj "D1SoveR" Banasik2020-02-24 23:13:03 +0000
committerMikołaj "D1SoveR" Banasik2020-02-24 23:13:03 +0000
commit4a1f2136247d9a6640c42e5f2b77921132898818 (patch)
treec9f5af3e61af9b4cfd1413933e3e3a17633120a4
downloadaur-4a1f2136247d9a6640c42e5f2b77921132898818.tar.gz
Initial version of the package.
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD50
-rw-r--r--reproducible-build.patch20
-rw-r--r--size-optimisations.patch13
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a231fae4e889
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = luxtorpeda-git
+ pkgdesc = Steam Play compatibility tool to run games using native Linux engines
+ pkgver = 0.1.0.r143.e770a4f
+ pkgrel = 1
+ url = https://luxtorpeda.gitlab.io/
+ arch = x86_64
+ arch = i686
+ license = GPL2
+ makedepends = git
+ makedepends = rust
+ depends = openssl
+ depends = xz
+ optdepends = steam: The Steam client
+ provides = luxtorpeda
+ conflicts = luxtorpeda
+ source = git+https://github.com/dreamer/luxtorpeda.git
+ source = size-optimisations.patch
+ source = reproducible-build.patch
+ sha256sums = SKIP
+ sha256sums = 6161875cd2fb3d98881c323872f74c8fbc730287273c0d4574fd1ac1f67388db
+ sha256sums = e97cf95dedcf60c97edb3a693052964e4ce6da795631ca5c9f04182462f67895
+
+pkgname = luxtorpeda-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2a9cb04de9d0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Mikołaj "D1SoveR" Banasik <d1sover@gmail.com>
+pkgname='luxtorpeda-git'
+pkgver=0.1.0.r143.e770a4f
+pkgrel=1
+pkgdesc='Steam Play compatibility tool to run games using native Linux engines'
+arch=('x86_64' 'i686')
+url='https://luxtorpeda.gitlab.io/'
+license=('GPL2')
+depends=('openssl' 'xz')
+makedepends=('git' 'rust')
+optdepends=('steam: The Steam client')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+
+source=('git+https://github.com/dreamer/luxtorpeda.git'
+ 'size-optimisations.patch'
+ 'reproducible-build.patch')
+sha256sums=('SKIP'
+ '6161875cd2fb3d98881c323872f74c8fbc730287273c0d4574fd1ac1f67388db'
+ 'e97cf95dedcf60c97edb3a693052964e4ce6da795631ca5c9f04182462f67895')
+
+pkgver() {
+ cd "${pkgname%-git}"
+ local base="$(grep -oP '(?<=^version = ")[^"]+(?="$)' Cargo.toml)"
+ local revision_count="$(git rev-list --count HEAD)"
+ local revision_commit="$(git rev-parse --short HEAD)"
+ echo "$base.r$revision_count.$revision_commit"
+}
+
+prepare() {
+ cd "${pkgname%-git}"
+ patch -Np1 -i "$srcdir/reproducible-build.patch"
+ patch -Np1 -i "$srcdir/size-optimisations.patch"
+}
+
+build() {
+ cd "${pkgname%-git}"
+ mkdir -p "target/release"
+ make luxtorpeda
+}
+
+check() {
+ cd "${pkgname%-git}"
+ make test
+}
+
+package() {
+ cd "${pkgname%-git}"
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+}
diff --git a/reproducible-build.patch b/reproducible-build.patch
new file mode 100644
index 000000000000..1ec6caeec3ea
--- /dev/null
+++ b/reproducible-build.patch
@@ -0,0 +1,20 @@
+diff --git a/Makefile b/Makefile
+index 475c85b..2800d44 100644
+--- a/Makefile
++++ b/Makefile
+@@ -37,13 +37,13 @@ build:
+ cargo build
+
+ release:
+- cargo build --release
++ cargo build --release --locked
+
+ lint:
+ cargo clippy -- -D warnings
+
+ test:
+- cargo test
++ cargo test --release --locked
+
+ clean:
+ cargo clean
diff --git a/size-optimisations.patch b/size-optimisations.patch
new file mode 100644
index 000000000000..d855538b9422
--- /dev/null
+++ b/size-optimisations.patch
@@ -0,0 +1,13 @@
+diff --git a/Cargo.toml b/Cargo.toml
+index 82216f5..1a056fe 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -20,3 +20,8 @@ users = "0.9"
+ xdg = "^2.1"
+ tar = "0.4"
+ xz2 = "0.1"
++
++[profile.release]
++panic = 'abort'
++opt-level = 'z'
++lto = true