wok-next view ncmpcpp/receipt @ rev 20430

fake-sane: fix copy-paste typo
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jan 24 13:29:11 2018 +0200 (2018-01-24)
parents 9e01bc6321ea
children d43bf7aae921
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"
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 ./configure \
21 --prefix=/usr \
22 --enable-clock \
23 --with-taglib \
24 --with-curl \
25 --mandir=/usr/share/man \
26 $CONFIGURE_ARGS &&
27 make && make install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr/share $fs/etc/skel/.ncmpcpp
34 cp -a $install/usr/bin $fs/usr
35 cp -a $install/usr/share/doc $fs/usr/share
36 ln $fs/usr/share/doc/ncmpcpp/config $fs/etc/skel/.ncmpcpp
37 ln $fs/usr/share/doc/ncmpcpp/keys $fs/etc/skel/.ncmpcpp
38 }
40 post_install()
41 {
42 for i in $(ls "$1/home" 2> /dev/null); do
43 [ -d "$1/home/$i/.ncmpcpp" ] && continue
44 echo -n "Enabling configuration files for $i ..."
45 cp -a "$1/etc/skel/.ncmpcpp" "$1/home/$i/"
46 sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' "/home/$i/.ncmpcpp/config"
47 # Change permissions also
48 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.ncmpcpp"
49 done
50 status
51 }
53 post_remove()
54 {
55 echo -n "Removing configuration files..."
56 rm -rf /home/*/.ncmpcpp
57 status
58 }