summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Eizinger2021-07-22 19:20:50 +1000
committerThomas Eizinger2021-07-22 19:20:50 +1000
commite7d5e606f01036da25b3130d01afe652f1cf17cc (patch)
treeda9b7ee9de28a4a8aeb7749b90385a608c996a9c
parent21324ff1aaf3eb61943cacaa648653685bff73d8 (diff)
downloadaur-e7d5e606f01036da25b3130d01afe652f1cf17cc.tar.gz
upgpkg: photoprism 210523-0
-rw-r--r--.SRCINFO48
-rw-r--r--PKGBUILD101
-rw-r--r--options.yml2
-rw-r--r--photoprism.service18
-rw-r--r--photoprism.sysusers3
5 files changed, 95 insertions, 77 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a51fdabd409..b7fb03b0fe0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,35 +1,29 @@
pkgbase = photoprism
- pkgdesc = PhotoPrism is a privately hosted app for browsing, organizing, and sharing your photo collection
- pkgver = 210222
- pkgrel = 1
- url = https://photoprism.app/
+ pkgdesc = Personal Photo Management powered by Go and Google TensorFlow
+ pkgver = 210523
+ pkgrel = 0
+ url = https://github.com/photoprism/photoprism
arch = x86_64
- arch = armv6h
- arch = armv7h
arch = aarch64
- license = AGPL3
+ license = GPLv3
makedepends = go
- makedepends = nodejs-webpack
- makedepends = nodejs-webpack-cli
- depends = ffmpeg
- depends = tensorflow
- depends = sqlite
- conflicts = photoprism-git
- source = photoprism-210222.tar.gz::https://github.com/photoprism/photoprism/archive/210222-ac5a9d5e.tar.gz
+ makedepends = nodejs
+ makedepends = npm
+ depends = tensorflow115
+ provides = photoprism
+ conflicts = photoprism
+ backup = etc/photoprism/options.yml
+ source = https://github.com/photoprism/photoprism/archive/210523-b1856b9d.tar.gz
+ source = https://dl.photoprism.org/tensorflow/nasnet.zip
+ source = https://dl.photoprism.org/tensorflow/nsfw.zip
source = photoprism.service
- source = photoprism.service.env
source = photoprism.sysusers
- source = photoprism.tmpfiles
- md5sums = 9b75ad73e3b07515d4d3ed0287d96b0f
- md5sums = 09ad1555f1487cd5fb2e461e6b900e3d
- md5sums = c164b0294295e0f23e482507bcf9fb1e
- md5sums = c11fac89fe843b7342790511e98baca9
- md5sums = b8a7591cde43436a3f27df108310badd
- sha256sums = d959b8233ba405614670fe4e0011943fb93f1e7dff3a9dc9cef852e4d8b3e99b
- sha256sums = 8a6c983cc9bd34fe5a576903b49d4ee9d15eef019ea22a9e63e6a00c04c8a43b
- sha256sums = 1dfc9d8900e9437c12d2ffefd9e3b1eea5a90b3801ff61e45c6e23ea4c214e3b
- sha256sums = 1ecfac0fb1c25794508063797295eef09b7a2ce23723fd8d52460d3fd6ad980f
- sha256sums = 61b4e817aa621f54b871c5857a336af7d4f2e6da32645e37233aa938f324c4d2
+ source = options.yml
+ sha256sums = 86f7e344ce628c3bd1076948f9340999bb4743aa9e7402fc14f4e3106f8aed89
+ sha256sums = a0e1ad8d5a5a0ff9efc4b3ed89898bf008563ee36cacd0c804a384f8fc661588
+ sha256sums = eb5e5d22e37961c3192a4757efff883f77bc989c0efceabb1395e0959d966f14
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = photoprism
-
diff --git a/PKGBUILD b/PKGBUILD
index e42f91c4605..03011e655a3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,47 +1,68 @@
-# Maintainer: satcom886 <rostik.medved@gmail.com>
+# Maintainer: Thomas Eizinger <thomas@eizinger.io>
+
+# All my PKGBUILDs are managed at https://github.com/thomaseizinger/pkgbuilds
+
pkgname=photoprism
-pkgver=210222
-_commit="ac5a9d5e"
-pkgrel=1
-pkgdesc="PhotoPrism is a privately hosted app for browsing, organizing, and sharing your photo collection"
-url="https://photoprism.app/"
-license=('AGPL3')
-arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
-depends=('ffmpeg' 'tensorflow' 'sqlite')
-makedepends=('go' 'nodejs-webpack' 'nodejs-webpack-cli')
-conflicts=('photoprism-git')
-
-source=(
- "photoprism-$pkgver.tar.gz::https://github.com/photoprism/photoprism/archive/$pkgver-$_commit.tar.gz"
- "photoprism.service"
- "photoprism.service.env"
- "photoprism.sysusers"
- "photoprism.tmpfiles"
-)
-
-md5sums=('9b75ad73e3b07515d4d3ed0287d96b0f'
- '09ad1555f1487cd5fb2e461e6b900e3d'
- 'c164b0294295e0f23e482507bcf9fb1e'
- 'c11fac89fe843b7342790511e98baca9'
- 'b8a7591cde43436a3f27df108310badd')
-sha256sums=('d959b8233ba405614670fe4e0011943fb93f1e7dff3a9dc9cef852e4d8b3e99b'
- '8a6c983cc9bd34fe5a576903b49d4ee9d15eef019ea22a9e63e6a00c04c8a43b'
- '1dfc9d8900e9437c12d2ffefd9e3b1eea5a90b3801ff61e45c6e23ea4c214e3b'
- '1ecfac0fb1c25794508063797295eef09b7a2ce23723fd8d52460d3fd6ad980f'
- '61b4e817aa621f54b871c5857a336af7d4f2e6da32645e37233aa938f324c4d2')
+pkgver="210523"
+commit="b1856b9d"
+pkgrel=0
+epoch=
+pkgdesc="Personal Photo Management powered by Go and Google TensorFlow "
+arch=(x86_64 aarch64)
+url="https://github.com/photoprism/photoprism"
+license=('GPLv3')
+groups=()
+depends=(tensorflow115)
+makedepends=(go nodejs npm)
+checkdepends=()
+optdepends=()
+provides=("photoprism")
+conflicts=("photoprism")
+replaces=()
+backup=("etc/photoprism/options.yml")
+options=()
+install=
+changelog=
+source=("https://github.com/photoprism/photoprism/archive/$pkgver-$commit.tar.gz" "https://dl.photoprism.org/tensorflow/nasnet.zip" "https://dl.photoprism.org/tensorflow/nsfw.zip" "photoprism.service" "photoprism.sysusers" "options.yml")
+noextract=()
+sha256sums=('86f7e344ce628c3bd1076948f9340999bb4743aa9e7402fc14f4e3106f8aed89'
+ 'a0e1ad8d5a5a0ff9efc4b3ed89898bf008563ee36cacd0c804a384f8fc661588'
+ 'eb5e5d22e37961c3192a4757efff883f77bc989c0efceabb1395e0959d966f14'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
+validpgpkeys=()
build() {
- cd "$srcdir"/photoprism-"$pkgver"-"$_commit"
- make DESTDIR="$pkgdir" PREFIX="/usr" generate build-go
+ cd "$pkgname"-"$pkgver"-"$commit"
+ scripts/build.sh prod ./photoprism
+
+ cd "frontend";
+ npm install
+ NODE_ENV=production npm run build
+}
+
+check() {
+ cd "$pkgname"-"$pkgver"-"$commit"
+
+ ./photoprism --version
}
package() {
- cd "$srcdir"/photoprism-"$pkgver"-"$_commit"
- make DESTDIR="$pkgdir" PREFIX="/usr" install
- #install -Dm 755 $srcdir/k3s-${pkgver}-${CARCH} $pkgdir/usr/bin/k3s
-
- install -Dm 644 "$srcdir"/photoprism.service "$pkgdir"/usr/lib/systemd/system/photoprism.service
- install -Dm 400 "$srcdir"/photoprism.service.env "$pkgdir"/etc/systemd/system/photoprism.service.env
- install -Dm 644 "$srcdir"/photoprism.sysusers "$pkgdir"/usr/lib/sysusers.d/photoprism.conf
- install -Dm 644 "$srcdir"/photoprism.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/photoprism.conf
+ install -Dm 0644 "${srcdir}/photoprism.service" "${pkgdir}/usr/lib/systemd/system/photoprism.service"
+ install -Dm 0644 "${srcdir}/photoprism.sysusers" "${pkgdir}/usr/lib/sysusers.d/photoprism.conf"
+
+ mkdir -p "$pkgdir/etc/photoprism"
+ install -Dm 0444 "${srcdir}/options.yml" "$pkgdir/etc/photoprism/options.yml"
+
+ mkdir -p "$pkgdir/var/lib/photoprism/assets/"
+
+ cp -r "${srcdir}/nasnet" "${srcdir}/nsfw" "$pkgdir/var/lib/photoprism/assets/"
+
+ cd "$pkgname"-"$pkgver"-"$commit"
+
+ install -Dm 0755 ./photoprism "$pkgdir/usr/bin/photoprism"
+ cp -r assets/locales assets/profiles assets/static assets/templates "$pkgdir/var/lib/photoprism/assets/"
+
+ find "$pkgdir/var/lib/photoprism/assets/" -type d -exec chmod +x {} \;
}
diff --git a/options.yml b/options.yml
new file mode 100644
index 00000000000..e578d5d327e
--- /dev/null
+++ b/options.yml
@@ -0,0 +1,2 @@
+ConfigPath: /etc/photoprism
+AssetsPath: /var/lib/photoprism/assets
diff --git a/photoprism.service b/photoprism.service
index 79dfb5edb76..dfca6a38ca6 100644
--- a/photoprism.service
+++ b/photoprism.service
@@ -1,15 +1,15 @@
+# Do not make changes to this file. It will be overridden by package upgrades. Use `systemctl edit photoprism` instead!
+
[Unit]
+After=network.target
Description=Photoprism
-Documentation=https://docs.photoprism.org
-After=network-online.target
+
+[Install]
+WantedBy=multi-user.target
[Service]
-User=photoprism
-# EnvironmentFile=/etc/systemd/system/photoprism.service.env
-# ExecStartPre=
-ExecStart=/usr/bin/photoprism start
+ExecStart=/usr/bin/photoprism --config-file=/etc/photoprism/options.yml start
Restart=always
-RestartSec=15s
+RestartSec=10
-[Install]
-WantedBy=multi-user.target
+User=photoprism \ No newline at end of file
diff --git a/photoprism.sysusers b/photoprism.sysusers
index 2e6a367247b..4fc33dc63d0 100644
--- a/photoprism.sysusers
+++ b/photoprism.sysusers
@@ -1 +1,2 @@
-u photoprism - "Photoprism Media Server" /var/lib/photoprism
+#Type Name ID GECOS Home directory Shell
+u photoprism - "Photoprism"