wok view ncmpcpp/receipt @ rev 21649

Up ffmpegthumbnailer-dev (2.2.0), lucene++-dev (3.0.7+git), xine-fonts (1.2.9)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 30 10:51:27 2019 +0200 (2019-05-30)
parents 970c5ec9a60a
children 241fb98cab1c
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="https://rybczak.net/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 $fs/etc/skel/.ncmpcpp
35 cp -a $install/usr/bin $fs/usr
36 cp -a $install/usr/share/doc $fs/usr/share
37 ln $fs/usr/share/doc/ncmpcpp/config $fs/etc/skel/.ncmpcpp
38 ln $fs/usr/share/doc/ncmpcpp/keys $fs/etc/skel/.ncmpcpp
39 }
41 post_install()
42 {
43 for i in $(ls "$1/home" 2> /dev/null); do
44 [ -d "$1/home/$i/.ncmpcpp" ] && continue
45 echo
46 echo -n "Enabling configuration files for $i ..."
47 cp -a "$1/etc/skel/.ncmpcpp" "$1/home/$i/"
48 sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' "/home/$i/.ncmpcpp/config"
49 # Change permissions also
50 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.ncmpcpp"
51 done
52 status
53 }
55 post_remove()
56 {
57 echo -n "Removing configuration files..."
58 rm -rf /home/*/.ncmpcpp
59 status
60 }