wok-current view ncmpcpp/receipt @ rev 17080

ncmpcpp/receipt, remind/receipt, tiptop/receipt, tmux-mem-cpu-load/receipt: update user config file
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 24 21:21:42 2014 +0200 (2014-08-24)
parents 7896f0694ef6
children ce9cbd90365a
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://unkart.ovh.org/ncmpcpp/"
11 WGET_URL="http://ncmpcpp.rybczak.net/stable/$TARBALL"
12 TAGS="music audio player"
14 DEPENDS="ncurses taglib mpd curl libmpdclient ncursesw"
15 BUILD_DEPENDS="ncurses-dev taglib taglib-dev curl-dev libmpdclient-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure \
22 --prefix=/usr \
23 --enable-clock \
24 --with-taglib \
25 --with-curl \
26 --mandir=/usr/share/man \
27 $CONFIGURE_ARGS &&
28 make && make install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/share
35 cp -a $install/usr/bin $fs/usr
36 cp -a $install/usr/share/doc $fs/usr/share
37 }
39 post_install()
40 {
41 echo -n "Enabling configuration files..."
42 for i in $(ls $1/home); do
43 mkdir -p $1/home/$i/.ncmpcpp
44 cp $1/etc/skel/.tiptoprc $1/home/$i
45 cp $1/usr/share/doc/ncmpcpp/config /home/$i/.ncmpcpp
46 cp $1/usr/share/doc/ncmpcpp/keys /home/$i/.ncmpcpp
47 sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' /home/$i/.ncmpcpp/config
48 # Change permissions also
49 chroot $1/ chown -R $i.users /home/$i/.ncmpcpp
50 done
51 status
52 }
54 post_remove()
55 {
56 echo -n "Removing configuration files..."
57 rm -rf /home/*/.ncmpcpp
58 status
59 }