comparison xfce/parole/parole.sh @ 731:c624e8546079

xfce/parole: initial import, closes #1643
author David Demelier <markand@malikania.fr>
date Tue, 06 Aug 2019 20:20:00 +0200
parents
children e693904f5e20
comparison
equal deleted inserted replaced
730:a4d2a69b80d9 731:c624e8546079
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 PKGNAME=parole
19 PKGVERSION=1.0.3
20 PKGREVISION=1
21 PKGLICENSE="GPLv2"
22 PKGSUMMARY="Xfce simple multimedia player"
23 PKGDOWNLOAD="http://archive.xfce.org/src/apps/$PKGNAME/${PKGVERSION%.*}/$PKGNAME-$PKGVERSION.tar.bz2"
24 PKGOPTIONS="MPRIS NLS NOTIFICATIONS TAGLIB TRAY"
25 PKGDEPENDS="graphics/cairo
26 graphics/gtk
27 graphics/libexif
28 lib/glib
29 multimedia/gstreamer
30 multimedia/gst-plugins-base
31 network/dbus
32 x11/libx11
33 xfce/libxfce4ui
34 xfce/libxfce4util
35 xfce/xfconf"
36
37 : ${CHOST:=$(uname -m)-linux-musl}
38 : ${CBUILD:=$(uname -m)-linux-musl}
39 : ${CC:=clang}
40 : ${CFLAGS:=-O2}
41 : ${CXX:=clang++}
42 : ${CXXFLAGS:=-O2}
43 : ${LDFLAGS:=}
44 : ${LIBS:=}
45 : ${MPRIS:=yes}
46 : ${NLS:=yes}
47 : ${NOTIFICATIONS:=yes}
48 : ${TAGLIB:=yes}
49 : ${TRAY:=yes}
50
51 if [ "$MPRIS" = "yes" ]; then
52 with_mpris="--enable-mpris2-plugin"
53 else
54 with_mpris="--disable-mpris2-plugin"
55 fi
56
57 if [ "$NLS" = "yes" ]; then
58 PKGDEPENDS="core/gettext:build $PKGDEPENDS"
59 with_nls="--enable-nls"
60 else
61 with_nls="--disable-nls"
62 fi
63
64 if [ "$NOTIFICATIONS" = "yes" ]; then
65 PKGDEPENDS="desktop/libnotify $PKGDEPENDS"
66 with_notifications="--enable-notify-plugin"
67 else
68 with_notifications="--disable-notify-plugin"
69 fi
70
71 if [ "$TAGLIB" = "yes" ]; then
72 PKGDEPENDS="audio/taglib $PKGDEPENDS"
73 with_taglib="--enable-taglib"
74 else
75 with_taglib="--disable-taglib"
76 fi
77
78 if [ "$TRAY" = "yes" ]; then
79 with_tray="--enable-tray-plugin"
80 else
81 with_tray="--disable-tray-plugin"
82 fi
83
84 build()
85 {
86 rm -rf $PKGNAME-$PKGVERSION
87 tar xvf $PKGNAME-$PKGVERSION.tar.bz2
88 cd $PKGNAME-$PKGVERSION
89
90 # No tunable for pixmapsdir, quick patch.
91 sed -i -e '/pixmapsdir/ s/${DATADIRNAME}/share/' configure
92 CC="$CC" \
93 CFLAGS="$CFLAGS" \
94 CXX="$CXX" \
95 CXXFLAGS="$CXXFLAGS" \
96 LDFLAGS="$LDFLAGS" \
97 LIBS="$LIBS" \
98 ./configure \
99 --build=$CBUILD \
100 --host=$CHOST \
101 --prefix= \
102 --disable-debug \
103 --datadir=/share \
104 --localedir=/share/local \
105 $with_mpris \
106 $with_nls \
107 $with_notifications \
108 $with_taglib \
109 $with_tray
110 make
111 make install localedir=/share/locale DESTDIR=$DESTDIR
112 rm -f $DESTDIR/lib/parole-0/*.la
113
114 cd ..
115 rm -rf $PKGNAME-$PKGVERSION
116 }