summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaustubh Banerjee2018-10-19 15:29:02 +0200
committerKaustubh Banerjee2018-10-19 15:29:02 +0200
commitb2c0d93c830f30041ab715b756595cce506405fa (patch)
treec82ccccc1168488002536a72dfd73d83062298de
parent99e2cf89cb69922c1a42031d001a0b8a4b6f54bb (diff)
downloadaur-b2c0d93c830f30041ab715b756595cce506405fa.tar.gz
pull tar.gz package instead of bin. reduce depends.
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD29
-rw-r--r--polar-bookshelf-bin.install19
-rw-r--r--polar-bookshelf.desktop10
4 files changed, 36 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 96cb1c33e5c2..e1e4442d1c0c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,21 +3,18 @@ pkgbase = polar-bookshelf-bin
pkgver = 1.0.3
pkgrel = 1
url = https://github.com/burtonator/polar-bookshelf
- install = polar-bookshelf-bin.install
arch = x86_64
- license = GPL2
- depends = desktop-file-utils
+ license = GPL3
depends = gconf
- depends = hicolor-icon-theme
- depends = libappindicator-gtk2
- depends = libnotify
+ depends = gtk2
depends = libxss
depends = libxtst
depends = nss
- options = !strip
- options = !emptydirs
- source_x86_64 = https://github.com/burtonator/polar-bookshelf/releases/download/v1.0.3/polar-bookshelf-1.0.3-amd64.deb
- sha512sums_x86_64 = 955c06fed2c8dddbde7402f4bc5ffac4b4b85dcb373503c2fa85c3a2be946f5c06b8a81c29a4d377d981deb52c8419b38e653b12d14390f15f2ec2c8544c71f8
+ depends = xdg-utils
+ source_x86_64 = https://github.com/burtonator/polar-bookshelf/releases/download/v1.0.3/polar-bookshelf-1.0.3-x64.tar.gz
+ source_x86_64 = polar-bookshelf.desktop
+ sha512sums_x86_64 = 8b0e60d856f45bd87d9f6ac597a98cd2a4cf8555e18eff1231d6c9e6d647958abeac4aa577fda9e67260a5973c3bd1ed41a85b4bb9fc89d381305bda692401ea
+ sha512sums_x86_64 = 245196d23eb0c724bba1ba09e8234cc8dfdd230fcd02e8083c84d65d4721886977a111e19511d5afee9b8b61458ab851e6263dad31be9bbe0f4f5a3607f00690
pkgname = polar-bookshelf-bin
diff --git a/PKGBUILD b/PKGBUILD
index a4a86a6ad84f..0e33762e4492 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,19 +5,28 @@ pkgrel=1
pkgdesc="Polar Bookshelf"
arch=('x86_64')
url="https://github.com/burtonator/polar-bookshelf"
-license=('GPL2')
-groups=('')
-depends=('desktop-file-utils' 'gconf' 'hicolor-icon-theme' 'libappindicator-gtk2' 'libnotify' 'libxss' 'libxtst' 'nss')
-options=('!strip' '!emptydirs')
-install=${pkgname}.install
-source_x86_64=("https://github.com/burtonator/polar-bookshelf/releases/download/v"$pkgver"/polar-bookshelf-"$pkgver"-amd64.deb")
-sha512sums_x86_64=('955c06fed2c8dddbde7402f4bc5ffac4b4b85dcb373503c2fa85c3a2be946f5c06b8a81c29a4d377d981deb52c8419b38e653b12d14390f15f2ec2c8544c71f8')
+license=('GPL3')
+depends=('gconf' 'gtk2' 'libxss' 'libxtst' 'nss' 'xdg-utils')
+source_x86_64=("https://github.com/burtonator/polar-bookshelf/releases/download/v"$pkgver"/polar-bookshelf-"$pkgver"-x64.tar.gz"
+"polar-bookshelf.desktop")
+sha512sums_x86_64=('8b0e60d856f45bd87d9f6ac597a98cd2a4cf8555e18eff1231d6c9e6d647958abeac4aa577fda9e67260a5973c3bd1ed41a85b4bb9fc89d381305bda692401ea'
+ '245196d23eb0c724bba1ba09e8234cc8dfdd230fcd02e8083c84d65d4721886977a111e19511d5afee9b8b61458ab851e6263dad31be9bbe0f4f5a3607f00690')
package(){
+ # place files
+ install -d "${pkgdir}/usr/lib/polar-bookshelf"
+ cp -a ${srcdir}/polar-bookshelf-"$pkgver"-x64/* "${pkgdir}/usr/lib/polar-bookshelf"
- # Extract package data
- tar xf data.tar.xz -C "${pkgdir}"
+ # symlink main binary
+ install -d "${pkgdir}/usr/bin"
+ ln -s "/usr/lib/polar-bookshelf/polar-bookshelf" "${pkgdir}/usr/bin/polar-bookshelf"
- install -D -m644 "${pkgdir}/opt/Polar Bookshelf/resources/app.asar.unpacked/node_modules/term-size/license" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ # desktop entry and icons
+ desktop-file-install -m 644 --dir "${pkgdir}/usr/share/applications/" "${srcdir}/polar-bookshelf.desktop"
+ # Place license files
+ for license in "LICENSE.electron.txt" "LICENSES.chromium.html"; do
+ install -Dm644 "${pkgdir}/usr/lib/polar-bookshelf/${license}" "${pkgdir}/usr/share/licenses/polar-bookshelf/${license}"
+ rm "${pkgdir}/usr/lib/polar-bookshelf/${license}"
+ done
}
diff --git a/polar-bookshelf-bin.install b/polar-bookshelf-bin.install
deleted file mode 100644
index a10355013d62..000000000000
--- a/polar-bookshelf-bin.install
+++ /dev/null
@@ -1,19 +0,0 @@
-post_install() {
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-
- # Link to the binary
- ln -sf '/opt/Polar Bookshelf/polar-bookshelf' '/usr/bin/polar-bookshelf'
- update-desktop-database -q
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-
- # Delete the link to the binary
- rm -f '/usr/bin/polar-bookshelf'
- update-desktop-database -q
-}
diff --git a/polar-bookshelf.desktop b/polar-bookshelf.desktop
new file mode 100644
index 000000000000..c7748673f527
--- /dev/null
+++ b/polar-bookshelf.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Polar Bookshelf
+Comment=Polar is a personal knowledge repository for PDF and web content supporting incremental reading and document annotation
+Exec=polar-bookshelf
+Terminal=false
+Type=Application
+Icon=polar-bookshelf
+StartupWMClass=Polar Bookshelf
+Categories=Office;Viewer;
+X-Desktop-File-Install-Version=0.24