summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4102a2724babb2db49bb25454cdcca6c57e7fd5b (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Maintainer: Darvin Delgado <dnmodder at gmail dot com>

pkgname=('rom-properties' 'rom-properties-gtk' 'rom-properties-kde')
pkgbase=rom-properties
pkgdesc="Shell extension for displaying ROM and disc image metadata in file managers"
pkgver=2.4.1
pkgrel=2
arch=('x86_64')
url='https://github.com/GerbilSoft/rom-properties'
license=('GPL-2.0-or-later')
makedepends=(
    'cairo'
    'cmake'
    'extra-cmake-modules'
    'gdk-pixbuf2'
    'gettext'
    'glib2-devel'
    'gsound'
    'gtk3'
    'gtk4'
    'kcrash'
    'kio'
    'kfilemetadata'
    'kwidgetsaddons'
    'libnautilus-extension'
    'pkgconf'
    'python'
    'qt6-base'
    'qt6-tools'
    'tinyxml2'
)
source=("$pkgbase-$pkgver.tar.gz::https://github.com/GerbilSoft/rom-properties/archive/v$pkgver.tar.gz")
sha256sums=('a8db64378484560ebc935608d6ef0db78a0c81586a6967c1433d2043f2f24e34')
options=(!debug)


build() {
    cd "$pkgbase-$pkgver"

    mkdir -p build && cd build

    cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBEXECDIR=lib/$pkgname \
    -DCMAKE_BUILD_TYPE=Release \
    -DSPLIT_DEBUG=OFF \
    -DBUILD_KDE4=OFF \
    -DBUILD_KF5=OFF \
    -DBUILD_KF6=ON \
    -DBUILD_GTK3=ON \
    -DBUILD_GTK4=ON \
    -Wno-dev

    make
}


package_rom-properties() {
    depends=(
        'curl'
        'gcc-libs'
        'glibc'
        'libjpeg-turbo'
        'libpng'
        'libseccomp'
        'lz4'
        'lzo'
        'nettle'
        'tinyxml2'
        'zlib'
    )
    optdepends=(
        'zstd: Zstandard decompression'
        'rom-properties-gtk: for GTK file explores (Caja, Nautilus, Nemo and Thunar)'
        'rom-properties-kde: for Dolphin file explorer'
    )

    cd "$pkgbase-$pkgver/build"

    DESTDIR="$pkgdir" make install

    rm $pkgdir/usr/bin/rp-thumbnailer-dbus
    rm -rf $pkgdir/usr/lib/caja
    rm -rf $pkgdir/usr/lib/nautilus
    rm -rf $pkgdir/usr/lib/nemo
    rm -rf $pkgdir/usr/lib/qt6
    rm -rf $pkgdir/usr/lib/thunarx-3
    rm -rf $pkgdir/usr/lib/tracker-miners-3.0
    rm -rf $pkgdir/usr/share/caja
    rm -rf $pkgdir/usr/share/dbus-1
    rm -rf $pkgdir/usr/share/kio
    rm -rf $pkgdir/usr/share/thumbnailers
    rm -rf $pkgdir/usr/share/tracker3-miners
}


package_rom-properties-gtk() {
    pkgdesc="Shell extension for displaying ROM and disc image metadata in file managers (GTK)"
    depends=(
        'cairo'
        'gcc-libs'
        'glib2'
        'glibc'
        'gsound'
        'gtk3'
        'gtk4'
        'pango'
        'rom-properties'
    )

    cd "$pkgbase-$pkgver/build/src/gtk"

    DESTDIR="$pkgdir" make install
}

package_rom-properties-kde() {
    pkgdesc="Shell extension for displaying ROM and disc image metadata in file managers (KDE)"
    depends=(
        'gcc-libs'
        'glibc'
        'kcoreaddons'
        'kfilemetadata'
        'kio'
        'kwidgetsaddons'
        'qt6-base'
        'rom-properties'
    )

    cd "$pkgbase-$pkgver/build/src/kde"

    DESTDIR="$pkgdir" make install
}