summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f1f6c6ae3a811a9299d8ac7eff29a7f5ace7f9c2 (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
# Maintainer: Thomas Eizinger <thomas@eizinger.io>

# All my PKGBUILDs are managed at https://github.com/thomaseizinger/pkgbuilds

pkgname=photoprism-bin
pkgver="240531"
_commit="60b3a4628"
pkgrel=0
epoch=
pkgdesc="Personal Photo Management powered by Go and Google TensorFlow "
arch=(x86_64 aarch64)
url="https://github.com/photoprism/photoprism"
license=('AGPL-3.0-only')
groups=()
depends=(icu glib2 glibc gcc-libs libvips)
makedepends=()
checkdepends=()
optdepends=("darktable: for RAW to JPEG conversion"
	    "rawtherapee: for RAW to JPEG conversion"
	    "libheif: for HEIC/HEIF image conversion"
	    "ffmpeg: for video transcoding and thumbnail extraction"
	    "perl-image-exiftool: for extracting metadata")
provides=("photoprism")
conflicts=("photoprism")
replaces=()
backup=("etc/photoprism/options.yml")
options=()
install=
changelog=
source_x86_64=("https://github.com/photoprism/photoprism/releases/download/${pkgver}-${_commit}/photoprism_${pkgver}-${_commit}-linux-amd64.tar.gz")
source_aarch64=("https://github.com/photoprism/photoprism/releases/download/${pkgver}-${_commit}/photoprism_${pkgver}-${_commit}-linux-arm64.tar.gz")
source=("photoprism.service"
        "photoprism.sysusers"
        "defaults.yml"
        "photoprism.tmpfiles"
        "photoprism-import.service"
        "photoprism-import.timer")
sha256sums=('18fb59d0ee09f6b9d95666e8c6fdd1b151fae985c18befb11b86e0fc1884b7d7'
            '73afd3b2983d6a31405c5a68f553f1a82a87a0d38483cdb56e32e959840ad1a6'
            'f1242a6208a2623815d585d089fa133664dc3ddf5f63b468093da059141fb523'
            'ec6f438c9818f982fb2aaa1895a8b07abb41a3c2befd1c3baa2fecbc2d6cc721'
            '76de44acbdfd3f818b9549b77daf187fb740ceccd3c01d42d8308d5edcf49d6c'
            'ca4bfbddf0a550f215f28e31de56eb9ac60777f65aa7b89433155aa7998388e8')
sha256sums_x86_64=('1859df8e95c054fb4ff9c9de80ed0db96a1126f91d3e57946628fa92008229eb')
sha256sums_aarch64=('16d5ef94dd733bd46db49b10c25a019b9510e690d40efee1d691c20a72263044')
noextract=()
validpgpkeys=()

package() {
	install -Dm 0644 "${srcdir}/photoprism.service" "${pkgdir}/usr/lib/systemd/system/photoprism.service"
	install -Dm 0644 "${srcdir}/photoprism-import.service" "${pkgdir}/usr/lib/systemd/system/photoprism-import.service"
	install -Dm 0644 "${srcdir}/photoprism-import.timer" "${pkgdir}/usr/lib/systemd/system/photoprism-import.timer"
	install -Dm 0644 "${srcdir}/photoprism.sysusers" "${pkgdir}/usr/lib/sysusers.d/photoprism.conf"
	install -Dm 0644 "${srcdir}/photoprism.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/photoprism.conf"

	mkdir -p "$pkgdir/etc/photoprism"
	install -Dm 0444 "${srcdir}/defaults.yml" "$pkgdir/etc/photoprism/defaults.yml"

	mkdir -p "$pkgdir/var/lib/photoprism/"

	install -Dm 0755 ./bin/photoprism "$pkgdir/usr/bin/photoprism"
	install -Dm 0755 ./lib/libtensorflow.so "$pkgdir/usr/lib/libtensorflow.so"
	install -Dm 0755 ./lib/libtensorflow_framework.so "$pkgdir/usr/lib/libtensorflow_framework.so"
	cp -r ./assets/ "$pkgdir/var/lib/photoprism/"

	find "$pkgdir/var/lib/photoprism/assets/" -type d -exec chmod +x {} \;
}