diff options
author | NBonaparte | 2017-12-31 14:44:10 -0800 |
---|---|---|
committer | NBonaparte | 2017-12-31 14:44:10 -0800 |
commit | 29d8177f6ac98a8145599b0c7b17b926c2659607 (patch) | |
tree | 65d3a39b8ba6feb2415f2ed51b0d84da2be8da01 | |
download | aur-29d8177f6ac98a8145599b0c7b17b926c2659607.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | lib.patch | 42 |
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c21680d6e1a4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = libhashab-git + pkgdesc = libgpod extension to make it talk to iPod nano 6th generation + pkgver = r8.9a2dcf8 + pkgrel = 1 + url = https://github.com/denydias/libhashab + arch = i686 + arch = x86_64 + license = unknown + license = GPL + makedepends = git + depends = libgpod + source = git://github.com/denydias/libhashab.git + source = lib.patch + md5sums = SKIP + md5sums = 7d5be1e8b685cd1e1c645da5c7c2ffe4 + +pkgname = libhashab-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..151f9d15846f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +pkgname=libhashab-git +_pkgname=libhashab +pkgver=r8.9a2dcf8 +pkgrel=1 +pkgdesc="libgpod extension to make it talk to iPod nano 6th generation" +arch=("i686" "x86_64") +url="https://github.com/denydias/libhashab" +license=("unknown" "GPL") +depends=("libgpod") +makedepends=("git") +source=("git://github.com/denydias/libhashab.git" + "lib.patch") +md5sums=("SKIP" + "7d5be1e8b685cd1e1c645da5c7c2ffe4") + +pkgver() { + cd $_pkgname + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd $_pkgname + patch -p1 -i "$srcdir/lib.patch" + cd src + make +} + +package() { + cd $_pkgname + install -D -m777 "src/libhashab.so" "${pkgdir}/usr/lib/libgpod" + install -D -m777 "src/libhashab32_wrapper" "${pkgdir}/usr/lib/libgpod" + install -D -m777 "libhashab32.so" "${pkgdir}/usr/lib/libgpod" +} diff --git a/lib.patch b/lib.patch new file mode 100644 index 000000000000..42898ec8e70e --- /dev/null +++ b/lib.patch @@ -0,0 +1,42 @@ +commit f46f2e9349a7345d3dcb366b71dfc89dfcc8b608 +Author: NBonaparte <nbonaparte@protonmail.com> +Date: Sat Dec 30 23:48:53 2017 -0800 + + fix lib location for Arch + +diff --git a/src/libhashab.c b/src/libhashab.c +index 6d9df83..3da4315 100644 +--- a/src/libhashab.c ++++ b/src/libhashab.c +@@ -39,7 +39,7 @@ int calcHashAB(unsigned char HashAB[57], unsigned char Sha1[20], unsigned char U + memset(HashAB, 0, 57); + + /* The command header */ +- sprintf(CmdLine, "linux32 /usr/lib/x86_64-linux-gnu/libgpod/libhashab32_wrapper \""); ++ sprintf(CmdLine, "linux32 /usr/lib/libgpod/libhashab32_wrapper \""); + + /* Print the Sha1 Data */ + for(a = 0; a < 20; a++) { +diff --git a/src/libhashab32_wrapper.c b/src/libhashab32_wrapper.c +index 0356bc7..8c76aed 100644 +--- a/src/libhashab32_wrapper.c ++++ b/src/libhashab32_wrapper.c +@@ -39,15 +39,15 @@ int main(int argc, char *argv[]) { + unsigned char Random[23]; + unsigned char HashAB[57]; + unsigned char TempVar[3]; +- +- /* Clear the data arrays to 0 */ ++ ++ /* Clear the data arrays to 0 */ + memset(Sha1, 0, 20); + memset(UUID, 0, 20); + memset(Random, 0, 23); + memset(HashAB, 0, 57); + + /* Try to open the modified shared library */ +- lib_handle = dlopen("/usr/lib/x86_64-linux-gnu/libgpod/libhashab32.so", RTLD_LAZY); ++ lib_handle = dlopen("/usr/lib/libgpod/libhashab32.so", RTLD_LAZY); + + /* If the library failed to open */ + if (!lib_handle) { |