summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2207f19bd49f5cb54255e350a552f95bc08e9d64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: LinRs <LinRs at users.noreply.github.com>
# Contribtor: Paul Burton <paulburton89@gmail.com>
# Contributor: Zebulon <zeb@zebulon.org.uk>
# Maintainer: Pablo Lezaeta <prflr88@gmail.com>

pkgname=aacskeys
pkgver="0.4.0f"
_origpkgver="0.4.0e"
_dmover="dmo7"
pkgrel=8
pkgdesc="A library and program to retrieve decryption keys for HD discs"
arch=("i686" "x86_64")
url="http://cyberside.net.ee/ripping/BD_DeviceKeys"
license=('custom:Public Domain')
depends=("openssl-1.0")
makedepends=("java-environment" "premake3")
source=("https://archive.deb-multimedia.org/pool/main/a/${pkgname}/${pkgname}_${_origpkgver}.orig.tar.gz"
	      "https://archive.deb-multimedia.org/pool/main/a/${pkgname}/${pkgname}_${_origpkgver}-${_dmover}.diff.gz"
        "aacskeys-0.4.0f.patch")
sha1sums=('8790f0d4098d6bc83304ad2136cc9681374df83a'
          '481c737983332a4a38aab0b292ba0cd958bb629c'
          'dca9a9cb6bdd4cf6c4f7cbef1be3556728166117')

prepare() {
  zcat ${pkgname}_${_origpkgver}-${_dmover}.diff.gz > ${srcdir}/${pkgname}_${_origpkgver}-${_dmover}.diff
  cd "${srcdir}/${pkgname}-${_origpkgver}"
  patch -Np1 -i "${srcdir}/${pkgname}_${_origpkgver}-${_dmover}.diff"
  patch -Np1 -i ../aacskeys-0.4.0f.patch

  # Make sure use resent premake
  sed -i 's|/usr/local/ssl/include|/usr/include|' premake.lua
  sed -i 's|/usr/local/ssl/lib|/usr/lib|' premake.lua
  sed -i "s|/usr/lib/jvm/java-6-sun/include|/usr/lib/jvm/$(archlinux-java get)/include|" premake.lua

  # Can't build with openssl 1.1 so use openssl-1.0 instead... a patch's welcome
  sed -i 's|OPENSSL_INCLUDE = "/usr/include"|OPENSSL_INCLUDE = "/usr/include/openssl-1.0"|' premake.lua
  sed -i 's|OPENSSL_LIB = "/usr/lib"|OPENSSL_LIB = "/usr/lib/openssl-1.0"|' premake.lua
  sed -i 's|/usr/local/ssl/include|/usr/include/openssl-1.0|' *.make
  sed -i 's|/usr/local/ssl/lib|/usr/lib/openssl-1.0|' *.make
}

build() {
  cd "${srcdir}/${pkgname}-${_origpkgver}"

  make
}

package() {
  cd "${srcdir}/${pkgname}-${_origpkgver}"

  # Install lib
  mkdir -p "${pkgdir}/usr/lib"
  mkdir -p "${pkgdir}/usr/share/dumphd/"
  cp -v "lib/linux/"*.so "${pkgdir}/usr/lib/"
  cp -v "${pkgdir}/usr/lib/libaacskeys.so" "${pkgdir}/usr/share/dumphd/libaacskeys.so"


  # Install program
  mkdir -p "${pkgdir}/usr/bin"
  cp -v "bin/linux/aacskeys" "${pkgdir}/usr/bin"

  # Install resources
  mkdir -p "${pkgdir}/usr/share/${pkgname}"
  cp -v ./debian/HostKeyCertificate_PS3.txt "${pkgdir}/usr/share/${pkgname}/HostKeyCertificate.txt"
  cp -v ./debian/ProcessingDeviceKeysSimple.txt "${pkgdir}/usr/share/${pkgname}/"

  # Author just say is public domain on upstream user forum thread once but later
  # 	it went MiA so no full license or ammend exist for the next maintainer
  #	who update it more and neither for the last one responsible of this version.
  #install -D -m644 "${srcdir}/license" "${pkgdir}/usr/share/licenses/${pkgbase}/license"
}