wok-next view ncmpcpp/receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | 556349764d57 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ncmpcpp"
4 VERSION="0.5.10"
5 CATEGORY="multimedia"
6 SHORT_DESC="Ncurses mpd client inspired by ncmpc"
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://rybczak.net/ncmpcpp/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="http://ncmpcpp.rybczak.net/stable/$TARBALL"
14 BUILD_DEPENDS="ncurses-dev taglib taglib-dev curl-dev libmpdclient-dev"
16 compile_rules() {
17 ./configure \
18 --enable-clock \
19 --with-taglib \
20 --with-curl \
21 $CONFIGURE_ARGS &&
22 fix libtool &&
23 make &&
24 make install || return 1
26 mkdir -p $install/etc/skel/.ncmpcpp/
27 cp $install/usr/share/doc/ncmpcpp/config \
28 $install/usr/share/doc/ncmpcpp/keys $install/etc/skel/.ncmpcpp/
29 }
31 genpkg_rules() {
32 copy @std
33 DEPENDS="ncurses taglib mpd curl libmpdclient"
34 TAGS="music audio player"
35 }
37 post_install() {
38 for i in $(ls "$1/home" 2>/dev/null); do
39 [ -d "$1/home/$i/.ncmpcpp" ] && continue
40 # Enabling configuration files for $i...
41 cp -a "$1/etc/skel/.ncmpcpp" "$1/home/$i/"
42 sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' "/home/$i/.ncmpcpp/config"
43 # Change permissions also
44 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.ncmpcpp"
45 done
46 }
48 post_remove() {
49 rm -rf /home/*/.ncmpcpp
50 }