wok-6.x annotate iaxmodem/receipt @ rev 24412
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 09 21:05:34 2022 +0000 (2022-02-09) |
parents | e934c9bb7903 |
children | 33e6950ad273 |
rev | line source |
---|---|
pascal@14765 | 1 # SliTaz package receipt. |
pascal@14765 | 2 |
pascal@14765 | 3 PACKAGE="iaxmodem" |
Hans-G?nter@21041 | 4 VERSION="1.3.0" |
pascal@14765 | 5 CATEGORY="network" |
pascal@14765 | 6 SHORT_DESC="Software modem for libiax2." |
pascal@14765 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14765 | 8 LICENSE="GPL2" |
Hans-G?nter@21041 | 9 WEB_SITE="https://sourceforge.net/projects/iaxmodem/" |
Hans-G?nter@21041 | 10 |
pascal@14765 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@14765 | 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@14765 | 13 |
pascal@14765 | 14 DEPENDS="jpeg tiff zlib hylafax" |
pascal@20569 | 15 BUILD_DEPENDS="jpeg-dev tiff-dev zlib-dev file" |
Hans-G?nter@21041 | 16 CONFIG_FILES="/etc/iaxmodem" |
pascal@14765 | 17 |
pascal@24412 | 18 # What is the latest version available today? |
pascal@24412 | 19 current_version() |
pascal@24412 | 20 { |
pascal@24412 | 21 wget -O - https://sourceforge.net/projects/iaxmodem/files/iaxmodem/ 2>/dev/null | \ |
pascal@24412 | 22 sed '/scope="row/!d;/tar/!d;s|.*/iaxmodem-||;s|.tar.*||;q' |
pascal@24412 | 23 } |
pascal@24412 | 24 |
pascal@14765 | 25 # Rules to configure and make the package. |
pascal@14765 | 26 compile_rules() |
pascal@14765 | 27 { |
pascal@14765 | 28 #sed -i 's/uucp/root/' iaxmodem.c |
Hans-G?nter@21041 | 29 |
Hans-G?nter@21041 | 30 ./configure \ |
Hans-G?nter@21041 | 31 --prefix=/usr \ |
Hans-G?nter@21041 | 32 --infodir=/usr/share/info \ |
Hans-G?nter@21041 | 33 --mandir=/usr/share/man \ |
Hans-G?nter@21041 | 34 $CONFIGURE_ARGS && |
Hans-G?nter@21041 | 35 make |
pascal@14765 | 36 } |
pascal@14765 | 37 |
pascal@14765 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@14765 | 39 genpkg_rules() |
pascal@14765 | 40 { |
Hans-G?nter@21041 | 41 mkdir -p \ |
Hans-G?nter@21041 | 42 $fs/usr/bin \ |
Hans-G?nter@21041 | 43 $fs/etc/iaxmodem \ |
Hans-G?nter@21041 | 44 $fs/var/log/iaxmodem |
Hans-G?nter@21041 | 45 |
pascal@14765 | 46 cp -a $src/iaxmodem $fs/usr/bin |
Hans-G?nter@21041 | 47 |
pascal@14765 | 48 cat > $fs/etc/iaxmodem/ttyIAX0 <<EOT |
pascal@14765 | 49 device /dev/ttyIAX0 |
pascal@14765 | 50 owner root:root |
pascal@14765 | 51 mode 660 |
pascal@14765 | 52 port 4570 |
pascal@14765 | 53 refresh 60 |
pascal@14765 | 54 server 127.0.0.1 |
pascal@14765 | 55 peername iaxmodem |
pascal@14765 | 56 secret password |
pascal@14765 | 57 codec alaw |
pascal@14765 | 58 EOT |
pascal@14765 | 59 #owner uucp:uucp |
pascal@14765 | 60 #refresh 50 |
pascal@14765 | 61 } |
pascal@14765 | 62 |
pascal@14765 | 63 pre_remove() |
pascal@14765 | 64 { |
pascal@18730 | 65 sed -i '/iaxmodem/d' "$1/etc/inittab" |
pascal@14765 | 66 } |
pascal@14765 | 67 |
pascal@14765 | 68 # Pre and post install commands for Tazpkg. |
pascal@14765 | 69 post_install() |
pascal@14765 | 70 { |
pascal@18730 | 71 grep -q ^uucp: "$1/etc/passwd" || { |
pascal@18730 | 72 chroot "$1/" adduser -s /bin/false -S -D -H uucp |
pascal@18730 | 73 sed -i 's/^uucp:x:[0-9]*:[0-9]*:/uucp:x:0:0:/' "$1/etc/passwd" |
pascal@14765 | 74 } |
pascal@18730 | 75 grep -q ^uucp: "$1/etc/group" || chroot "$1/" addgroup uucp |
Hans-G?nter@21041 | 76 |
pascal@18730 | 77 touch "$1/var/log/iaxmodem/ttyIAX0" "$1/var/log/iaxmodem/iaxmodem" |
Hans-G?nter@21041 | 78 |
pascal@18730 | 79 grep iaxmodem "$1/etc/inittab" || cat >> "$1/etc/inittab" << EOT |
pascal@14765 | 80 ::respawn:/usr/bin/iaxmodem ttyIAX0 > /var/log/iaxmodem.log 2>&1 |
pascal@14765 | 81 ::respawn:/usr/sbin/faxgetty ttyIAX0 |
pascal@14765 | 82 EOT |
Hans-G?nter@21041 | 83 |
pascal@18730 | 84 [ "$1" ] || kill -1 1 |
pascal@14765 | 85 } |