Andreas Wacknitz
2024-03-24 3df02058fb3d48a999bbc8d5d56c2910fbc249a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"). You may
# only use this file in accordance with the terms of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
 
#
# Copyright 2022 Friedrich Kink
# Copyright 2023 Niklas Poslovski
#
 
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME=        iaxmodem
COMPONENT_VERSION=    1.3.4
#COMPONENT_REVISION=    1
COMPONENT_FMRI=        network/iaxmodem
COMPONENT_SUMMARY=    IAXmodem is a software modem written in C that uses an IAX channel
COMPONENT_DESCRIPTION=    IAXmodem is a software modem written in C that uses an IAX channel \
    (commonly provided by an Asterisk PBX system) instead of a traditional \
    phone line and uses a DSP library instead of DSP hardware chipsets. \
    To accomplish this, then, IAXmodem interfaces an IAX library known as \
    libiax2 with a DSP library known as spandsp, and then IAXmodem interfaces \
    the DSP library with a tty device node for interfacing with modem \
    applications.
COMPONENT_CLASSIFICATION=Applications/Internet
COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH=    sha256:900de2f77072bce02786fe7f4d4ddfd4b9f5fe3255b1319772383099adee5633
COMPONENT_PROJECT_URL=    https://iaxmodem.sourceforge.net/
COMPONENT_ARCHIVE_URL=    https://sourceforge.net/projects/iaxmodem/files/latest/$(COMPONENT_ARCHIVE)
COMPONENT_LICENSE=    GPLv2
 
TEST_TARGET=$(NO_TESTS) 
 
include $(WS_MAKE_RULES)/common.mk
 
#
# despite not a real autotools setup it works with some adaptions
# as seen in COMPONENT_POST_CONFIGURE_ACTION and COMPONENT_POST_INSTALL_ACTION
#
 
COMPONENT_PRE_CONFIGURE_ACTION += ($(CLONEY) $(SOURCE_DIR) $(@D));
 
COMPONENT_POST_CONFIGURE_ACTION += ( \
     $(GSED) -i -e 's/-DSTATICLIBS -DUSE_UNIX98_PTY/-DSTATICLIBS -D__EXTENSIONS__ -DSOLARIS -DUSE_UNIX98_PTY/' $(@D)/Makefile; \
     $(GSED) -i -e 's/-DMODEMVER/-m64 -DMODEMVER/' $(@D)/Makefile; \
     $(GSED) -i -e 's:Ilib/libiax2/src:I/usr/include/iax:' $(@D)/Makefile; \
     $(GSED) -i -e 's: lib/libiax2/src/.libs/libiax.a: -liax:' $(@D)/Makefile; \
     $(GSED) -i -e 's/-lm -lutil -ltiff/-m64 -lm -lnsl -lsocket -ltiff/' $(@D)/Makefile; \
     );
 
CFLAGS+=    -DSOLARIS $(JPEG_CPPFLAGS) $(JPEG_CFLAGS)
CFLAGS+=    $(CPP_LARGEFILES)
CXXFLAGS+=    $(JPEG_CPPFLAGS) $(JPEG_CXXFLAGS)
LDFLAGS+=    $(JPEG_LDFLAGS)
 
COMPONENT_INSTALL_TARGETS=    all
 
COMPONENT_POST_INSTALL_ACTION= ( \
    $(MKDIR) -p $(PROTO_DIR)/usr/sbin; \
    $(MKDIR) -p $(PROTO_DIR)/usr/share/man/man1; \
    $(MKDIR) -p $(PROTO_DIR)/etc/iaxmodem; \
    $(CP) $(@D)/$(COMPONENT_NAME) $(PROTO_DIR)/usr/sbin; \
    $(CP) $(@D)/$(COMPONENT_NAME).1 $(PROTO_DIR)/usr/share/man/man1; \
    $(CP) files/ttyIAX0.example $(PROTO_DIR)/etc/iaxmodem; \
    $(CP) files/config.ttyIAX $(PROTO_DIR)/etc/iaxmodem; \
    );
# Auto-generated dependencies
REQUIRED_PACKAGES += SUNWcs
REQUIRED_PACKAGES += library/libiax2
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math