wok annotate ncmpcpp/receipt @ rev 25234
updated python-routes (2.4.1 -> 2.5.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jul 13 17:31:59 2022 +0100 (2022-07-13) |
parents | eeba7ab1dffe |
children |
rev | line source |
---|---|
paul@4546 | 1 # SliTaz package receipt. |
paul@4546 | 2 |
paul@4546 | 3 PACKAGE="ncmpcpp" |
paul@13373 | 4 VERSION="0.5.10" |
paul@4546 | 5 CATEGORY="multimedia" |
paul@4546 | 6 SHORT_DESC="Ncurses mpd client inspired by ncmpc." |
paul@4546 | 7 MAINTAINER="paul@slitaz.org" |
pascal@15002 | 8 LICENSE="GPL2" |
paul@4546 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pascal@20674 | 10 WEB_SITE="https://rybczak.net/ncmpcpp/" |
pascal@13374 | 11 WGET_URL="http://ncmpcpp.rybczak.net/stable/$TARBALL" |
jozee@4969 | 12 TAGS="music audio player" |
paul@4546 | 13 |
pascal@15002 | 14 DEPENDS="ncurses taglib mpd curl libmpdclient ncursesw" |
pascal@15002 | 15 BUILD_DEPENDS="ncurses-dev taglib taglib-dev curl-dev libmpdclient-dev" |
pascal@15002 | 16 |
pascal@24453 | 17 # What is the latest version available today? |
pascal@24453 | 18 current_version() |
pascal@24453 | 19 { |
pascal@24453 | 20 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ |
pascal@24453 | 21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24453 | 22 } |
pascal@24453 | 23 |
paul@4546 | 24 # Rules to configure and make the package. |
paul@4546 | 25 compile_rules() |
paul@4546 | 26 { |
paul@4546 | 27 cd $src |
paul@4546 | 28 ./configure \ |
paul@4546 | 29 --prefix=/usr \ |
paul@4546 | 30 --enable-clock \ |
paul@4546 | 31 --with-taglib \ |
paul@4546 | 32 --with-curl \ |
paul@4546 | 33 --mandir=/usr/share/man \ |
paul@4546 | 34 $CONFIGURE_ARGS && |
slaxemulator@10205 | 35 make && make install |
paul@4546 | 36 } |
paul@4546 | 37 |
paul@4546 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@4546 | 39 genpkg_rules() |
paul@4546 | 40 { |
pascal@17085 | 41 mkdir -p $fs/usr/share $fs/etc/skel/.ncmpcpp |
pascal@13374 | 42 cp -a $install/usr/bin $fs/usr |
pascal@13374 | 43 cp -a $install/usr/share/doc $fs/usr/share |
pascal@17085 | 44 ln $fs/usr/share/doc/ncmpcpp/config $fs/etc/skel/.ncmpcpp |
pascal@17085 | 45 ln $fs/usr/share/doc/ncmpcpp/keys $fs/etc/skel/.ncmpcpp |
paul@4546 | 46 } |
paul@4546 | 47 |
paul@4546 | 48 post_install() |
paul@4546 | 49 { |
pascal@18730 | 50 for i in $(ls "$1/home" 2> /dev/null); do |
pascal@18730 | 51 [ -d "$1/home/$i/.ncmpcpp" ] && continue |
pascal@20319 | 52 echo |
pascal@17085 | 53 echo -n "Enabling configuration files for $i ..." |
pascal@18730 | 54 cp -a "$1/etc/skel/.ncmpcpp" "$1/home/$i/" |
pascal@18730 | 55 sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' "/home/$i/.ncmpcpp/config" |
pascal@17080 | 56 # Change permissions also |
pascal@18730 | 57 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.ncmpcpp" |
pascal@17080 | 58 done |
paul@4546 | 59 status |
paul@4546 | 60 } |
paul@4546 | 61 |
paul@4546 | 62 post_remove() |
paul@4546 | 63 { |
paul@4546 | 64 echo -n "Removing configuration files..." |
pascal@17080 | 65 rm -rf /home/*/.ncmpcpp |
paul@4546 | 66 status |
paul@4546 | 67 } |