summaryrefslogtreecommitdiff
path: root/ncmpc/Pkgfile
diff options
context:
space:
mode:
Diffstat (limited to 'ncmpc/Pkgfile')
-rw-r--r--ncmpc/Pkgfile43
1 files changed, 43 insertions, 0 deletions
diff --git a/ncmpc/Pkgfile b/ncmpc/Pkgfile
new file mode 100644
index 0000000..55e3ce4
--- /dev/null
+++ b/ncmpc/Pkgfile
@@ -0,0 +1,43 @@
+# Description: Ncurse-based MPD console client
+# URL: https://www.musicpd.org/
+# Maintainer: Aaron Ball, nullspoon at oper dot io
+# Depends on: boost ncurses libmpdclient python3-docutils
+# Nice to have: python3-sphinx libpcre2
+
+name=ncmpc
+version=0.50
+release=1
+source=(https://www.musicpd.org/download/ncmpc/0/ncmpc-${version}.tar.xz
+ roles.rst)
+
+nosphinx_process_man() {
+ local doc="${SRC}/${name}-${version}/doc/index.rst"
+ sed -i 's/.. option::/.. topic::/' "${doc}"
+ cat ${SRC}/roles.rst
+ head -n2 "${doc}"
+ printf -- '-------------------\nncmpc Documentation\n-------------------\n\n'
+ tail -n +3 "${doc}"
+}
+
+build() {
+ meson build ${name}-${version} \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -D nls=disabled \
+ -D lyrics_screen=true
+ ninja -C build
+ DESTDIR=${PKG} ninja -C build install
+
+ mkdir -p ${PKG}/etc/ncmpc
+
+ install -m 0644 ${name}-${version}/doc/config.sample ${PKG}/etc/ncmpc/config
+ install -m 0644 ${name}-${version}/doc/keys.sample ${PKG}/etc/ncmpc/keys
+
+ if prt-get isinst python3-docutils; then
+ mkdir -p ${PKG}/usr/share/man/man1
+ nosphinx_process_man | rst2man > ${PKG}/usr/share/man/man1/${name}.1
+ gzip ${PKG}/usr/share/man/man1/${name}.1
+ fi
+
+ rm -rf ${PKG}/usr/share/doc
+}

Generated by cgit