Mercurial > vanilla
comparison audio/ncmpc/ncmpc.sh @ 923:ea26d8ed5066
audio/ncmpc: initial import, closes #1600
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 27 Aug 2019 20:45:00 +0200 |
parents | |
children | ddab65a5b3f5 |
comparison
equal
deleted
inserted
replaced
922:ec97c3ab88bd | 923:ea26d8ed5066 |
---|---|
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=ncmpc | |
19 PKGVERSION=0.34 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="GPLv20" | |
22 PKGSUMMARY="curses client for the Music Player Daemon" | |
23 PKGDOWNLOAD="https://www.musicpd.org/download/ncmpc/0/$PKGNAME-$PKGVERSION.tar.xz" | |
24 PKGDEPENDS="meson:build ncurses" | |
25 PKGOPTIONS="COLORS LOCALE MOUSE NLS REGEX" | |
26 | |
27 : ${CC:=clang} | |
28 : ${CFLAGS:=-O2} | |
29 : ${CXX:=clang++} | |
30 : ${CXXFLAGS:=-O2} | |
31 : ${LDFLAGS:=} | |
32 : ${COLORS:=yes} | |
33 : ${LOCALE:=yes} | |
34 : ${MOUSE:=yes} | |
35 : ${NLS:=yes} | |
36 : ${REGEX:=yes} # Note: regex support through pcre. | |
37 | |
38 if [ "$COLORS" = "yes" ]; then | |
39 with_colors="-D colors=true" | |
40 else | |
41 with_colors="-D colors=false" | |
42 fi | |
43 | |
44 if [ "$LOCALE" = "yes" ]; then | |
45 with_locale="-D locale=enabled" | |
46 else | |
47 with_locale="-D locale=disabled" | |
48 fi | |
49 | |
50 if [ "$MOUSE" = "yes" ]; then | |
51 with_mouse="-D mouse=enabled" | |
52 else | |
53 with_mouse="-D mouse=disabled" | |
54 fi | |
55 | |
56 if [ "$NLS" = "yes" ]; then | |
57 PKGDEPENDS="gettext $PKGDEPENDS" | |
58 with_nls="-D nls=enabled" | |
59 else | |
60 with_nls="-D nls=disabled" | |
61 fi | |
62 | |
63 if [ "$REGEX" = "yes" ]; then | |
64 PKGDEPENDS="pcre $PKGDEPENDS" | |
65 with_regex="-D regex=enabled" | |
66 else | |
67 with_regex="-D regex=disabled" | |
68 fi | |
69 | |
70 build() | |
71 { | |
72 rm -rf $PKGNAME-$PKGVERSION | |
73 tar xvf $PKGNAME-$PKGVERSION.tar.xz | |
74 cd $PKGNAME-$PKGVERSION | |
75 | |
76 CC="$CC" \ | |
77 CFLAGS="$CFLAGS" \ | |
78 CXX="$CXX" \ | |
79 CXXFLAGS="$CXXFLAGS" \ | |
80 LDFLAGS="$LDFLAGS" \ | |
81 meson . build \ | |
82 --prefix / \ | |
83 --buildtype release \ | |
84 --default-library shared \ | |
85 $with_colors \ | |
86 $with_locale \ | |
87 $with_mouse \ | |
88 $with_nls \ | |
89 $with_regex | |
90 ninja -C build | |
91 DESTDIR=$DESTDIR ninja -C build install | |
92 | |
93 cd .. | |
94 rm -rf $PKGNAME-$PKGVERSION | |
95 } |