updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / google-musicmanager / PKGBUILD
blob21fb90a816d6b9092ae277a1faf21fea9b1eb126
1 # Maintainer: Patrick Mullaney  <pajmullaney@gmail.com>
2 # Contributor: Techlive Zheng <techlivezheng@gmail.com>
4 pkgname=google-musicmanager
5 pkgver=1.0.23.1334_r0
6 pkgrel=1
7 pkgdesc="A simple application for adding the music files on your computer to your Google Music library."
8 arch=('i686' 'x86_64')
9 url="http://music.google.com"
10 license=('custom:musicmanager')
11 depends=('flac' 'qt' 'fontconfig' 'libogg' 'freetype2' 'libvorbis' 'xdg-utils' 'libidn')
12 optdepends=('log4cxx')
13 options=(!strip)
14 install=${pkgname}.install
16 if [ "$CARCH" = "x86_64" ]; then
17     _arch='amd64'
18     md5sums=('f98a581295d9c338e754422ea279f337')
19 elif [ "$CARCH" = "i686" ]; then
20     _arch='i386'
21     md5sums=('6388d3f89a5f04c7aec991228a90030f')
24 source=("google-musicmanager-beta-${_arch}-${pkgver}.deb::http://dl.google.com/linux/direct/google-musicmanager-beta_current_${_arch}.deb")
26 build() {
27     #Get binary sources.
28     ar -xv google-musicmanager-beta-${_arch}-${pkgver}.deb
29     tar -xvf data.tar.lzma
30     tar -xvf control.tar.gz
32     #Auto fetch the latest version.
33     :;pkgver=`grep "Version" control | cut -d: -f2 | sed 's/^ *//g' | sed 's/ *$//g' | sed 's/-/_/g'`
35     #Debian package source files cleaning.
36     rm -r $srcdir/etc
37     rm -r $srcdir/usr
38     rm -f $srcdir/opt/google/musicmanager/product_logo_32.xpm
40 package() {
41     #Auto fetch the latest version.
42     :;pkgver=`grep "Version" control | cut -d: -f2 | sed 's/^ *//g' | sed 's/ *$//g' | sed 's/-/_/g'`
44     install -d $pkgdir/{opt,usr/{bin,share/applications}}
46     #Install files.
47     cd $srcdir/opt/google/musicmanager
48     find . -type d -exec install -d {,${pkgdir}/opt/google/musicmanager/}{} \;
49     find . -type f -exec install -D -m 644 {,${pkgdir}/opt/google/musicmanager/}{} \;
51     #Make google/musicmanager executable.
52     chmod 755 ${pkgdir}/opt/google/musicmanager/{google-musicmanager,minidump_upload,xdg-settings,xdg-mime,MusicManager}
54     #Installing icons to /usr/share/icons/hicolor/
55     for i in 16 32 48 128
56     do
57         install -D -m644 $pkgdir/opt/google/musicmanager/product_logo_${i}.png $pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/google-musicmanager.png
58     done
60     install -D -m644 $pkgdir/opt/google/musicmanager/google-musicmanager.desktop $pkgdir/usr/share/applications
62     ln -s /opt/google/musicmanager/google-musicmanager $pkgdir/usr/bin/