comparison xfce/thunar-volman/thunar-volman.sh @ 792:a6030a75ce9a

xfce/thunar-volman: initial import, closes #1494
author David Demelier <markand@malikania.fr>
date Mon, 12 Aug 2019 17:01:02 +0200
parents
children ae55d9077f70
comparison
equal deleted inserted replaced
791:4e6f3e84200a 792:a6030a75ce9a
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=thunar-volman
19 PKGVERSION=0.9.5
20 PKGREVISION=1
21 PKGLICENSE="GPLv2"
22 PKGSUMMARY="Xfce volume management plugin for thunar"
23 PKGDOWNLOAD="http://archive.xfce.org/xfce/4.14/src/$PKGNAME-$PKGVERSION.tar.bz2"
24 PKGDEPENDS="graphics/gtk
25 lib/glib
26 lib/libgudev
27 xfce/exo
28 xfce/libxfce4ui
29 xfce/libxfce4util
30 xfce/xfconf"
31 PKGOPTIONS="NLS NOTIFICATIONS"
32
33 : ${CHOST:=$(uname -m)-linux-musl}
34 : ${CBUILD:=$(uname -m)-linux-musl}
35 : ${CC:=clang}
36 : ${CFLAGS:=-O2}
37 : ${LDFLAGS:=}
38 : ${LIBS:=}
39 : ${NLS:=yes}
40 : ${NOTIFICATIONS:=yes}
41
42 if [ "$NLS" = "yes" ]; then
43 PKGDEPENDS="core/gettext:build $PKGDEPENDS"
44 with_nls="--enable-nls"
45 else
46 with_nls="--disable-nls"
47 fi
48
49 if [ "$NOTIFICATIONS" = "yes" ]; then
50 PKGDEPENDS="desktop/libnotify $PKGDEPENDS"
51 with_notifications="--enable-notifications"
52 else
53 with_notifications="--disable-notifications"
54 fi
55
56 build()
57 {
58 rm -rf $PKGNAME-$PKGVERSION
59 tar xvf $PKGNAME-$PKGVERSION.tar.bz2
60 cd $PKGNAME-$PKGVERSION
61
62 CC="$CC" \
63 CFLAGS="$CFLAGS" \
64 LDFLAGS="$LDFLAGS" \
65 LIBS="$LIBS" \
66 ./configure \
67 --build=$CBUILD \
68 --host=$CHOST \
69 --prefix= \
70 --localedir=/share/locale \
71 --with-locales-dir=/share/locale \
72 $with_nls \
73 $with_notifications
74 make
75 make install DESTDIR=$DESTDIR
76
77 cd ..
78 rm -rf $PKGNAME-$PKGVERSION
79 }