wok-current annotate iaxmodem/receipt @ rev 20686
Up gtkdialog (0.8.3)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jan 28 13:13:48 2019 +0100 (2019-01-28) |
parents | 9e01bc6321ea |
children | e934c9bb7903 |
rev | line source |
---|---|
pascal@14765 | 1 # SliTaz package receipt. |
pascal@14765 | 2 |
pascal@14765 | 3 PACKAGE="iaxmodem" |
pascal@14765 | 4 VERSION="1.2.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" |
pascal@14765 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@14765 | 10 WEB_SITE="http://iaxmodem.sourceforge.net/" |
pascal@14765 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@14765 | 12 CONFIG_FILES="/etc/iaxmodem" |
pascal@14765 | 13 |
pascal@14765 | 14 DEPENDS="jpeg tiff zlib hylafax" |
pascal@20569 | 15 BUILD_DEPENDS="jpeg-dev tiff-dev zlib-dev file" |
pascal@14765 | 16 |
pascal@14765 | 17 # Rules to configure and make the package. |
pascal@14765 | 18 compile_rules() |
pascal@14765 | 19 { |
pascal@14765 | 20 #sed -i 's/uucp/root/' iaxmodem.c |
pascal@14765 | 21 ./configure --prefix=/usr --infodir=/usr/share/info \ |
pascal@14765 | 22 --mandir=/usr/share/man \ |
pascal@14765 | 23 $CONFIGURE_ARGS && make |
pascal@14765 | 24 } |
pascal@14765 | 25 |
pascal@14765 | 26 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@14765 | 27 genpkg_rules() |
pascal@14765 | 28 { |
pascal@14765 | 29 mkdir -p $fs/usr/bin $fs/etc/iaxmodem $fs/var/log/iaxmodem |
pascal@14765 | 30 cp -a $src/iaxmodem $fs/usr/bin |
pascal@14765 | 31 cat > $fs/etc/iaxmodem/ttyIAX0 <<EOT |
pascal@14765 | 32 device /dev/ttyIAX0 |
pascal@14765 | 33 owner root:root |
pascal@14765 | 34 mode 660 |
pascal@14765 | 35 port 4570 |
pascal@14765 | 36 refresh 60 |
pascal@14765 | 37 server 127.0.0.1 |
pascal@14765 | 38 peername iaxmodem |
pascal@14765 | 39 secret password |
pascal@14765 | 40 codec alaw |
pascal@14765 | 41 EOT |
pascal@14765 | 42 #owner uucp:uucp |
pascal@14765 | 43 #refresh 50 |
pascal@14765 | 44 } |
pascal@14765 | 45 |
pascal@14765 | 46 pre_remove() |
pascal@14765 | 47 { |
pascal@18730 | 48 sed -i '/iaxmodem/d' "$1/etc/inittab" |
pascal@14765 | 49 } |
pascal@14765 | 50 |
pascal@14765 | 51 # Pre and post install commands for Tazpkg. |
pascal@14765 | 52 post_install() |
pascal@14765 | 53 { |
pascal@18730 | 54 grep -q ^uucp: "$1/etc/passwd" || { |
pascal@18730 | 55 chroot "$1/" adduser -s /bin/false -S -D -H uucp |
pascal@18730 | 56 sed -i 's/^uucp:x:[0-9]*:[0-9]*:/uucp:x:0:0:/' "$1/etc/passwd" |
pascal@14765 | 57 } |
pascal@18730 | 58 grep -q ^uucp: "$1/etc/group" || chroot "$1/" addgroup uucp |
pascal@18730 | 59 touch "$1/var/log/iaxmodem/ttyIAX0" "$1/var/log/iaxmodem/iaxmodem" |
pascal@18730 | 60 grep iaxmodem "$1/etc/inittab" || cat >> "$1/etc/inittab" << EOT |
pascal@14765 | 61 ::respawn:/usr/bin/iaxmodem ttyIAX0 > /var/log/iaxmodem.log 2>&1 |
pascal@14765 | 62 ::respawn:/usr/sbin/faxgetty ttyIAX0 |
pascal@14765 | 63 EOT |
pascal@18730 | 64 [ "$1" ] || kill -1 1 |
pascal@14765 | 65 } |