aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD29
2 files changed, 11 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b3555926df52..8bc7cc6e95ee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,9 @@ pkgbase = netease-cloud-music
url = http://music.163.com/
arch = x86_64
license = custom
+ source = http://d1.music.126.net/dmusic/netease-cloud-music_1.2.1_amd64_ubuntu_20190428.deb
source = http://music.163.com/html/web2/service.html
+ md5sums = 1f47c7dc3d9ce46da8099e539ee8a74d
md5sums = SKIP
pkgname = netease-cloud-music
diff --git a/PKGBUILD b/PKGBUILD
index 0438a6b9c7d6..e030fd48c9ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,26 +8,15 @@ arch=("x86_64")
url="http://music.163.com/"
license=('custom')
depends=()
-source=("http://music.163.com/html/web2/service.html")
-md5sums=('SKIP')
-
-prepare() {
- # Download in prepare to add User-Agent header.
- cd "$srcdir"
- source_uri="http://d1.music.126.net/dmusic/netease-cloud-music_${pkgver}_amd64_ubuntu_${_pkgdate}.deb"
- file_uri="$pkgname-$pkgver.orig.deb"
- md5checksum='1f47c7dc3d9ce46da8099e539ee8a74d'
- user_agent='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5'
- [ ! -f "$file_uri" ] && curl -H "User-Agent: $user_agent" "$source_uri" -o "$file_uri"
- mkdir -p "$pkgname"
- bsdtar -x -C "$pkgname" -f "$file_uri"
- cd "$pkgname"
- mkdir -p data
- bsdtar -x -C data -f data.tar.xz
-}
+source=(
+ "http://d1.music.126.net/dmusic/netease-cloud-music_${pkgver}_amd64_ubuntu_${_pkgdate}.deb"
+ "http://music.163.com/html/web2/service.html"
+)
+md5sums=('1f47c7dc3d9ce46da8099e539ee8a74d'
+ 'SKIP')
package() {
- cd "$srcdir/$pkgname/data"
- cp -rfp {opt,usr} "$pkgdir/"
- install -D -m644 "$srcdir/service.html" ${pkgdir}/usr/share/licenses/$pkgname/license.html
+ cd ${srcdir}
+ tar -xvf data.tar.xz -C ${pkgdir}
+ install -D -m644 service.html ${pkgdir}/usr/share/licenses/$pkgname/license.html
}