updated on Thu Jan 26 12:02:26 UTC 2012
[aur-mirror.git] / smplayer-svn / PKGBUILD
blobe0e08757048d3d65eb28c409ff1e04b87b4373d4
1 # Maintainer: oke3 < Sekereg {at} gmx {dot} com
2 # Contributor: Flamelab <panosfilip@gmail.com>
3 # Fixes and patches: WAntilles <wantilles@adslgr.com>
5 pkgname=smplayer-svn
6 pkgver=3762
7 pkgrel=1
8 pkgdesc="A complete front-end for MPlayer"
9 arch=('i686' 'x86_64')
10 url="http://smplayer.sourceforge.net/"
11 license=('GPL')
12 depends=('qt' 'mplayer')
13 makedepends=('subversion')
14 conflicts=('smplayer')
15 provides=('smplayer')
16 install=$pkgname.install
17 source=("smplayer-display-matroska-chapter-names-2.patch")
18 sha1sums=('2c264379ab9a8a0c0fa649c771ae08f72a58d6a9')
20 _svnmod="smplayer"
21 _svntrunk=https://smplayer.svn.sourceforge.net/svnroot/smplayer/smplayer/trunk/
23 build() {
24      cd "$srcdir"
26      if [[ -d "$_svnmod/.svn" ]]; then
27           (cd "$_svnmod" && svn up -r "$pkgver")
28      else
29           svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
30      fi
32      msg "SVN checkout done or server timeout"
33      msg "Starting make..."
35      rm -rf "$_svnmod-build"
36      cp -r "$_svnmod" "$_svnmod-build"
37      cd "$_svnmod-build"
39     # remove broken translation
40      sed -i "s|translations/smplayer_gl.ts|#translations/smplayer_gl.ts|" src/smplayer.pro
42     # display matroska container chapter names
43     # http://smplayer.sourceforge.net/forum/viewtopic.php?f=4&t=661
44      patch -Np2 -i "$srcdir/smplayer-display-matroska-chapter-names-2.patch"
46     make PREFIX=/usr
49 package() {
50     cd "$srcdir/$_svnmod-build"
52     make PREFIX="$pkgdir/usr" install
54     install -dm755 "$pkgdir/usr/share/pixmaps"
55     ln -s /usr/share/icons/hicolor/64x64/apps/smplayer.png \
56         "$pkgdir/usr/share/pixmaps/"
58     sed -i 's|Exec=smplayer %U|Exec=smplayer %F|' "$pkgdir/usr/share/applications/smplayer.desktop"
59     sed -i 's|Exec=smplayer -add-to-playlist %U|Exec=smplayer -add-to-playlist %F|' \
60    "$pkgdir/usr/share/applications/smplayer_enqueue.desktop"