summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3ecd117860a2a58d6b846a676abc7c4deaedddd5 (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
# Maintainer: Luis Aranguren <pizzaman@hotmail.com>
# Contributor: Jiabao Lin <me at leolin dot cn>
# Contributor: Jan-Erik Rediger <badboy at archlinux dot us>
# Contributor: Alexander Baldeck <lex@tentriplenine.com>

pkgname=charles
pkgver=4.5.6
pkgrel=1
pkgdesc="Web debugging proxy application"
arch=(any)
url="http://www.charlesproxy.com"
license=('custom' 'custom:bounce' 'APACHE')
depends=('java-runtime>=8' 'hicolor-icon-theme')
source=(http://www.charlesproxy.com/assets/release/${pkgver}/charles-proxy-${pkgver}_amd64.tar.gz)
md5sums=('b7dd7490ee1c9dc36e858f68e7ec5b23')

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

package() {
  cd "$srcdir/$pkgname"

  install -D -m755 ${srcdir}/${pkgname}/bin/charles \
    ${pkgdir}/usr/bin/charles

  for fn in ${srcdir}/${pkgname}/lib/*.jar; do
    install -D -m644 ${fn} \
      ${pkgdir}/usr/share/java/${pkgname}/$(basename ${fn})
  done

  for dim in 16x16  32x32  64x64  128x128  256x256  512x512; do
    install -D -m644 ${srcdir}/${pkgname}/icon/${dim}/apps/charles-proxy.png \
      ${pkgdir}/usr/share/icons/hicolor/${dim}/apps/charles.png
    for mimetype in application-har+json.png application-vnd.tcpdump.pcap.png application-x-charles-savedsession.png application-x-charles-trace.png; do
      install -D -m644 ${srcdir}/${pkgname}/icon/${dim}/mimetypes/$mimetype \
        ${pkgdir}/usr/share/icons/hicolor/${dim}/mimetypes/$mimetype
    done
  done
  install -D -m644 ${srcdir}/${pkgname}/icon/128x128/apps/charles-proxy.png \
    ${pkgdir}/usr/share/icons/charles128.png

  install -D -m644 ${srcdir}/${pkgname}/doc/licenses/bounce-license.txt \
    ${pkgdir}/usr/share/licenses/${pkgname}/bounce-license.txt
  install -D -m644 ${srcdir}/${pkgname}/etc/charles-proxy.desktop \
    ${pkgdir}/usr/share/applications/charles-proxy.desktop

  sed -i 's/Icon=\.\..\+/Icon=charles/' ${pkgdir}/usr/share/applications/charles-proxy.desktop
}

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