Commit 63ec6741 authored by TBK's avatar TBK Committed by Kevin Daudt

testing/amiitool: new aport

parent 554674f5
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=amiitool
pkgver=2
_pkgver=r2
pkgrel=0
pkgdesc="Reverse-engineered amiibo cryptography"
url="https://github.com/socram8888/amiitool"
arch="all"
license="MIT"
options="!check" # No test suite
makedepends="git mbedtls-dev" # git is used to pull head version
source="$pkgname-$_pkgver.tar.gz::https://github.com/socram8888/amiitool/archive/$_pkgver.tar.gz
fix-mbedtls_include.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
build() {
make prefix=/usr
}
package() {
make prefix=/usr DESTDIR="$pkgdir" install
}
sha512sums="28087a022a88ca604f610dff6f49f19f4c273d7787401a3e1dd998243ba4ca3628adb58bf9ea20e8e6c77cc021bedfeda8b632e0a50efe752eec543f20ef33d6 amiitool-r2.tar.gz
50bc13ff736c65b05b402e3dc1c3e61242271e9d311f5a60169263e2dd6ca5765dee6b1cde963e3a76980deaf29ee1e65991b9028f9c58c3a6402d959015993e fix-mbedtls_include.patch"
+++ a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@
bindir = $(exec_prefix)/bin
# mbed TLS libraries
-MBEDTLS_DIR = $(PWD)/mbedtls
+MBEDTLS_DIR = /usr/include/
MBEDTLS_CONFIG = $(PWD)/configs/mbedtls.h
MBEDTLS_CFLAGS = -DMBEDTLS_CONFIG_FILE='\"$(MBEDTLS_CONFIG)\"' $(CFLAGS)
@@ -39,7 +39,7 @@
# Default target: compile all programs
all: $(BINS)
-%: %.o $(LIBSOBJ) $(STATICLIBS)
+%: %.o $(LIBSOBJ)
$(CC) $(ALL_CFLAGS) $(LIBSOBJ) $< -o $@ $(LDFLAGS)
%.o: %.c $(HEADERS)
--- a/configs/mbedtls.h
+++ b/configs/mbedtls.h
@@ -24,6 +24,6 @@
#define MBEDTLS_HAVE_ASM
#define MBEDTLS_PLATFORM_C
-#include "mbedtls/check_config.h"
+#include <mbedtls/check_config.h>
#endif
--- a/amiibo.c
+++ b/amiibo.c
@@ -7,8 +7,8 @@
#include "nfc3d/amiibo.h"
#include "util.h"
-#include "mbedtls/md.h"
-#include "mbedtls/aes.h"
+#include <mbedtls/md.h>
+#include <mbedtls/aes.h>
#include <errno.h>
#include "portable_endian.h"
--- a/include/nfc3d/drbg.h
+++ b/include/nfc3d/drbg.h
@@ -10,7 +10,7 @@
#include <stdbool.h>
#include <stdint.h>
-#include "mbedtls/md.h"
+#include <mbedtls/md.h>
#define NFC3D_DRBG_MAX_SEED_SIZE 480 /* Hardcoded max size in 3DS NFC module */
#define NFC3D_DRBG_OUTPUT_SIZE 32 /* Every iteration generates 32 bytes */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment