summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxionl2019-07-06 01:51:25 +0800
committeraxionl2019-07-06 01:51:25 +0800
commite4139d609ec9a67fd778f8711de4d9eda98e4ac7 (patch)
tree61f631790d0676a2678253c26c3e0c8f597fc116
downloadaur-e4139d609ec9a67fd778f8711de4d9eda98e4ac7.tar.gz
[AddPkg] baidunetdisk-bin: Baidu Net Disk is a cloud storage client (Linux Version).
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD53
-rw-r--r--baidunetdisk-bin.patch12
3 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..342756662de
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = baidunetdisk-bin
+ pkgdesc = Baidu Net Disk is a cloud storage client (Linux Version).
+ pkgver = 2.0.1
+ pkgrel = 1
+ url = https://pan.baidu.com
+ arch = x86_64
+ license = custom
+ depends = libxss
+ depends = gtk3
+ depends = nss
+ provides = baidunetdisk
+ conflicts = baidunetdisk
+ options = !strip
+ source = LICENSE.html::https://pan.baidu.com/disk/duty/index.html
+ source = baidunetdisk-bin.patch
+ sha256sums = 17cb003654df74201befd7daa9c0ad79d4bde67fa00a5db01a3aa3f813a8ea65
+ sha256sums = 1b0652455f7897d450c8aade088c83eeff7f12c2bca265b822326d75125bfb5f
+ source_x86_64 = baidunetdisk-bin-2.0.1.deb::https://issuecdn.baidupcs.com/issue/netdisk/LinuxGuanjia/baidunetdisk_linux_2.0.1.deb
+ sha256sums_x86_64 = 6b7993aa75e195b00ba21aa64a743434716eba03a9c7916bde4ef81342c38e3a
+
+pkgname = baidunetdisk-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..4d232c9392a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Ariel AxionL <i at axionl dot me>
+_pkgname=baidunetdisk
+pkgname=baidunetdisk-bin
+pkgver=2.0.1
+pkgrel=1
+pkgdesc="Baidu Net Disk is a cloud storage client (Linux Version)."
+arch=('x86_64')
+depends=('libxss' 'gtk3' 'nss')
+provides=("baidunetdisk")
+conflicts=("baidunetdisk")
+url="https://pan.baidu.com"
+license=("custom")
+options=('!strip')
+
+DLAGENTS=("https::/usr/bin/curl -A 'Mozilla' -fLC - --retry 3 --retry-delay 3 -o %o %u")
+
+source=("LICENSE.html::https://pan.baidu.com/disk/duty/index.html"
+ "baidunetdisk-bin.patch")
+
+source_x86_64=("${pkgname}-${pkgver}.deb::https://issuecdn.baidupcs.com/issue/netdisk/LinuxGuanjia/${_pkgname}_linux_${pkgver}.deb")
+
+sha256sums=('17cb003654df74201befd7daa9c0ad79d4bde67fa00a5db01a3aa3f813a8ea65'
+ '1b0652455f7897d450c8aade088c83eeff7f12c2bca265b822326d75125bfb5f')
+sha256sums_x86_64=('6b7993aa75e195b00ba21aa64a743434716eba03a9c7916bde4ef81342c38e3a')
+
+prepare() {
+ bsdtar -xpf "data.tar.xz"
+
+ # modify the path of executable programs
+ patch -d "usr" -p1 <"${pkgname}.patch"
+}
+
+package() {
+ cd "${srcdir}"
+
+ # install application data
+ mv "usr" "${pkgdir}"
+ install -dm755 "${pkgdir}/usr/bin" "${pkgdir}/usr/lib"
+ mv "opt/${_pkgname}" "${pkgdir}/usr/lib/${_pkgname}"
+ ln -s "../lib/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin"
+
+ # fix promission
+ chmod 644 "${pkgdir}/usr/lib/${_pkgname}/"*.so
+ find ${pkgdir} -type d -exec chmod 755 {} \;
+
+ # install license
+ install -Dm644 "${srcdir}/LICENSE.html" ${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE.html
+ ln -s "/usr/lib/${_pkgname}/LICENSE.electron.txt" \
+ "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE.electron.txt"
+ ln -s "/usr/lib/${_pkgname}/LICENSES.chromium.html" \
+ "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSES.chromium.html"
+
+}
diff --git a/baidunetdisk-bin.patch b/baidunetdisk-bin.patch
new file mode 100644
index 00000000000..3ff0f491e0c
--- /dev/null
+++ b/baidunetdisk-bin.patch
@@ -0,0 +1,12 @@
+diff --unified --recursive --text usr/share/applications/baidunetdisk.desktop usr.new/share/applications/baidunetdisk.desktop
+--- usr/share/applications/baidunetdisk.desktop 2019-06-14 16:29:25.000000000 +0800
++++ usr.new/share/applications/baidunetdisk.desktop 2019-07-06 00:22:56.969927845 +0800
+@@ -1,7 +1,7 @@
+ [Desktop Entry]
+ Name=baidunetdisk
+ Comment=百度网盘
+-Exec="/opt/baidunetdisk/baidunetdisk" %U
++Exec=HOME=$HOME/.config "/usr/bin/baidunetdisk" %U
+ Terminal=false
+ Type=Application
+ Icon=baidunetdisk