summaryrefslogtreecommitdiff
path: root/pcr/mozilla-addon-sdk/PKGBUILD
blob: 65c998b9a25eb0828be2716df19bd035b3e09e21 (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
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor (AUR): Johannes Dewender <arch@JonnyJD.net>
# Contributor (AUR): trashstar

_pkgname=addon-sdk
pkgname=mozilla-addon-sdk
pkgver=1.16
pkgdesc="SDK to build add-ons for Mozilla products (formerly jetpack)"
url="https://developer.mozilla.org/en-US/Add-ons/SDK"
license=('MPL2')

pkgrel=1
arch=('any')
depends=('python2')

source=("https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/${_pkgname}-${pkgver}.tar.gz")
md5sums=('08388bee155b5f950b4c0fe2ed8dfccf')

prepare() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
  grep -rl python . | xargs sed -ri \
    -e 's/^(#!.*|\s*)python(\s|$)/\1python2\2/' \
    -e 's/(\$ |`)python /python2 /' \
    -e 's/python -m/python2 -m/'
}

package() {
  install -d "${pkgdir}/opt" "$pkgdir/usr/bin"
  cp -r "${srcdir}/${_pkgname}-${pkgver}" "${pkgdir}/opt/${pkgname}"
  ln -srT "$pkgdir/opt/${pkgname}/bin/cfx" "$pkgdir/usr/bin/cfx"
}

# vim:set ts=2 sw=2 et: