wok view ncmpcpp/receipt @ rev 24797
updated libhtp and libhtp-dev (0.5.32 -> 0.5.39)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Mar 21 17:10:45 2022 +0100 (2022-03-21) |
parents | eeba7ab1dffe |
children |
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 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 cd $src
28 ./configure \
29 --prefix=/usr \
30 --enable-clock \
31 --with-taglib \
32 --with-curl \
33 --mandir=/usr/share/man \
34 $CONFIGURE_ARGS &&
35 make && make install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/share $fs/etc/skel/.ncmpcpp
42 cp -a $install/usr/bin $fs/usr
43 cp -a $install/usr/share/doc $fs/usr/share
44 ln $fs/usr/share/doc/ncmpcpp/config $fs/etc/skel/.ncmpcpp
45 ln $fs/usr/share/doc/ncmpcpp/keys $fs/etc/skel/.ncmpcpp
46 }
48 post_install()
49 {
50 for i in $(ls "$1/home" 2> /dev/null); do
51 [ -d "$1/home/$i/.ncmpcpp" ] && continue
52 echo
53 echo -n "Enabling configuration files for $i ..."
54 cp -a "$1/etc/skel/.ncmpcpp" "$1/home/$i/"
55 sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' "/home/$i/.ncmpcpp/config"
56 # Change permissions also
57 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.ncmpcpp"
58 done
59 status
60 }
62 post_remove()
63 {
64 echo -n "Removing configuration files..."
65 rm -rf /home/*/.ncmpcpp
66 status
67 }