wok view iaxmodem/receipt @ rev 23043

gcc83-lib-base: add /usr/libgcc83/libstdc++.la (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 05 12:21:44 2020 +0100 (2020-03-05)
parents 3132d67b7e38
children ba7cbdb5749c
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 # Rules to configure and make the package.
19 compile_rules()
20 {
21 #sed -i 's/uucp/root/' iaxmodem.c
23 ./configure \
24 --prefix=/usr \
25 --infodir=/usr/share/info \
26 --mandir=/usr/share/man \
27 $CONFIGURE_ARGS &&
28 make
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p \
35 $fs/usr/bin \
36 $fs/etc/iaxmodem \
37 $fs/var/log/iaxmodem
39 cp -a $src/iaxmodem $fs/usr/bin
41 cat > $fs/etc/iaxmodem/ttyIAX0 <<EOT
42 device /dev/ttyIAX0
43 owner root:root
44 mode 660
45 port 4570
46 refresh 60
47 server 127.0.0.1
48 peername iaxmodem
49 secret password
50 codec alaw
51 EOT
52 #owner uucp:uucp
53 #refresh 50
54 }
56 pre_remove()
57 {
58 sed -i '/iaxmodem/d' "$1/etc/inittab"
59 }
61 # Pre and post install commands for Tazpkg.
62 post_install()
63 {
64 grep -q ^uucp: "$1/etc/passwd" || {
65 chroot "$1/" adduser -s /bin/false -S -D -H uucp
66 sed -i 's/^uucp:x:[0-9]*:[0-9]*:/uucp:x:0:0:/' "$1/etc/passwd"
67 }
68 grep -q ^uucp: "$1/etc/group" || chroot "$1/" addgroup uucp
70 touch "$1/var/log/iaxmodem/ttyIAX0" "$1/var/log/iaxmodem/iaxmodem"
72 grep iaxmodem "$1/etc/inittab" || cat >> "$1/etc/inittab" << EOT
73 ::respawn:/usr/bin/iaxmodem ttyIAX0 > /var/log/iaxmodem.log 2>&1
74 ::respawn:/usr/sbin/faxgetty ttyIAX0
75 EOT
77 [ "$1" ] || kill -1 1
78 }