wok-6.x view iaxmodem/receipt @ rev 25018

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