comparison xfce/mousepad/mousepad.sh @ 642:5f5772c5f176

xfce/mousepad: initial import, closes #1719
author David Demelier <markand@malikania.fr>
date Fri, 26 Jul 2019 22:09:52 +0200
parents
children 4073582a2911
comparison
equal deleted inserted replaced
641:c8c69bbe438a 642:5f5772c5f176
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=mousepad
19 PKGVERSION=0.4.1
20 PKGREVISION=1
21 PKGLICENSE="GPLv2"
22 PKGSUMMARY="Xfce simple text editor"
23 PKGDOWNLOAD="http://archive.xfce.org/src/apps/$PKGNAME/0.4/$PKGNAME-$PKGVERSION.tar.bz2"
24 PKGDEPENDS="graphics/gtk lib/glib"
25 PKGOPTIONS="DBUS NLS"
26
27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=clang}
30 : ${CFLAGS:=-O2}
31 : ${LDFLAGS:=}
32 : ${LIBS:=}
33 : ${DBUS:=yes}
34 : ${NLS:=yes}
35
36 if [ "$DBUS" = "yes" ]; then
37 PKGDEPENDS="lib/dbus-glib $PKGDEPENDS"
38 with_dbus="--enable-dbus"
39 else
40 with_dbus="--disable-dbus"
41 fi
42
43 if [ "$NLS" = "yes" ]; then
44 PKGDEPENDS="core/gettext:build $PKGDEPENDS"
45 with_nls="--enable-nls"
46 else
47 with_nls="--disable-nls"
48 fi
49
50 build()
51 {
52 rm -rf $PKGNAME-$PKGVERSION
53 tar xvf $PKGNAME-$PKGVERSION.tar.bz2
54 cd $PKGNAME-$PKGVERSION
55
56 CC="$CC" \
57 CFLAGS="$CFLAGS" \
58 LDFLAGS="$LDFLAGS" \
59 LIBS="$LIBS" \
60 ./configure \
61 --build=$CBUILD \
62 --host=$CHOST \
63 --prefix= \
64 --enable-gtk3 \
65 --localedir=/share/local \
66 $with_dbus
67 make
68 make install localedir=/share/locale DESTDIR=$DESTDIR
69
70 cd ..
71 rm -rf $PKGNAME-$PKGVERSION
72 }