summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dfcdd9d6856623f67207f9629fb599044d1c7981 (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
# Merged with official ABS kid3 PKGBUILD by João, 2021/08/25 (all respective contributors apply herein)
# Maintainer: João Figueiredo & chaotic-aur <islandc0der@chaotic.cx>

pkgbase=kid3-git
pkgname=(kid3-common-git kid3-qt-git kid3-git)
pkgver=3.9.5_r2875.gbe77d6ab
pkgrel=1
pkgdesc="An MP3, Ogg/Vorbis and FLAC tag editor"
arch=($CARCH)
url="https://kid3.kde.org/"
license=(GPL)
depends=(chromaprint flac id3lib kxmlgui5 libmp4v2 qt5-declarative qt5-multimedia taglib kio5)
makedepends=(git cmake-git docbook-xsl extra-cmake-modules-git kdoctools5 python qt5-tools)
source=("git+https://github.com/KDE/${pkgbase%-git}.git")
sha256sums=('SKIP')

pkgver() {
  cd ${pkgbase%-git}
  _major_ver="$(grep -m1 'set(CPACK_PACKAGE_VERSION_MAJOR' CMakeLists.txt | cut -d ' ' -f2 | tr -d ')')"
  _minor_ver="$(grep -m1 'set(CPACK_PACKAGE_VERSION_MINOR' CMakeLists.txt | cut -d ' ' -f2 | tr -d ')')"
  _patch_ver="$(grep -m1 'set(CPACK_PACKAGE_VERSION_PATCH' CMakeLists.txt | cut -d ' ' -f2 | tr -d ')')"
  echo "${_major_ver}.${_minor_ver}.${_patch_ver}_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}

build() {
  export CXXFLAGS+=' -DNDEBUG' # FS#69904
  cmake-git -B build -S ${pkgbase%-git} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DWITH_APPS="CLI;Qt;KDE" \
    -DWITH_MP4V2=ON \
    -DWITH_FFMPEG=ON \
    -DWITH_GSTREAMER=ON
  cmake-git --build build
}

package_kid3-common-git() {
  pkgdesc="An MP3, Ogg/Vorbis and FLAC tag editor, CLI version and common files"
  depends=(chromaprint flac id3lib libmp4v2 libvorbis qt5-base taglib)
  optdepends=('qt5-declarative: GUI support library'
              'qt5-multimedia: GUI support library')

  DESTDIR="$pkgdir" cmake-git --install build

  rm -r "$pkgdir"/usr/bin/kid3{,-qt} \
        "$pkgdir"/usr/share/{applications,icons,kxmlgui5,metainfo}
}

package_kid3-qt-git() {
  pkgdesc="An MP3, Ogg/Vorbis and FLAC tag editor, Qt version"
  depends=("kid3-common=$pkgver" qt5-declarative qt5-multimedia)

  DESTDIR="$pkgdir" cmake-git --install build/src/app/qt
}

package_kid3-git() {
  pkgdesc="An MP3, Ogg/Vorbis and FLAC tag editor, KDE version"
  depends=("kid3-common=$pkgver" kxmlgui-git qt5-declarative qt5-multimedia kio-git)

   DESTDIR="$pkgdir" cmake-git --install build/src/app

  rm -r "$pkgdir"/usr/bin/kid3-{cli,qt} \
        "$pkgdir"/usr/share/applications/org.kde.kid3-qt.desktop \
        "$pkgdir"/usr/share/icons/hicolor/*/apps/kid3-qt.{png,svg} \
        "$pkgdir"/usr/share/metainfo/org.kde.kid3-qt.appdata.xml
}