wok-current view 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 |
line source
1 # SliTaz package receipt.
3 PACKAGE="iaxmodem"
4 VERSION="1.3.0"
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="jpeg tiff zlib hylafax"
15 BUILD_DEPENDS="jpeg-dev tiff-dev zlib-dev file"
16 CONFIG_FILES="/etc/iaxmodem"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - https://sourceforge.net/projects/iaxmodem/files/iaxmodem/ 2>/dev/null | \
22 sed '/scope="row/!d;/tar/!d;s|.*/iaxmodem-||;s|.tar.*||;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 #sed -i 's/uucp/root/' iaxmodem.c
30 ./configure \
31 --prefix=/usr \
32 --infodir=/usr/share/info \
33 --mandir=/usr/share/man \
34 $CONFIGURE_ARGS &&
35 make
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p \
42 $fs/usr/bin \
43 $fs/etc/iaxmodem \
44 $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 # Pre and post install commands for Tazpkg.
69 post_install()
70 {
71 grep -q ^uucp: "$1/etc/passwd" || {
72 chroot "$1/" adduser -s /bin/false -S -D -H uucp
73 sed -i 's/^uucp:x:[0-9]*:[0-9]*:/uucp:x:0:0:/' "$1/etc/passwd"
74 }
75 grep -q ^uucp: "$1/etc/group" || chroot "$1/" addgroup uucp
77 touch "$1/var/log/iaxmodem/ttyIAX0" "$1/var/log/iaxmodem/iaxmodem"
79 grep iaxmodem "$1/etc/inittab" || cat >> "$1/etc/inittab" << EOT
80 ::respawn:/usr/bin/iaxmodem ttyIAX0 > /var/log/iaxmodem.log 2>&1
81 ::respawn:/usr/sbin/faxgetty ttyIAX0
82 EOT
84 [ "$1" ] || kill -1 1
85 }