summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 907dcc3e0e1e91d0d763a483fc1c2229cb10c7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Vlad M. <vlad@archlinux.net>
# Contributor: Morgan Mullaney  <jump@fastmail.fm>
# Contributor: Techlive Zheng <techlivezheng@gmail.com>

pkgname=google-musicmanager
pkgver=1.0.467.4929_r0
pkgrel=6
pkgdesc="A simple application for adding the music files on your computer to your Google Music library"
arch=('x86_64')
url="http://music.google.com"
license=('custom:musicmanager')
depends=('flac'
         'qt5-webkit'
         'libid3tag'
         'hicolor-icon-theme'
         'libidn11'
)
optdepends=('log4cxx')
options=(!strip)
source=("https://dl.google.com/linux/musicmanager/deb/pool/main/g/${pkgname}-beta/${pkgname}-beta_${pkgver/_/-}_amd64.deb")
sha256sums=('e2bd248a1035ed4454f43299dc239decc1895d0830c83611ca6a1372d7cd5779')


build() {
  tar -xvf data.tar.xz
  tar -xvf control.tar.gz

  #Debian package source files cleaning.
  rm -r {etc,usr,opt/google/musicmanager/product_logo_32.xpm}
}

package() {
  #Auto fetch the latest version.
  install -d $pkgdir/{opt,usr/{bin,share/applications}}

  #Install files.
  cd opt/google/musicmanager
  find . -type d -exec install -d {,${pkgdir}/opt/google/musicmanager/}{} \;
  find . -type f -exec install -D -m 644 {,${pkgdir}/opt/google/musicmanager/}{} \;

  #Make google-musicmanager executable.
  chmod 755 ${pkgdir}/opt/google/musicmanager/{google-musicmanager,minidump_upload,xdg-settings,xdg-mime,MusicManager}

  #Installing icons to /usr/share/icons/hicolor/
  for i in 16 32 48 128
  do
    install -Dm644 $pkgdir/opt/google/musicmanager/product_logo_${i}.png $pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/google-musicmanager.png
  done

  install -Dm644 $pkgdir/opt/google/musicmanager/google-musicmanager.desktop $pkgdir/usr/share/applications

  ln -s /opt/google/musicmanager/google-musicmanager $pkgdir/usr/bin/
}