summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11afb0f36a81062b3c9f864e15465f8eec50df13 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Maintainer: Gimmeapill <gimmeapill at gmail.com>
# Contributor: Boohbah <boohbah at gmail.com>
# Contributor: SpepS <dreamspepser at yahoo.it>
# Contributor: Bernardo Barros <bernardobarros at gmail.com>
# Contributor: Uli Armbruster <uli_armbruster at web.de>
# Contributor: Christopher Arndt <aur at chrisarndt.de>

pkgname=ardour-git
pkgver=6.3.r55.ga4b1277f85
pkgrel=1
pkgdesc="A multichannel hard disk recorder and digital audio workstation (git version)"
arch=('x86_64')
url="https://ardour.org/"
license=('GPL2')
groups=('pro-audio')
depends=('atkmm' 'cairo' 'cairomm' 'fontconfig' 'gdk-pixbuf2' 'gcc-libs'
         'glibc' 'glibmm' 'gtkmm' 'libx11' 'libxml2' 'pangomm' 'soundtouch'
         'taglib')
makedepends=('atk' 'aubio' 'boost' 'cppunit' 'curl' 'cwiid' 'dbus' 'doxygen'
             'fftw' 'flac' 'fluidsynth' 'freetype2' 'git' 'glib2' 'graphviz'
             'gtk2' 'harfbuzz' 'itstool' 'libarchive' 'liblo' 'liblrdf'
             'libltc' 'libogg' 'libpulse' 'libsamplerate' 'libsndfile'
             'libusb' 'libwebsockets' 'lilv' 'lv2' 'pango' 'readline'
             'rubberband' 'serd' 'sord' 'sratom' 'suil' 'vamp-plugin-sdk')
optdepends=('cwiid: Wiimote control support'
            'harvid: video timeline'
            'libwebsockets: WebSockets control support'
            'non-session-manager: for session management'
            'xjadeo: video monitoring')
provides=('ardour')
conflicts=('ardour')
source=("${pkgname%-*}::git+https://github.com/Ardour/ardour.git"
        'ardour-6.2-vendor_qm-dsp.patch')
sha256sums=('SKIP'
            'e937d80e05fd2955b537b617793c06df23804406b5af7283821ad654fa646635')

pkgver() {
  cd "${srcdir}/${pkgname%-*}"
  git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd "${srcdir}/${pkgname%-*}"

  # using vendored version of qm-dsp because qm-dsp >= 1.8.0 is not compatible
  patch -Np1 -i "${srcdir}/ardour-6.2-vendor_qm-dsp.patch"

  #~# Set icon for .adour files
  #~patch -Np1 -i "${srcdir}/ardour-mime-icon.patch"

  # https://bugs.archlinux.org/task/54389
  sed -e '8iexport GTK2_RC_FILES=/dev/null' -i gtk2_ardour/ardour.sh.in
}

build() {
  cd "${srcdir}/${pkgname%-*}"

  python waf configure  --prefix=/usr \
                        --configdir=/etc \
                        --cxx11 \
                        --freedesktop \
                        --libjack=weak \
                        --nls \
                        --no-phone-home \
                        --optimize \
                        --ptformat \
                        --use-external-libs \
                        --with-backends=alsa,dummy,jack,pulseaudio

  python waf build $MAKEFLAGS
}

package() {
  depends+=('libFLAC.so' 'libasound.so' 'libatk-1.0.so' 'libaubio.so'
            'libarchive.so' 'libcurl.so' 'libdbus-1.so' 'libfftw3f.so'
            'libfftw3f_threads.so' 'libfluidsynth.so' 'libfreetype.so'
            'libgdk-x11-2.0.so' 'libgio-2.0.so' 'libglib-2.0.so'
            'libgobject-2.0.so' 'libgtk-x11-2.0.so' 'libharfbuzz.so'
            'liblo.so' 'liblilv-0.so' 'liblrdf.so' 'libltc.so' 'libogg.so'
            'libpango-1.0.so' 'libpangocairo-1.0.so' 'libpangoft2-1.0.so'
            'libpulse.so' 'libreadline.so' 'librubberband.so'
            'libsamplerate.so' 'libserd-0.so' 'libsndfile.so' 'libsord-0.so'
            'libsratom-0.so' 'libsuil-0.so' 'libusb-1.0.so'
            'libvamp-hostsdk.so' 'libvamp-sdk.so')

  cd "${srcdir}/${pkgname%-*}"

  python waf --destdir="${pkgdir}" i18n
  python waf --destdir="${pkgdir}" install

  # XDG integration
  # File types
  install -vDm 644 "build/gtk2_${pkgname%-*}/${pkgname%-*}.xml" \
    -t "${pkgdir}/usr/share/mime/packages/"
  # Install freedesktop.org compatible application starter desktop file
  install -vDm644 "build/gtk2_${pkgname%-*}/${pkgname%-*}${pkgver%%.*}.desktop" \
    "${pkgdir}/usr/share/applications/ardour.desktop"
  # Icons
  for size in 16 22 32 48; do
    install -vdm 755 "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/mimetypes"
    ln -sf "/usr/share/ardour6/icons/application-x-ardour_${size}px.png" \
      "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/mimetypes/application-x-ardour.png"
  done
  for size in 16 22 32 48 256 512; do
    install -vdm 755 "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps"
    ln -sf "/usr/share/ardour6/resources/Ardour-icon_${size}px.png" \
      "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname%-*}${pkgver%%.*}.png"
  done
  # man pages
  install -vDm 644 "${pkgname%-*}.1"* -t "${pkgdir}/usr/share/man/man1/"
}