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