summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsger Hautop Drewsen2024-01-04 20:27:09 +0100
committerAsger Hautop Drewsen2024-01-04 20:27:09 +0100
commit74fa410b24df724d43a3621fef86a13e674f7085 (patch)
treea86f0d1937fd380ee99c09379338cc015428d56b
downloadaur-ape-bin.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD29
-rw-r--r--ape-binfmt.conf2
-rw-r--r--ape.install7
4 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1cdc7558f301
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = ape-bin
+ pkgdesc = actually portable executable loader
+ pkgver = 1.10
+ pkgrel = 1
+ url = https://justine.lol/cosmopolitan/index.html
+ install = ape.install
+ arch = x86_64
+ arch = aarch64
+ license = ISC
+ source = https://cosmo.zip/pub/cosmocc/cosmocc-3.2.zip
+ source = ape-binfmt.conf
+ sha512sums = 16da1ed606948830900b0a04fd78eee0e6608f8ce4fc03b37f64f13e62db297d668c961a93d3ecd3d1135972f6d071c54fa9d600d2b8a5bd4542726ec80fc609
+ sha512sums = 4574caf236235ce327341dc4e6b2ef4b001ffb2086b156fd72b80c99733186473f2e07dd1fc605206f1ee8a0d03d5deca8d9b2f72fca44e08762548ea6efff96
+
+pkgname = ape-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6d395d850b36
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Asger Hautop Drewsen <asger@tyilo.com>
+
+pkgname=ape-bin
+_cosmocc_version=3.2
+pkgver=1.10
+pkgrel=1
+pkgdesc="actually portable executable loader"
+arch=('x86_64' 'aarch64')
+url="https://justine.lol/cosmopolitan/index.html"
+license=('ISC')
+depends=()
+makedepends=()
+source=(
+ "https://cosmo.zip/pub/cosmocc/cosmocc-${_cosmocc_version}.zip"
+ "ape-binfmt.conf"
+)
+sha512sums=('16da1ed606948830900b0a04fd78eee0e6608f8ce4fc03b37f64f13e62db297d668c961a93d3ecd3d1135972f6d071c54fa9d600d2b8a5bd4542726ec80fc609'
+ '4574caf236235ce327341dc4e6b2ef4b001ffb2086b156fd72b80c99733186473f2e07dd1fc605206f1ee8a0d03d5deca8d9b2f72fca44e08762548ea6efff96')
+install=ape.install
+
+pkgver() {
+ "$srcdir/bin/ape-$CARCH.elf" -h | sed -nE 's/.*version (.*).*/\1/p'
+}
+
+package() {
+ install -D -m755 "$srcdir/bin/ape-$CARCH.elf" "$pkgdir/usr/bin/ape"
+ # Make sure the config filename sorts lexicographically greater than "wine.conf"
+ install -D -m644 "$srcdir/ape-binfmt.conf" "$pkgdir/usr/lib/binfmt.d/zzz_ape.conf"
+}
diff --git a/ape-binfmt.conf b/ape-binfmt.conf
new file mode 100644
index 000000000000..ac59e8043777
--- /dev/null
+++ b/ape-binfmt.conf
@@ -0,0 +1,2 @@
+:APE:M::MZqFpD::/usr/bin/ape:
+:APE-jart:M::jartsr::/usr/bin/ape:
diff --git a/ape.install b/ape.install
new file mode 100644
index 000000000000..c5c61e12b225
--- /dev/null
+++ b/ape.install
@@ -0,0 +1,7 @@
+post_install() {
+ echo "Run 'systemctl restart systemd-binfmt' in order to make the ape binfmt available on your system."
+}
+
+post_remove() {
+ echo "binfmt binary formats will be updated at reboot"
+}