summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0c2059c0dbc3a0c4103e972333deee3057757d4e (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: Daniel Appelt <daniel.appelt@gmail.com>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>

_reponame=OsirisEdit
_pkgname="${_reponame,,}"
pkgname="${_pkgname}"
pkgver=1.1.0
pkgrel=1
pkgdesc="A wavetable editor for the Osiris Eurorack synthesizer module."
arch=('x86_64')
url="https://www.modbap.com/pages/osirisedit"
license=('GPL3')
depends=('gtk2' 'jansson' 'libsamplerate' 'libsndfile' 'sdl2')
makedepends=('git')
groups=('pro-audio')
source=("${_pkgname}::git+https://github.com/switchupcb/${_reponame}#tag=v${pkgver}"
        'imgui::git+https://github.com/AndrewBelt/imgui.git#commit=cfb1dd6'
        'lodepng::git+https://github.com/lvandeve/lodepng#commit=8a0f16a'
        'osdialog::git+https://github.com/AndrewBelt/osdialog#commit=e66caf0'
        'pffft::git+https://github.com/marton78/pffft#commit=c5062dc'
        'osirisedit-makefile-flags.patch')
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         '8b573b67aae5cf0375eede9d85356aef')

prepare() {
  cd "${srcdir}/${_pkgname}"

  git submodule add -f "${srcdir}/imgui" ext/imgui
  git submodule add -f "${srcdir}/lodepng" ext/lodepng
  git submodule add -f "${srcdir}/osdialog" ext/osdialog
  git submodule add -f "${srcdir}/pffft" ext/pffft
  
  git submodule init
  git submodule update

  # Fix include and library paths for Linux using system libs
  patch -p1 -N -r - -i "${srcdir}"/osirisedit-makefile-flags.patch
  # Patch source for where OsirisEdit looks for images
  sed -i -E -e 's|([-a-z]+\.png)|/usr/share/'${_pkgname}'/images/\1|' src/ui.cpp
  # Patch source for where OsirisEdit looks for fonts
  sed -i -e 's|"fonts/|"/usr/share/'${_pkgname}'/fonts/|' src/ui.cpp
  # Patch source for where OsirisEdit looks for the manual PDF
  sed -i -e 's|"manual\.pdf"|"/usr/share/doc/'${_pkgname}'/manual.pdf"|' src/ui.cpp
}

build() {
  cd "${srcdir}/${_pkgname}"
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -vDm 755 OsirisEdit -t "${pkgdir}"/usr/bin
  install -vDm 644 logo-*.png -t "${pkgdir}"/usr/share/${_pkgname}/images
  install -vDm 644 fonts/*.ttf -t "${pkgdir}"/usr/share/${_pkgname}/fonts
  ln -sf OsirisEdit "${pkgdir}"/usr/bin/osirisedit

  install -vDm644 doc/*.{html,pdf,woff} -t "${pkgdir}/usr/share/doc/${_pkgname}"
  install -vDm644 doc/images/*.png -t "${pkgdir}/usr/share/doc/${_pkgname}/images"
  # used by manual.html, but not really important
  #install -vDm644 doc/Montserrat/*.ttf -t "${pkgdir}/usr/share/doc/${_pkgname}/Montserrat"
}