wok annotate iaxmodem/receipt @ rev 25539

Up perl-test-compile (3.1.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 09 12:11:13 2023 +0000 (20 months ago)
parents ad0bc3efbf37
children
rev   line source
pascal@14765 1 # SliTaz package receipt.
pascal@14765 2
pascal@14765 3 PACKAGE="iaxmodem"
Hans-G?nter@24656 4 VERSION="1.3.3"
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"
pascal@25510 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
Hans-G?nter@24656 14 DEPENDS="hylafax jpeg tiff zlib"
Hans-G?nter@24656 15 BUILD_DEPENDS="file jpeg-dev tiff-dev zlib-dev"
Hans-G?nter@24656 16
Hans-G?nter@21041 17 CONFIG_FILES="/etc/iaxmodem"
pascal@14765 18
pascal@24412 19 # What is the latest version available today?
pascal@24412 20 current_version()
pascal@24412 21 {
pascal@24412 22 wget -O - https://sourceforge.net/projects/iaxmodem/files/iaxmodem/ 2>/dev/null | \
pascal@24412 23 sed '/scope="row/!d;/tar/!d;s|.*/iaxmodem-||;s|.tar.*||;q'
pascal@24412 24 }
pascal@24412 25
pascal@14765 26 # Rules to configure and make the package.
pascal@14765 27 compile_rules()
pascal@14765 28 {
pascal@14765 29 #sed -i 's/uucp/root/' iaxmodem.c
Hans-G?nter@21041 30
Hans-G?nter@21041 31 ./configure \
Hans-G?nter@21041 32 --prefix=/usr \
Hans-G?nter@21041 33 --infodir=/usr/share/info \
Hans-G?nter@21041 34 --mandir=/usr/share/man \
Hans-G?nter@21041 35 $CONFIGURE_ARGS &&
Hans-G?nter@21041 36 make
pascal@14765 37 }
pascal@14765 38
pascal@14765 39 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@14765 40 genpkg_rules()
pascal@14765 41 {
Hans-G?nter@24656 42 mkdir -p $fs/etc/iaxmodem
Hans-G?nter@24656 43 mkdir -p $fs/usr/bin
Hans-G?nter@24656 44 mkdir -p $fs/var/log/iaxmodem
Hans-G?nter@21041 45
Hans-G?nter@24656 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
Hans-G?nter@24656 68 # Post install commands for Tazpkg.
pascal@14765 69 post_install()
pascal@14765 70 {
Hans-G?nter@24656 71 grep -q ^uucp: "$1/etc/passwd" ||
Hans-G?nter@24656 72 {
pascal@18730 73 chroot "$1/" adduser -s /bin/false -S -D -H uucp
pascal@18730 74 sed -i 's/^uucp:x:[0-9]*:[0-9]*:/uucp:x:0:0:/' "$1/etc/passwd"
pascal@14765 75 }
Hans-G?nter@24656 76
pascal@18730 77 grep -q ^uucp: "$1/etc/group" || chroot "$1/" addgroup uucp
Hans-G?nter@21041 78
pascal@18730 79 touch "$1/var/log/iaxmodem/ttyIAX0" "$1/var/log/iaxmodem/iaxmodem"
Hans-G?nter@21041 80
pascal@18730 81 grep iaxmodem "$1/etc/inittab" || cat >> "$1/etc/inittab" << EOT
pascal@14765 82 ::respawn:/usr/bin/iaxmodem ttyIAX0 > /var/log/iaxmodem.log 2>&1
pascal@14765 83 ::respawn:/usr/sbin/faxgetty ttyIAX0
pascal@14765 84 EOT
Hans-G?nter@21041 85
pascal@18730 86 [ "$1" ] || kill -1 1
pascal@14765 87 }