summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dabf96bdb3ed49544aae38776e592ae3f3655b7e (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
# Maintainer: Tim Yang <protonmail = timdyang>

pkgname=circos
pkgver=0.69_9
pkgrel=1
pkgdesc="A software package for visualizing data in a circular layout"
arch=(any)
url=http://circos.ca
license=(GPL)
depends=(
  perl-carp
  perl-clone
  perl-config-general
  perl-data-dumper
  perl-digest-md5
  perl-file-temp
  perl-font-ttf
  perl-gd
  perl-getopt-long
  perl-list-moreutils
  perl-math-bezier
  perl-math-round
  perl-math-complex
  perl-math-vecstat
  perl-memoize
  perl-params-validate
  perl-pod-usage
  perl-readonly
  perl-regexp-common
  perl-set-intspan
  perl-statistics-basic
  perl-storable
  perl-svg
  perl-text-balanced
  perl-text-format
  perl-time-hires
)
optdepends=('circos-docs: tutorials'
            'circos-tools: addons')
source=(http://$pkgname.ca/distribution/$pkgname-${pkgver/_/-}.tgz)
noextract=($pkgname-${pkgver/_/-}.tgz)
sha256sums=(34d8d7ebebf3f553d62820f8f4a0a57814b610341f836b4740c46c3057f789d2)

package() {
  # dist
  bsdtar -xf $pkgname-${pkgver/_/-}.tgz -C "$pkgdir" \
    -s ":^$pkgname-${pkgver/_/-}:opt/$pkgname:" \
    $pkgname-${pkgver/_/-}/{bin,data,error,etc,fonts,lib,tiles}

  # docs
  bsdtar -xf $pkgname-${pkgver/_/-}.tgz -C "$pkgdir" \
    -s ":^$pkgname-${pkgver/_/-}:usr/share/doc/$pkgname:" \
    $pkgname-${pkgver/_/-}/{example,README,CITATION}

  # sanitize
  rm -f "$pkgdir"/opt/$pkgname/bin/{$pkgname.exe,compile.{bat,make}}
  # find "$pkgdir" -exec sh -c \
    # "file '{}' | grep -qE 'ELF|executable|directory' && chmod 755 '{}' || chmod 644 '{}'" \;
  find "$pkgdir" -exec sh -c "ls -Fd '{}' | grep -q '.*[/\*]$' && chmod 755 '{}' || chmod 644 '{}'" \;
  chown -R root:root "$pkgdir"

  # symlinks
  install -m 755 -d "$pkgdir"/usr/bin/
  ln -sf /opt/$pkgname/bin/$pkgname "$pkgdir"/usr/bin/
  ln -sf /opt/$pkgname/bin/gddiag "$pkgdir"/usr/bin/
}