summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2023-06-18 02:18:00 -0300
committerDaniel Bermond2023-06-18 02:18:00 -0300
commitafd20c4a80a659407020c94b7585f241914f296b (patch)
tree98fb99487b1944b5d7bc39fa68d4c14a84720c4d
parentdf02b888b01a6001fd8a96d9d890aea85bb69434 (diff)
downloadaur-nightpdf-git.tar.gz
Update source
Original upstream is no more. This new upstream repository changed things, like license, build method, distribution method, etc.
-rw-r--r--.SRCINFO39
-rw-r--r--010-nightpdf-remove-unwanted-targets.patch20
-rw-r--r--PKGBUILD47
-rwxr-xr-xnightpdf.sh2
4 files changed, 82 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 99e4d0c64b72..e2c8941332c9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,45 @@
pkgbase = nightpdf-git
pkgdesc = Dark mode PDF reader (git version)
- pkgver = 0.2.1.r10.g9ab6f45
+ pkgver = 2.0.3.r0.g190a9f7
pkgrel = 1
- url = https://github.com/joeloya/NightPDF/
- arch = any
- license = custom:WTFPL
+ url = https://github.com/Lunarequest/NightPDF/
+ arch = x86_64
+ license = GPL2
makedepends = git
+ makedepends = libxcrypt-compat
+ makedepends = yarn
depends = sh
- depends = electron
+ depends = alsa-lib
+ depends = at-spi2-core
+ depends = cairo
+ depends = dbus
+ depends = expat
+ depends = glib2
+ depends = gtk3
+ depends = libcups
+ depends = libdrm
+ depends = libx11
+ depends = libxcb
+ depends = libxcomposite
+ depends = libxdamage
+ depends = libxext
+ depends = libxfixes
+ depends = libxkbcommon
+ depends = libxrandr
+ depends = mesa
+ depends = nspr
+ depends = nss
+ depends = pango
depends = hicolor-icon-theme
provides = nightpdf
conflicts = nightpdf
- source = git+https://github.com/joeloya/NightPDF.git
+ source = git+https://github.com/Lunarequest/NightPDF.git
source = nightpdf.sh
source = nightpdf.desktop
+ source = 010-nightpdf-remove-unwanted-targets.patch
sha256sums = SKIP
- sha256sums = cef2a1e472a922bc7a93a5ad9b380821a7588ed1b89d89c3a8e8544d675eb63d
+ sha256sums = 0984811e96d0350fc7c2a0cba279a96c24b671b240d2f9d5370ceece47530334
sha256sums = 1eb70aff787a3a18fb2d5f8f3efabefd4ee0f9a8ec0fdac02c2c25decc5c31b3
+ sha256sums = 4cf7cd9a7b19bd218cddf936ddf11b44560a177e5dc715fa107d9fe4bb736e62
pkgname = nightpdf-git
-
diff --git a/010-nightpdf-remove-unwanted-targets.patch b/010-nightpdf-remove-unwanted-targets.patch
new file mode 100644
index 000000000000..84c8cd2331a5
--- /dev/null
+++ b/010-nightpdf-remove-unwanted-targets.patch
@@ -0,0 +1,20 @@
+--- a/electron-builder-config.js
++++ b/electron-builder-config.js
+@@ -35,16 +35,8 @@ const config = {
+ publish: ["github"],
+ target: [
+ {
+- target: "AppImage",
+- arch: ["x64", "arm64"],
+- },
+- {
+ target: "deb",
+- arch: ["x64", "arm64"],
+- },
+- {
+- target: "rpm",
+- arch: ["x64", "arm64"],
++ arch: ["x64"],
+ },
+ ],
+ mimeTypes: ["application/pdf", "application/x-pdf"],
diff --git a/PKGBUILD b/PKGBUILD
index 26d3113b94b5..05abc3b0e006 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,57 @@
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgname=nightpdf-git
-pkgver=0.2.1.r10.g9ab6f45
+pkgver=2.0.3.r0.g190a9f7
pkgrel=1
pkgdesc='Dark mode PDF reader (git version)'
-arch=('any')
-url='https://github.com/joeloya/NightPDF/'
-license=('custom:WTFPL')
-depends=('sh' 'electron' 'hicolor-icon-theme')
-makedepends=('git')
+arch=('x86_64')
+url='https://github.com/Lunarequest/NightPDF/'
+license=('GPL2')
+depends=('sh' 'alsa-lib' 'at-spi2-core' 'cairo' 'dbus' 'expat' 'glib2' 'gtk3' 'libcups' 'libdrm'
+ 'libx11' 'libxcb' 'libxcomposite' 'libxdamage' 'libxext' 'libxfixes' 'libxkbcommon'
+ 'libxrandr' 'mesa' 'nspr' 'nss' 'pango' 'hicolor-icon-theme')
+makedepends=('git' 'libxcrypt-compat' 'yarn')
provides=('nightpdf')
conflicts=('nightpdf')
-source=('git+https://github.com/joeloya/NightPDF.git'
+source=('git+https://github.com/Lunarequest/NightPDF.git'
'nightpdf.sh'
- 'nightpdf.desktop')
+ 'nightpdf.desktop'
+ '010-nightpdf-remove-unwanted-targets.patch')
sha256sums=('SKIP'
- 'cef2a1e472a922bc7a93a5ad9b380821a7588ed1b89d89c3a8e8544d675eb63d'
- '1eb70aff787a3a18fb2d5f8f3efabefd4ee0f9a8ec0fdac02c2c25decc5c31b3')
+ '0984811e96d0350fc7c2a0cba279a96c24b671b240d2f9d5370ceece47530334'
+ '1eb70aff787a3a18fb2d5f8f3efabefd4ee0f9a8ec0fdac02c2c25decc5c31b3'
+ '4cf7cd9a7b19bd218cddf936ddf11b44560a177e5dc715fa107d9fe4bb736e62')
+
+prepare() {
+ patch -d NightPDF -Np1 -i "${srcdir}/010-nightpdf-remove-unwanted-targets.patch"
+}
pkgver() {
git -C NightPDF describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}
+build() {
+ cd NightPDF
+ HOME="${srcdir}/.electron-gyp" yarn
+ HOME="${srcdir}/.electron-gyp" yarn dist
+}
+
package() {
+ install -d -m755 "${pkgdir}/opt"
install -D -m755 nightpdf.sh "${pkgdir}/usr/bin/nightpdf"
install -D -m644 nightpdf.desktop -t "${pkgdir}/usr/share/applications"
- install -D -m644 NightPDF/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
- install -D -m644 NightPDF/{app.js,package.json} -t "${pkgdir}/usr/share/nightpdf"
- cp -a NightPDF/app "${pkgdir}/usr/share/nightpdf"
-
+ cp -dr --no-preserve='ownership' NightPDF/dist/linux-unpacked "${pkgdir}/opt/nightpdf"
+
local _file
local _res
while read -r -d '' _file
do
_res="$(file -S "$_file" | grep -o '[0-9]*[[:space:]]x[[:space:]][0-9]*,' | awk '{ print $1 }')"
-
+
# skip duplicated icons
[ -d "${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}" ] && continue
-
- mkdir -p "${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}/apps"
+
+ install -d -m755 "${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}/apps"
install -D -m644 "$_file" "${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}/apps/nightpdf.png"
done < <(find NightPDF/build/icon.iconset -type f -name '*.png' -print0)
}
diff --git a/nightpdf.sh b/nightpdf.sh
index 2a7a53139fd1..6be042d72226 100755
--- a/nightpdf.sh
+++ b/nightpdf.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-exec electron /usr/share/nightpdf "$@"
+exec /opt/nightpdf/nightpdf "$@"