summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2019-07-22 15:38:12 +0800
committerUniversebenzene2019-07-22 15:38:12 +0800
commit79c89ad2d8268348fd1905540ba75b479f837a25 (patch)
treee986c86ef504714b0a818f3dd6acb21121b516c4
parentc2dd9fb73c93f02109c484d3874b9bfc2fdbee4b (diff)
downloadaur-79c89ad2d8268348fd1905540ba75b479f837a25.tar.gz
ls
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore9
-rw-r--r--0001-baidunetdisk-bin-deksktop-file.patch12
-rw-r--r--0002-baidunetdisk-bin-deksktop-file.patch11
-rw-r--r--PKGBUILD11
-rwxr-xr-xbaidunetdisk-wrapper.sh2
6 files changed, 34 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 237b3ba2654c..10d08748b900 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = baidunetdisk-bin
pkgdesc = Baidu Net Disk is a cloud storage client (Linux Version).
pkgver = 2.0.1
- pkgrel = 2
+ pkgrel = 3
url = https://pan.baidu.com
arch = x86_64
license = custom
@@ -12,9 +12,11 @@ pkgbase = baidunetdisk-bin
conflicts = baidunetdisk
options = !strip
source = LICENSE.html::https://pan.baidu.com/disk/duty/index.html
- source = 0001-baidunetdisk-bin-deksktop-file.patch
+ source = 0002-baidunetdisk-bin-deksktop-file.patch
+ source = baidunetdisk-wrapper.sh
sha256sums = 17cb003654df74201befd7daa9c0ad79d4bde67fa00a5db01a3aa3f813a8ea65
- sha256sums = 4ac5e68e4b029fa292b7272343a0f16480c0e49fd1ab6e750939a342578fd2dd
+ sha256sums = f72dd9604ffa67679a7b68d1104061ddca987f8af323b458f957c492a586c6b0
+ sha256sums = 5cd17d98b37683dbd65c3b2d19caded4026d2b4af27bf798aa102617d8b1fd91
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
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7697fa80bd9c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+src
+pkg
+*.src.tar.gz
+*.tar.gz
+*.tar.bz2
+*.part
+*.pkg.tar.xz
+*.deb
+LICENSE*
diff --git a/0001-baidunetdisk-bin-deksktop-file.patch b/0001-baidunetdisk-bin-deksktop-file.patch
deleted file mode 100644
index c76bd13f9891..000000000000
--- a/0001-baidunetdisk-bin-deksktop-file.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ura 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-21 20:33:47.630360484 +0800
-@@ -1,7 +1,7 @@
- [Desktop Entry]
- Name=baidunetdisk
- Comment=百度网盘
--Exec="/opt/baidunetdisk/baidunetdisk" %U
-+Exec=env HOME=$HOME/.local/share/ /usr/bin/baidunetdisk %U
- Terminal=false
- Type=Application
- Icon=baidunetdisk
diff --git a/0002-baidunetdisk-bin-deksktop-file.patch b/0002-baidunetdisk-bin-deksktop-file.patch
new file mode 100644
index 000000000000..0c8167a69ea2
--- /dev/null
+++ b/0002-baidunetdisk-bin-deksktop-file.patch
@@ -0,0 +1,11 @@
+--- a/share/applications/baidunetdisk.desktop 2019-06-14 16:29:25.000000000 +0800
++++ b/share/applications/baidunetdisk.desktop 2019-07-22 15:14:55.520143407 +0800
+@@ -1,7 +1,7 @@
+ [Desktop Entry]
+ Name=baidunetdisk
+ Comment=百度网盘
+-Exec="/opt/baidunetdisk/baidunetdisk" %U
++Exec=/usr/bin/baidunetdisk-wrapper.sh %U
+ Terminal=false
+ Type=Application
+ Icon=baidunetdisk
diff --git a/PKGBUILD b/PKGBUILD
index fc3e07d5db63..fac76fb4cba6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=baidunetdisk
pkgname=baidunetdisk-bin
pkgver=2.0.1
-pkgrel=2
+pkgrel=3
pkgdesc="Baidu Net Disk is a cloud storage client (Linux Version)."
arch=('x86_64')
depends=('libxss' 'gtk3' 'nss')
@@ -15,19 +15,21 @@ 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"
- "0001-baidunetdisk-bin-deksktop-file.patch")
+ "0002-baidunetdisk-bin-deksktop-file.patch"
+ "baidunetdisk-wrapper.sh")
source_x86_64=("${pkgname}-${pkgver}.deb::https://issuecdn.baidupcs.com/issue/netdisk/LinuxGuanjia/${_pkgname}_linux_${pkgver}.deb")
sha256sums=('17cb003654df74201befd7daa9c0ad79d4bde67fa00a5db01a3aa3f813a8ea65'
- '4ac5e68e4b029fa292b7272343a0f16480c0e49fd1ab6e750939a342578fd2dd')
+ '8486c6c165b86e3e62dba58c0eb655260dacafc4108c4d018c8ddd380d9b237c'
+ '5cd17d98b37683dbd65c3b2d19caded4026d2b4af27bf798aa102617d8b1fd91')
sha256sums_x86_64=('6b7993aa75e195b00ba21aa64a743434716eba03a9c7916bde4ef81342c38e3a')
prepare() {
bsdtar -xpf "data.tar.xz"
# # modify the HOME environment variable for the application's desktop file
- patch -d "usr" -p1 <"0001-baidunetdisk-bin-deksktop-file.patch"
+ patch -d "usr" -p1 <"0002-baidunetdisk-bin-deksktop-file.patch"
}
package() {
@@ -38,6 +40,7 @@ package() {
install -dm755 "${pkgdir}/usr/bin" "${pkgdir}/usr/lib"
mv "opt/${_pkgname}" "${pkgdir}/usr/lib/${_pkgname}"
ln -s "../lib/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin"
+ install -Dm755 -t "${pkgdir}/usr/bin" "${srcdir}/baidunetdisk-wrapper.sh"
# fix promission
chmod 644 "${pkgdir}/usr/lib/${_pkgname}/"*.so
diff --git a/baidunetdisk-wrapper.sh b/baidunetdisk-wrapper.sh
new file mode 100755
index 000000000000..caba62cea061
--- /dev/null
+++ b/baidunetdisk-wrapper.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+HOME="${HOME:-/tmp}/.local/share" exec /usr/lib/baidunetdisk/baidunetdisk "$@"