summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 06f859274f881a46c6f418fbe291fa621426ca01 (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
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Eivind Eide <xenofil AT gmail DOT com>
# Contributor: Alexander F Rødseth <xyproto AT archlinux DOT org>
# Contributor: Maxime Gauduin <alucryd AT gmail DOT com>
# Contributor: Dave Reisner <dreisner AT archlinux DOT org>
# Contributor: Alexander Fehr <pizzapunk AT gmail DOT com>

pkgname=rubyripper
pkgver=0.8.0rc3
pkgrel=7
pkgdesc="Secure audiodisc ripper"
arch=(any)
url="https://github.com/bleskodev/rubyripper"
license=(GPL-3.0-only)
depends=(cdparanoia ruby ruby-rexml ruby-gettext ruby-gtk3)
checkdepends=(ruby-rspec) #ruby-cucumber
optdepends=('cd-discid: Gnudb support'
            'lame: MP3 encoding support'
            'vorbis-tools: Ogg Vorbis encoding support'
            'flac: FLAC encoding support'
            'wavegain: WAV ReplayGain support'
            'mp3gain: MP3 ReplayGain support'
            'vorbisgain: Ogg Vorbis ReplayGain support'
            'aacgain-cvs: AAC ReplayGain support'
            'normalize: Normalization support'
            'cdrdao: Advanced TOC analysis'
            'sox: Correct pre-emphasis with sox'
            'wavpack: WavPack encoding and ReplayGain support'
            'opus-tools: Opus encoding support'
            'neroaacenc-bin: Nero AAC encoding support')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
        "rubyripper_Update_code_to_remove_File.exists?_method_usage.patch::https://github.com/bleskodev/rubyripper/commit/0b8dcede2822b95dbb8a0bc94c19a941b910be23.patch")
sha256sums=('f109ed5455f5a616cbd392c2a71efd59ffa2d207c3c3c3ad41873e20430b80c0'
            'c46a4c3c975f05f18008b52679d6d077c51c007dd8966517b3553e2ffda4d458')

prepare() {
  cd "${pkgname}-${pkgver}"
  # fix https://github.com/bleskodev/rubyripper/issues/639 https://github.com/bleskodev/rubyripper/issues/646
  patch -Np1 -i ../rubyripper_Update_code_to_remove_File.exists?_method_usage.patch
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure \
    --prefix=/usr \
    --enable-cli \
    --enable-gtk3 \
    --enable-lang-all \
    --ruby="$(ruby -e 'v = RbConfig::CONFIG["vendorlibdir"] ; v["/usr"] = ""; puts v')"
}

check() {
  cd "${pkgname}-${pkgver}"
  rspec
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  ln -s /usr/bin/rrip_cli ${pkgdir}/usr/bin/rubyripper
}