diff --git a/net/Makefile b/net/Makefile --- a/net/Makefile +++ b/net/Makefile @@ -555,6 +555,7 @@ SUBDIR += openpgm SUBDIR += openradius SUBDIR += openrsync + SUBDIR += opensips31 SUBDIR += openslp SUBDIR += opentracker SUBDIR += openvswitch diff --git a/net/opensips31/Makefile b/net/opensips31/Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/Makefile @@ -0,0 +1,104 @@ +PORTNAME= opensips31 +DISTVERSION= 3.1.2 +CATEGORIES= net +MASTER_SITES= https://opensips.org/pub/opensips/${DISTVERSION}/ +DISTNAME= opensips-${DISTVERSION} + +MAINTAINER= bambyster@gmail.com +COMMENT= Open SIP Server + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= gm4:devel/m4 +LIB_DEPENDS= libconfuse.so:devel/libconfuse \ + libcurl.so:ftp/curl \ + libexpat.so:textproc/expat2 \ + libhiredis.so:databases/hiredis \ + libjson-c.so:devel/json-c \ + libjwt.so:www/libjwt \ + libpcre.so:devel/pcre \ + librabbitmq.so:net/rabbitmq-c-devel \ + libuuid.so:misc/e2fsprogs-libuuid + +USES= gettext-runtime gmake gnome localbase:ldflags ncurses perl5 \ + pkgconfig python shebangfix ssl +USE_GNOME= libxml2 +SHEBANG_GLOB= *.pl *.sh + +USE_RC_SUBR= ${PORTNAME} + +USERS= opensips +GROUPS= opensips + +CFLAGS+= -pthread +CXXFLAGS+= -pthread +LDFLAGS+= -pthread + +MAKE_ENV+= BASEDIR=${STAGEDIR} \ + INSTALL_BIN="${INSTALL_PROGRAM}" \ + INSTALL_CFG="${INSTALL_DATA}" \ + INSTALL_DOC="${INSTALL_DATA}" \ + INSTALL_MODULES="${INSTALL_PROGRAM}" \ + JSON_BUILDER="pkgconf json-c" \ + NICER=0 \ + PYTHON=${PYTHON_CMD} + +OPTIONS_DEFINE= DEBUG DOCS EXAMPLES HTTP LDAP MEMCACHED MYSQL PGSQL \ + RADIUS SQLITE TESTS TLS UNIXODBC +OPTIONS_DEFAULT= HTTP LDAP MEMCACHED PGSQL RADIUS TLS +OPTIONS_SUB= yes + +HTTP_DESC= Enable HTTP transport via libmicrohttpd +MEMCACHED_DESC= Build with memcached support +TESTS_DESC= Install smoke tests + +HTTP_LIB_DEPENDS= libmicrohttpd.so:www/libmicrohttpd +HTTP_VARS= EXTRA_MODULES+=httpd + +LDAP_USE= OPENLDAP=yes +LDAP_VARS= EXTRA_MODULES+="ldap h350" + +MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached +MEMCACHED_VARS= EXTRA_MODULES+=cachedb_memcached + +MYSQL_USES= mysql:client +MYSQL_VARS= EXTRA_MODULES+=db_mysql + +PGSQL_BUILD_DEPENDS= p5-DBD-Pg>=3.4:databases/p5-DBD-Pg +PGSQL_USES= pgsql +WANT_PGSQL= client +PGSQL_VARS= EXTRA_MODULES+=db_postgres + +RADIUS_LIB_DEPENDS= libradiusclient-ng.so:net/radiusclient +RADIUS_VARS= EXTRA_MODULES+=aaa_radius + +SQLITE_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 +SQLITE_VARS= EXTRA_MODULES+=db_sqlite + +TLS_VARS= EXTRA_MODULES+="proto_tls proto_wss tls_mgm" + +UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC +UNIXODBC_VARS= EXTRA_MODULES+=db_unixodbc + +.include + +post-patch: + @(${CP} files/Makefile.conf ${WRKSRC}) +.for i in ${EXTRA_MODULES} + @${REINPLACE_CMD} -e "s/\(^include_modules=.*\)/\1 ${i}/" ${WRKSRC}/Makefile.conf +.endfor + +do-configure-DEBUG-off: + @${REINPLACE_CMD} -e "s/^#DEFS+= -DNO_DEBUG/DEFS+= -DNO_DEBUG/" ${WRKSRC}/Makefile.conf + +do-install-TESTS-on: + ${CP} -r ${WRKSRC}/test ${STAGEDIR}${PREFIX}/tests/${PORTNAME} + +do-install-EXAMPLES-on: + ${CP} -r ${WRKSRC}/examples ${STAGEDIR}${PREFIX}/share/examples/${PORTNAME} + +post-install-RADIUS-on: + ${MV} ${STAGEDIR}${ETCDIR}/dictionary.opensips ${STAGEDIR}${ETCDIR}/dictionary.opensips.sample + +.include diff --git a/net/opensips31/distinfo b/net/opensips31/distinfo new file mode 100644 --- /dev/null +++ b/net/opensips31/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1622537802 +SHA256 (opensips-3.1.2.tar.gz) = 557b33db1436d8212ac122f299481bee3f2957f060a2bc0b4256430faf8b3bbc +SIZE (opensips-3.1.2.tar.gz) = 6362581 diff --git a/net/opensips31/files/Makefile.conf b/net/opensips31/files/Makefile.conf new file mode 100644 --- /dev/null +++ b/net/opensips31/files/Makefile.conf @@ -0,0 +1,100 @@ +#aaa_radius= Radius implementation for the AAA API from the core | Radius client development library, typically radiusclient-ng 0.5.0 or higher +#auth_jwt= JWT auth support | JWT client development library, libjwt-dev +#b2b_logic= Logic engine of B2BUA, responsible of actually implementing the B2BUA services | xml parsing development library, typically libxml2-dev +#cachedb_cassandra= Implementation of a cache system designed to work with Cassandra servers | thrift 0.6.1 +#cachedb_couchbase= Implementation of a cache system designed to work with CouchBase servers | libcouchbase >= 2.0 +#cachedb_memcached= Implementation of a cache system designed to work with a memcached server. | Memcached client library, typically libmemcached +#cachedb_mongodb= Implementation of a cache system designed to work with a MongoDB server. | libjson and the mongo-c-driver +#cachedb_redis= Implementation of a cache system designed to work with Redis servers | Redis client library, hiredis +#carrierroute= Provides routing, balancing and blacklisting capabilities. | libconfuse, a configuration file parser library +#cgrates= Provides integration with the CGRateS billing/rating engine. | JSON library, libjson +#compression= Implements SIP message compression/decompression and base64 encoding | zlib dev library, typically zlib1g-dev +#cpl_c= Implements a CPL (Call Processing Language) interpreter | library for parsing XML files, typically libxml2 and libxml2-devel +#db_berkeley= Integrates the Berkeley DB into OpenSIPS | Berkeley embedded database +#db_http= Provides access to a database that is implemented as a HTTP server. | CURL library - libcurl +#db_mysql= Provides MySQL connectivity for OpenSIPS | development libraries of mysql-client , typically libmysqlclient-dev +#db_oracle= Provides Oracle connectivity for OpenSIPS. | Development library of OCI, typically instantclient-sdk-10.2.0.3 +#db_perlvdb= Provides a virtualization framework for OpenSIPS's database access. | Perl library development files, typically libperl-dev +#db_postgres= Provides Postgres connectivity for OpenSIPS | PostgreSQL library and development library - typically libpq5 and libpq-dev +#db_sqlite= Provides SQLite connectivity for OpenSIPS | SQLite library and development library - typically libsqlite3 and libsqlite3-dev +#db_unixodbc= Allows to use the unixodbc package with OpenSIPS | ODBC library and ODBC development library +#dialplan= Implements generic string translations based on matching and replacement rules | PCRE development library, typically libpcre-dev +#emergency= Provides emergency call treatment for OpenSIPS | CURL dev library - typically libcurl4-openssl-dev +#event_rabbitmq= Provides the implementation of a RabbitMQ client for the Event Interface | RabbitMQ development library, librabbitmq-dev +#h350= Enables access to SIP account data stored in an LDAP [RFC4510] directory containing H.350 commObjects | OpenLDAP library & development files, typically libldap and libldap-dev +#regex= Offers matching operations against regular expressions using the powerful PCRE library. | Development library for PCRE, typically libpcre-dev +#identity= Adds support for SIP Identity (see RFC 4474). | SSL library, typically libssl +#jabber= Integrates XODE XML parser for parsing Jabber messages | Expat library. +#json= Introduces a new type of variable that provides both serialization and de-serialization from JSON format. | JSON library, libjson +#ldap= Implements an LDAP search interface for OpenSIPS | OpenLDAP library & development files, typically libldap and libldap-dev +#lua= Easily implement your own OpenSIPS extensions in Lua | liblua5.1-0-dev, libmemcache-dev and libmysqlclient-dev +#httpd= Provides an HTTP transport layer implementation for OpenSIPS. | libmicrohttpd +#mi_xmlrpc_ng= New version of the xmlrpc server that handles xmlrpc requests and generates xmlrpc responses. | parsing/building XML library, typically libxml +#mmgeoip= Lightweight wrapper for the MaxMind GeoIP API | libGeoIP +#osp= Enables OpenSIPS to support secure, multi-lateral peering using the OSP standard | OSP development kit, typically osptoolkit +#perl= Easily implement your own OpenSIPS extensions in Perl | Perl library development files, typically libperl-dev +#pi_http= Provides a simple web database provisioning interface | XML parsing & building library, typically libxml-dev +#rabbitmq= Provides functions to publish messages to a RabbitMQ server | RabbitMQ development library, librabbitmq-dev +#rabbitmq_consumer= Receive AMQP messages which will be delivered by triggering events | RabbitMQ development library, librabbitmq-dev +#proto_sctp= Provides support for SCTP listeners in OpenSIPS | SCTP development library, typically libsctp-dev +#proto_tls= Provides support for TLS listeners in OpenSIPS | SSL development library, typically libssl-dev +#proto_wss= Provides support for Secure WebSocket listeners in OpenSIPS | SSL development library, typically libssl-dev +#presence= Handles PUBLISH and SUBSCRIBE messages and generates NOTIFY messages in a general, event independent way | XML parsing & Building library, typically libxml-dev +#presence_dialoginfo= Enables the handling of "Event: dialog" (as defined in RFC 4235) | XML parsing & building library, typically libxml-dev +#presence_mwi= Does specific handling for notify-subscribe message-summary (message waiting indication) events as specified in RFC 3842 | XML parsing & building library, typically libxml-dev +#presence_xml= Does specific handling for notify-subscribe events using xml bodies. | XML parsing & building library, typically libxml-dev +#presence_dfks = Does specific handling for DFKS (as-feature-event) events. | XML parsing & building library, typically libxml-dev +#pua= Offers the functionality of a presence user agent client, sending Subscribe and Publish messages. | XML parsing & building library, typically libxml-dev +#pua_bla= Enables Bridged Line Appearances support according | XML parsing & building library, typically libxml-dev +#pua_dialoginfo= Retrieves dialog state information from the dialog module and PUBLISHes the dialog-information using the pua module. | XML parsing & building library,typically libxml-dev +#pua_mi= Offers the possibility to publish presence information and subscribe to presence information via MI transports. | XML parsing & building library,typically libxml-dev +#pua_usrloc= Connector between usrloc and pua modules. | XML parsing & building library,typically libxml-dev +#pua_xmpp= Gateway for presence between SIP and XMPP. | XML parsing & building library,typically libxml-dev +#python= Easily implement your own OpenSIPS extensions in Python | Shared Python runtime library, libpython +#rest_client= Simple HTTP client | CURL library - libcurl +#rls= Resource List Server implementation following the specification in RFC 4662 and RFC 4826 | parsing/building XML library, typically libxml-dev +#sngtc= Voice Transcoding using the D-series Sangoma transcoding cards | libsngtc_node +#siprec= SIP Call Recording to an external/passive recorder | uuid-dev +#snmpstats= Provides an SNMP management interface to OpenSIPS | NetSNMP v5.3 +#tls_mgm= Provides a TLS interface to manage certificates for OpenSIPS | SSL development library, typically libssl-dev +#xcap= XCAP utility functions for OpenSIPS. | libxml-dev +#xcap_client= XCAP client for OpenSIPS.It fetches XCAP elements, either documents or part of them, by sending HTTP GET requests | libxml-dev and libcurl-dev +#xml= Introduces a new type of variable that provides both serialization and de-serialization from XML format. | XML library, libxml2-dev +#xmpp= Gateway between OpenSIPS and a jabber server. It enables the exchange of IMs between SIP clients and XMPP(jabber) clients. | parsing/building XML files, typically libexpat1-devel +#uuid= UUID generator | uuid-dev + +exclude_modules?= aaa_radius auth_jwt b2b_logic cachedb_cassandra cachedb_couchbase cachedb_memcached cachedb_mongodb cachedb_redis carrierroute cgrates compression cpl_c db_berkeley db_http db_mysql db_oracle db_perlvdb db_postgres db_sqlite db_unixodbc dialplan emergency event_rabbitmq h350 httpd identity jabber json ldap lua mi_xmlrpc_ng mmgeoip osp perl pi_http presence presence_dialoginfo presence_mwi presence_xml presence_dfks proto_sctp proto_tls proto_wss pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp python regex rabbitmq rabbitmq_consumer rest_client rls siprec sngtc snmpstats stir_shaken tls_mgm uuid xcap xcap_client xml xmpp + +include_modules= auth_jwt b2b_logic cachedb_redis carrierroute cgrates compression cpl_c db_http db_perlvdb dialplan event_rabbitmq event_routing event_stream regex identity jabber json jsonrpc mi_html mi_xmlrpc_ng mid_registrar perl pi_http presence presence_dialoginfo presence_mwi presence_xml pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp python rabbitmq rabbitmq_consumer rest_client rls sip_i siprec stir_shaken tracer uuid xcap xcap_client xml xmpp + +DEFS+= -DPKG_MALLOC #Use a faster malloc +DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory +DEFS+= -DUSE_MCAST #Compile in support for IP Multicast +DEFS+= -DDISABLE_NAGLE #Disable the TCP NAgle Algorithm ( lower delay ) +DEFS+= -DSTATISTICS #Enable the statistics manager +DEFS+= -DHAVE_RESOLV_RES #Support for changing some of the resolver parameters +# Specifying exactly 1 allocator will cause it to be inlined (fastest) +DEFS+= -DF_MALLOC #Fast memory allocator with minimal runtime overhead +DEFS+= -DQ_MALLOC #Quality assurance memory allocator with runtime safety checks +DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking +DEFS+= -DDBG_MALLOC #Include additional, debug-enabled allocator flavors +#DEFS+= -DNO_DEBUG #Compile out all debug messages +#DEFS+= -DNO_LOG #Compile out all logging +#DEFS_GROUP_START +#DEFS+= -DFAST_LOCK #Use fast architecture specific locking +#DEFS+= -DUSE_SYSV_SEM #Use SYSV sems for locking ( slower & limited number of locks +#DEFS+= -DUSE_PTHREAD_MUTEX #Use pthread mutexes for locking +DEFS+= -DUSE_UMUTEX #Use FreeBSD-specific low-level mutexes for locking +#DEFS+= -DUSE_POSIX_SEM #Use POSIX sems for locking +#DEFS_GROUP_END +#DEFS+= -DUSE_FUTEX #Use linux futexes with fast architecture specific locking +#DEFS+= -DBUSY_WAIT #Use busy waiting on the lock +#DEFS+= -DDBG_LOCK #Attach debug info to all lock structures +#DEFS+= -DDBG_STRUCT_HIST #Include support for struct history logging +#DEFS+= -DDBG_TCPCON #Attach struct history info to all TCP connections +#DEFS+= -DNOSMP #Do not use SMP compliant locking. Faster but won't work on SMP machines +#DEFS+= -DEXTRA_DEBUG #Compile in some extra debugging code +#DEFS+= -DCC_O0 #Zero compiler optimizations (FAST compile, SLOW code. For devs) +#DEFS+= -DORACLE_USRLOC #Use Oracle compatible queries for USRLOC +#DEFS+= -DSHM_EXTRA_STATS #Provide tools to get extra statistics for the shared memory used +#DEFS+= -DUNIT_TESTS #Include unit testing code into opensips and modules diff --git a/net/opensips31/files/opensips31.in b/net/opensips31/files/opensips31.in new file mode 100644 --- /dev/null +++ b/net/opensips31/files/opensips31.in @@ -0,0 +1,35 @@ +#!/bin/sh +# +# $FreeBSD: net/opensips/files/opensips.in +# +# PROVIDE: opensips31 +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable this service +# at system startup: +# +# opensips_enable (bool): Set to NO by default. +# Set it to YES to enable opensips. +# + +prefix=/usr/local + +. /etc/rc.subr + +name=opensips31 +rcvar=`set_rcvar` + +load_rc_config opensips31 + +opensips_enable=${opensips_enable:-"NO"} +opensips_shmem_size=${opensips_shmem_size:-"64"} +opensips_pkmem_size=${opensips_pkmem_size:-"4"} +opensips_user=${opensips_user:-"opensips"} +opensips_group=${opensips_group:-"opensips"} + +command="${prefix}/sbin/opensips31" +command_args="-m ${opensips_shmem_size} -M ${opensips_pkmem_size}" +required_files="${prefix}/etc/opensips31/opensips.cfg" + +run_rc_command "${1}" diff --git a/net/opensips31/files/patch-Makefile b/net/opensips31/files/patch-Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-Makefile @@ -0,0 +1,65 @@ +--- Makefile.orig 2020-11-17 13:37:23 UTC ++++ Makefile +@@ -502,16 +502,16 @@ mk-install-dirs: $(cfg_prefix)/$(cfg_dir) $(bin_prefix + + # note: on solaris 8 sed: ? or \(...\)* (a.s.o) do not work + install-cfg: $(cfg_prefix)/$(cfg_dir) +- sed -e "s#/usr/.*lib/$(NAME)/modules/#$(modules_target)#g" \ +- < etc/$(NAME).cfg > $(cfg_prefix)/$(cfg_dir)$(NAME).cfg.sample0 +- umask 0077; sed -e "s#/usr/.*etc/$(NAME)/tls/#$(cfg_target)tls/#g" \ +- < $(cfg_prefix)/$(cfg_dir)$(NAME).cfg.sample0 \ +- > $(cfg_prefix)/$(cfg_dir)$(NAME).cfg.sample +- rm -fr $(cfg_prefix)/$(cfg_dir)$(NAME).cfg.sample0 ++ sed -e "s#/usr/.*lib/opensips/modules/#$(modules_target)#g" \ ++ < etc/opensips.cfg > $(cfg_prefix)/$(cfg_dir)opensips.cfg.sample0 ++ umask 0077; sed -e "s#/usr/.*etc/opensips/tls/#$(cfg_target)tls/#g" \ ++ < $(cfg_prefix)/$(cfg_dir)opensips.cfg.sample0 \ ++ > $(cfg_prefix)/$(cfg_dir)opensips.cfg.sample ++ rm -fr $(cfg_prefix)/$(cfg_dir)opensips.cfg.sample0 + if [ -z "${skip_cfg_install}" -a \ +- ! -f $(cfg_prefix)/$(cfg_dir)$(NAME).cfg ]; then \ +- mv -f $(cfg_prefix)/$(cfg_dir)$(NAME).cfg.sample \ +- $(cfg_prefix)/$(cfg_dir)$(NAME).cfg; \ ++ ! -f $(cfg_prefix)/$(cfg_dir)opensips.cfg ]; then \ ++ cp $(cfg_prefix)/$(cfg_dir)opensips.cfg.sample \ ++ $(cfg_prefix)/$(cfg_dir)opensips.cfg; \ + fi + + install-bin: app $(bin_prefix)/$(bin_dir) opensipsmc utils +@@ -519,8 +519,8 @@ install-bin: app $(bin_prefix)/$(bin_dir) opensipsmc u + $(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/$(NAME) + $(INSTALL_BIN) $(NAME) $(bin_prefix)/$(bin_dir) + # install opensips menuconfig +- $(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/osipsconfig +- $(INSTALL_BIN) menuconfig/configure $(bin_prefix)/$(bin_dir)/osipsconfig ++ $(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/osipsconfig$(NAME_SUFFIX) ++ $(INSTALL_BIN) menuconfig/configure $(bin_prefix)/$(bin_dir)/osipsconfig$(NAME_SUFFIX) + + .PHONY: utils + utils: +@@ -571,17 +571,17 @@ install-modules-doc: $(doc_prefix)/$(doc_dir) + + + install-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5 +- sed -e "s#/etc/$(NAME)/$(NAME)\.cfg#$(cfg_target)$(NAME).cfg#g" \ ++ sed -e "s#/etc/opensips/opensips\.cfg#$(cfg_target)opensips.cfg#g" \ + -e "s#/usr/sbin/#$(bin-target)#g" \ +- -e "s#/usr/lib/$(NAME)/modules/#$(modules_target)#g" \ +- -e "s#/usr/share/doc/$(NAME)/#$(doc-target)#g" \ +- < $(NAME).8 > $(man_prefix)/$(man_dir)/man8/$(NAME).8 ++ -e "s#/usr/lib/opensips/modules/#$(modules_target)#g" \ ++ -e "s#/usr/share/doc/opensips/#$(doc-target)#g" \ ++ < opensips.8 > $(man_prefix)/$(man_dir)/man8/$(NAME).8 + chmod 644 $(man_prefix)/$(man_dir)/man8/$(NAME).8 +- sed -e "s#/etc/$(NAME)/$(NAME)\.cfg#$(cfg_target)$(NAME).cfg#g" \ ++ sed -e "s#/etc/opensips/opensips\.cfg#$(cfg_target)opensips.cfg#g" \ + -e "s#/usr/sbin/#$(bin-target)#g" \ +- -e "s#/usr/lib/$(NAME)/modules/#$(modules_target)#g" \ +- -e "s#/usr/share/doc/$(NAME)/#$(doc-target)#g" \ +- < $(NAME).cfg.5 > $(man_prefix)/$(man_dir)/man5/$(NAME).cfg.5 ++ -e "s#/usr/lib/opensips/modules/#$(modules_target)#g" \ ++ -e "s#/usr/share/doc/opensips/#$(doc-target)#g" \ ++ < opensips.cfg.5 > $(man_prefix)/$(man_dir)/man5/$(NAME).cfg.5 + chmod 644 $(man_prefix)/$(man_dir)/man5/$(NAME).cfg.5 + + install-modules-docbook: $(doc_prefix)/$(doc_dir) diff --git a/net/opensips31/files/patch-Makefile.defs b/net/opensips31/files/patch-Makefile.defs new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-Makefile.defs @@ -0,0 +1,21 @@ +--- Makefile.defs.orig ++++ Makefile.defs +@@ -57,14 +57,15 @@ + makefile_defs=1 + export makefile_defs + +-# main binary name +-MAIN_NAME=opensips +- + #version number + VERSION_MAJOR = 3 + VERSION_MINOR = 1 + VERSION_SUBMINOR = 2 + VERSION_BUILD = ++ ++# main binary name ++NAME_SUFFIX=$(VERSION_MAJOR)$(VERSION_MINOR) ++MAIN_NAME=opensips$(NAME_SUFFIX) + + ifneq (,$(VERSION_BUILD)) + RELEASE=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_SUBMINOR)-$(VERSION_BUILD) diff --git a/net/opensips31/files/patch-Makefile.rules b/net/opensips31/files/patch-Makefile.rules new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-Makefile.rules @@ -0,0 +1,11 @@ +--- Makefile.rules.orig 2020-07-22 09:42:09 UTC ++++ Makefile.rules +@@ -27,7 +27,7 @@ endif + $(Q)$(CC) $(CFLAGS) $(DEFS) -c $< -o $@ + + %.d: %.c $(ALLDEP) +- @set -e; $(MKDEP) $(DEFS) $< \ ++ @set -e; $(MKDEP) $(CFLAGS) $(DEFS) $< \ + | sed 's#\(\($*D)\)\?$(*F)\)\.o[ :]*#$*.o $@ : #g' > $@; \ + [ -s $@ ] || rm -f $@ + diff --git a/net/opensips31/files/patch-modules_aaa__radius_Makefile b/net/opensips31/files/patch-modules_aaa__radius_Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-modules_aaa__radius_Makefile @@ -0,0 +1,21 @@ +--- modules/aaa_radius/Makefile.orig 2020-07-22 09:42:09 UTC ++++ modules/aaa_radius/Makefile +@@ -12,10 +12,15 @@ ETC_DIR?=../../etc/ + + # Find the radius library we shall use + # ++ifeq ($(OS), freebsd) ++ LDCONFIG=ldconfig -r ++else ++ LDCONFIG=ldconfig -p ++endif + ifeq ($(RADIUSCLIENT),) +-RADIUSCLIENT=$(shell if [ -n "`ldconfig -p | grep radcli`" ]; then echo "RADCLI"; \ +- elif [ -n "`ldconfig -p | grep freeradius`" ]; then echo "FREERADIUS"; \ +- elif [ -n "`ldconfig -p | grep radiusclient-ng`" ];then echo "RADIUSCLIENT"; fi) ++RADIUSCLIENT=$(shell if [ -n "`${LDCONFIG} | grep radcli`" ]; then echo "RADCLI"; \ ++ elif [ -n "`${LDCONFIG} | grep freeradius`" ]; then echo "FREERADIUS"; \ ++ elif [ -n "`${LDCONFIG} | grep radiusclient-ng`" ];then echo "RADIUSCLIENT"; fi) + endif + + diff --git a/net/opensips31/files/patch-modules_presence_Makefile b/net/opensips31/files/patch-modules_presence_Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-modules_presence_Makefile @@ -0,0 +1,17 @@ +--- modules/presence/Makefile.orig 2020-07-22 09:42:09 UTC ++++ modules/presence/Makefile +@@ -10,8 +10,12 @@ auto_gen= + NAME=presence.so + + ifeq ($(CROSS_COMPILE),) +-LIBS=-lxml2 +-DEFS+=-I$(SYSBASE)/include/libxml2 ++HAS_XML2CFG=$(shell if which xml2-config >/dev/null 2>/dev/null;then echo YES; fi) ++endif ++ ++ifeq ($(HAS_XML2CFG),YES) ++LIBS=$(shell xml2-config --libs) ++DEFS+=$(shell xml2-config --cflags) + else + DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \ + -I$(LOCALBASE)/include diff --git a/net/opensips31/files/patch-modules_presence__dfks_Makefile b/net/opensips31/files/patch-modules_presence__dfks_Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-modules_presence__dfks_Makefile @@ -0,0 +1,17 @@ +--- modules/presence_dfks/Makefile.orig 2020-10-15 10:22:35 UTC ++++ modules/presence_dfks/Makefile +@@ -6,8 +6,12 @@ auto_gen= + NAME=presence_dfks.so + + ifeq ($(CROSS_COMPILE),) +-LIBS=-lxml2 +-DEFS+=-I$(SYSBASE)/include/libxml2 ++HAS_XML2CFG=$(shell if which xml2-config >/dev/null 2>/dev/null;then echo YES; fi) ++endif ++ ++ifeq ($(HAS_XML2CFG),YES) ++LIBS=$(shell xml2-config --libs) ++DEFS+=$(shell xml2-config --cflags) + else + DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \ + -I$(LOCALBASE)/include diff --git a/net/opensips31/files/patch-modules_presence__xml_Makefile b/net/opensips31/files/patch-modules_presence__xml_Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-modules_presence__xml_Makefile @@ -0,0 +1,17 @@ +--- modules/presence_xml/Makefile.orig 2020-07-22 09:42:09 UTC ++++ modules/presence_xml/Makefile +@@ -10,8 +10,12 @@ auto_gen= + NAME=presence_xml.so + + ifeq ($(CROSS_COMPILE),) +-LIBS=-lxml2 +-DEFS+=-I$(SYSBASE)/include/libxml2 ++HAS_XML2CFG=$(shell if which xml2-config >/dev/null 2>/dev/null;then echo YES; fi) ++endif ++ ++ifeq ($(HAS_XML2CFG),YES) ++LIBS=$(shell xml2-config --libs) ++DEFS+=$(shell xml2-config --cflags) + else + DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \ + -I$(LOCALBASE)/include diff --git a/net/opensips31/files/patch-modules_pua__dialoginfo_Makefile b/net/opensips31/files/patch-modules_pua__dialoginfo_Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-modules_pua__dialoginfo_Makefile @@ -0,0 +1,17 @@ +--- modules/pua_dialoginfo/Makefile.orig 2020-07-22 09:42:09 UTC ++++ modules/pua_dialoginfo/Makefile +@@ -10,8 +10,12 @@ auto_gen= + NAME=pua_dialoginfo.so + + ifeq ($(CROSS_COMPILE),) +-LIBS=-lxml2 +-DEFS+=-I$(SYSBASE)/include/libxml2 ++HAS_XML2CFG=$(shell if which xml2-config >/dev/null 2>/dev/null;then echo YES; fi) ++endif ++ ++ifeq ($(HAS_XML2CFG),YES) ++LIBS=$(shell xml2-config --libs) ++DEFS+=$(shell xml2-config --cflags) + else + DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \ + -I$(LOCALBASE)/include diff --git a/net/opensips31/files/patch-modules_xml_Makefile b/net/opensips31/files/patch-modules_xml_Makefile new file mode 100644 --- /dev/null +++ b/net/opensips31/files/patch-modules_xml_Makefile @@ -0,0 +1,17 @@ +--- modules/xml/Makefile.orig 2020-07-22 09:42:09 UTC ++++ modules/xml/Makefile +@@ -5,8 +5,12 @@ auto_gen= + NAME=xml.so + + ifeq ($(CROSS_COMPILE),) +-LIBS=-lxml2 +-DEFS+=-I$(SYSBASE)/include/libxml2 ++HAS_XML2CFG=$(shell if which xml2-config >/dev/null 2>/dev/null;then echo YES; fi) ++endif ++ ++ifeq ($(HAS_XML2CFG),YES) ++LIBS=$(shell xml2-config --libs) ++DEFS+=$(shell xml2-config --cflags) + else + DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \ + -I$(LOCALBASE)/include diff --git a/net/opensips31/pkg-descr b/net/opensips31/pkg-descr new file mode 100644 --- /dev/null +++ b/net/opensips31/pkg-descr @@ -0,0 +1,12 @@ +OpenSIPS (Open SIP Server) is a mature Open Source implementation +of a SIP server. + +It includes application-level functionalities and is the core component +of any SIP-based VoIP solution. With a very flexible and customizable +routing engine, OpenSIPS unifies voice, video, IM and presence +services in a highly efficient way, thanks to its scalable (modular) +design. + +It is reliable and fast, for enterprise or carrier-grade use cases. + +WWW: https://www.opensips.org/ diff --git a/net/opensips31/pkg-message b/net/opensips31/pkg-message new file mode 100644 --- /dev/null +++ b/net/opensips31/pkg-message @@ -0,0 +1,23 @@ +[ +{ type: install + message: <