summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 84800eb005cde8562b2639baf05141bc525f5596 (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
# Maintainer: Clint Valentine <valentine.clint@gmail.com>

_pkg_ver=2.20.0
_pkg_build=422
_eula_ver=2-20
_guide_ver=15051736_v2

pkgname=bcl2fastq-bin
pkgver="${_pkg_ver}"."${_pkg_build}"
pkgrel=2
pkgdesc="Demultiplexes data and converts BCL files generated by Illumina sequencers to FASTQ for downstream analysis"
arch=('x86_64')
url=https://support.illumina.com/downloads/bcl2fastq-conversion-software-v"${_eula_ver}".html
license=('custom:illumina')
provides=('bcl2fastq')
conflicts=('bcl2fastq')
source=(
  https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v"${_pkg_ver//./-}"-linux-x86-64.zip
  https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v"${_eula_ver}"-eula.pdf
  https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq2_guide_"${_guide_ver}".pdf
)
sha256sums=(
  '3744bc1c02fff1dd17d18c8e8b8b2cc2405b37d7d248b8889f4f8a8fc220b434'
  '0a8236fad01c86f72d43247606c7f6c029cebdedf23f4bcb691367602bd061de'
  '72f27e701b9ff4af53d1754ae6d68de7d7bbec6c4e42467c6baeacdf48fb482a'
)

prepare() {
  echo 'Download of this software requires agreement with EULA at:'
  echo "https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v${_eula_ver}-eula.pdf"
}

build() {
  mkdir -p "${srcdir}"/"${pkgname}"-"${_pkg_ver}" && cd "$_"
  mv ../bcl2fastq2-v"${_pkg_ver}"."${_pkg_build}"-Linux-x86_64.rpm ./
  bsdtar -xf bcl2fastq2-v"${_pkg_ver}"."${_pkg_build}"-Linux-x86_64.rpm
}

package() {
  install -Dm644 \
    "${srcdir}"/bcl2fastq2-v"${_eula_ver}"-eula.pdf \
    "${pkgdir}"/usr/share/licenses/bcl2fastq/bcl2fastq2-v"${_eula_ver}"-eula.pdf

  install -Dm644 \
    "${srcdir}"/bcl2fastq2_guide_"${_guide_ver}".pdf \
    "${pkgdir}"/usr/share/doc/bcl2fastq/bcl2fastq2_guide_"${_guide_ver}".pdf

  cd "${srcdir}"/"${pkgname}"-"${_pkg_ver}"
  install -Dm644 usr/local/share/COPYRIGHT "${pkgdir}"/usr/share/licenses/bcl2fastq/COPYRIGHT
  install -Dm644 usr/local/share/Changes "${pkgdir}"/usr/share/licenses/bcl2fastq/Changes
  install -Dm755 usr/local/bin/bcl2fastq "${pkgdir}"/usr/bin/bcl2fastq
}