-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD.template
58 lines (48 loc) · 1.99 KB
/
PKGBUILD.template
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
56
57
58
# Maintainer: Morgan Mullaney <[email protected]>
# Contributor: Techlive Zheng <[email protected]>
pkgname=google-musicmanager
pkgver=PKGVER
pkgrel=1
pkgdesc="A simple application for adding the music files on your computer to your Google Music library."
arch=('i686' 'x86_64')
url="http://music.google.com"
license=('custom:musicmanager')
depends=('flac' 'fontconfig' 'libogg' 'freetype2' 'libvorbis' 'xdg-utils' 'libidn' 'qtwebkit')
optdepends=('log4cxx')
options=(!strip)
install=${pkgname}.install
if [ "$CARCH" = "x86_64" ]; then
_arch='amd64'
md5sums=('MD5_amd64')
elif [ "$CARCH" = "i686" ]; then
_arch='i386'
md5sums=('MD5_i386')
fi
source=("google-musicmanager-beta-${_arch}-${pkgver}.deb::http://dl.google.com/linux/direct/google-musicmanager-beta_current_${_arch}.deb")
build() {
#Get binary sources.
ar -xv google-musicmanager-beta-${_arch}-${pkgver}.deb
tar -xvf data.tar.lzma
tar -xvf control.tar.gz
#Debian package source files cleaning.
rm -r $srcdir/etc
rm -r $srcdir/usr
rm -f $srcdir/opt/google/musicmanager/product_logo_32.xpm
}
package() {
#Auto fetch the latest version.
install -d $pkgdir/{opt,usr/{bin,share/applications}}
#Install files.
cd $srcdir/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 -D -m644 $pkgdir/opt/google/musicmanager/product_logo_${i}.png $pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/google-musicmanager.png
done
install -D -m644 $pkgdir/opt/google/musicmanager/google-musicmanager.desktop $pkgdir/usr/share/applications
ln -s /opt/google/musicmanager/google-musicmanager $pkgdir/usr/bin/
}