summaryrefslogtreecommitdiffstats
path: root/abs/extra/aacskeys/PKGBUILD
blob: 977aef5c0e2289dc977d78340cdb54e0a4fdb2fd (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
# Submitter: Paul Burton <paulburton89@gmail.com>
# Maintainer: Zebulon <zeb@zebulon.org.uk>
pkgname=aacskeys
pkgver="0.4.0e"
pkgrel=2
pkgdesc="A library and program to retrieve decryption keys for HD discs"
arch=('i686' 'x86_64')
url="http://forum.doom9.org/showthread.php?t=123311"
license=('custom')
depends=('openssl')
makedepends=('java-environment' 'premake')
source=(http://debian-multimedia.org/pool/main/a/aacskeys/${pkgname}_0.4.0e.orig.tar.gz
	http://deb-multimedia.org/pool/main/a/aacskeys/aacskeys_0.4.0e-dmo2.diff.gz)
sha1sums=('8790f0d4098d6bc83304ad2136cc9681374df83a'
	  '325504f38a5ac1e9f7be740a602faa2c8d4b812c')

build() {

  cd "${srcdir}/$pkgname-$pkgver"
  patch -Np1 -i ../${pkgname}_$pkgver-dmo2.diff

  # Paranoia: remove binaries, make sure they aren't used
   rm -rf bin lib

  # If java-environement is installed for the first time
  # we need to source profile to set JAVA_HOME
  # source /etc/profile

  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|$JAVA_HOME/include|" premake.lua
  
  make || return 1
}

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

  # Install lib
  mkdir -p ${pkgdir}/usr/lib
  cp lib/linux/libaacskeys.so ${pkgdir}/usr/lib/ || return 1

  # Install program
  mkdir -p ${pkgdir}/usr/bin
  cp bin/linux/aacskeys ${pkgdir}/usr/bin || return 1

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