aboutsummaryrefslogtreecommitdiff
path: root/net/openbsc
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2015-10-17 16:55:31 +0000
committerKurt Jaeger <pi@FreeBSD.org>2015-10-17 16:55:31 +0000
commitcda622b482c818b0f5ed000cf5ced80d829e303a (patch)
treea92a0ac7170d90caf432629876698a52d975db67 /net/openbsc
parentbc3fc9f856c62745f61d788e0f1e83cae8f57cb7 (diff)
downloadports-cda622b482c818b0f5ed000cf5ced80d829e303a.tar.gz
ports-cda622b482c818b0f5ed000cf5ced80d829e303a.zip
Notes
Diffstat (limited to 'net/openbsc')
-rw-r--r--net/openbsc/Makefile38
-rw-r--r--net/openbsc/distinfo2
-rw-r--r--net/openbsc/files/patch-include-openbsc-mgcp.h14
-rw-r--r--net/openbsc/files/patch-include-openbsc-rtp.h15
-rw-r--r--net/openbsc/files/patch-src-libmsc-meas_feed.h13
-rw-r--r--net/openbsc/files/patch-src-libtrau-rtp_proxy.c15
-rw-r--r--net/openbsc/files/patch-src-utils-Makefile.am25
-rw-r--r--net/openbsc/files/patch-src-utils-meas_udp2db.c13
-rw-r--r--net/openbsc/pkg-descr5
-rw-r--r--net/openbsc/pkg-plist27
10 files changed, 167 insertions, 0 deletions
diff --git a/net/openbsc/Makefile b/net/openbsc/Makefile
new file mode 100644
index 000000000000..860fbab193f5
--- /dev/null
+++ b/net/openbsc/Makefile
@@ -0,0 +1,38 @@
+# $FreeBSD$
+
+PORTNAME= openbsc
+PORTVERSION= 0.14.0
+CATEGORIES= net
+MASTER_SITES= http://git.osmocom.org/${PORTNAME}/snapshot/ \
+ http://chaosophia.net/downloads/osmocom/${PORTNAME}/
+
+MAINTAINER= koue@chaosophia.net
+COMMENT= GSM network in a box software
+
+LICENSE= GPLv3
+
+LIB_DEPENDS= libdbi.so:${PORTSDIR}/databases/libdbi \
+ libosmocore.so:${PORTSDIR}/devel/libosmocore \
+ libosmoabis.so:${PORTSDIR}/devel/libosmo-abis \
+ libosmonetif.so:${PORTSDIR}/devel/libosmo-netif \
+ libdbi.so:${PORTSDIR}/databases/libdbi
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/${PORTNAME}
+
+USES= autoreconf compiler:c11 gmake pkgconfig
+GNU_CONFIGURE=yes
+AUTOMAKE_ARGS= --gnu --add-missing --copy
+CONFIGURE_ARGS+= CFLAGS="-I${LOCALBASE}/include"
+
+OPTIONS_DEFINE= SQLITE
+OPTIONS_DEFAULT=
+
+OPTIONS_SUB= yes
+SQLITE_LIB_DEPENDS= libsqlite.so:${PORTSDIR}/databases/sqlite3
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|pkgconfigdir.*|pkgconfigdir = ${PREFIX}/libdata/pkgconfig|g' \
+ ${WRKSRC}/Makefile.am
+ ${ECHO_CMD} ${PORTVERSION} > ${WRKSRC}/.tarball-version
+
+.include <bsd.port.mk>
diff --git a/net/openbsc/distinfo b/net/openbsc/distinfo
new file mode 100644
index 000000000000..0a31ebd0e55e
--- /dev/null
+++ b/net/openbsc/distinfo
@@ -0,0 +1,2 @@
+SHA256 (openbsc-0.14.0.tar.gz) = ae8f1b7ee89ea730492f790ca8c42bada1f863cf8867a853bae5f00f9e53aea0
+SIZE (openbsc-0.14.0.tar.gz) = 724745
diff --git a/net/openbsc/files/patch-include-openbsc-mgcp.h b/net/openbsc/files/patch-include-openbsc-mgcp.h
new file mode 100644
index 000000000000..95be64d7129d
--- /dev/null
+++ b/net/openbsc/files/patch-include-openbsc-mgcp.h
@@ -0,0 +1,14 @@
+--- include/openbsc/mgcp.h.orig 2015-02-10 22:03:25 UTC
++++ include/openbsc/mgcp.h
+@@ -31,6 +31,11 @@
+
+ #include <arpa/inet.h>
+
++#ifdef __FreeBSD__
++#include <sys/socket.h>
++#include <netinet/in.h>
++#endif
++
+ #define RTP_PORT_DEFAULT 4000
+ #define RTP_PORT_NET_DEFAULT 16000
+
diff --git a/net/openbsc/files/patch-include-openbsc-rtp.h b/net/openbsc/files/patch-include-openbsc-rtp.h
new file mode 100644
index 000000000000..4150e730667d
--- /dev/null
+++ b/net/openbsc/files/patch-include-openbsc-rtp.h
@@ -0,0 +1,15 @@
+--- include/openbsc/rtp.h.orig 2015-02-10 22:03:25 UTC
++++ include/openbsc/rtp.h
+@@ -10,6 +10,12 @@
+ # define __BYTE_ORDER __DARWIN_BYTE_ORDER
+ # define __LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
+ # define __BIG_ENDIAN __DARWIN_BIG_ENDIAN
++# elif defined(__FreeBSD__)
++# if __FreeBSD_version < 1000000
++# include <machine/endian.h>
++# else
++# include <x86/endian.h>
++# endif
+ # else
+ # error "__BYTE_ORDER should be defined by someone"
+ # endif
diff --git a/net/openbsc/files/patch-src-libmsc-meas_feed.h b/net/openbsc/files/patch-src-libmsc-meas_feed.h
new file mode 100644
index 000000000000..f55e5f60f025
--- /dev/null
+++ b/net/openbsc/files/patch-src-libmsc-meas_feed.h
@@ -0,0 +1,13 @@
+--- src/libmsc/meas_feed.h.orig 2015-02-10 22:03:25 UTC
++++ src/libmsc/meas_feed.h
+@@ -3,6 +3,10 @@
+
+ #include <stdint.h>
+
++#ifdef __FreeBSD__
++#include <sys/socket.h>
++#endif
++
+ int meas_feed_cfg_set(const char *dst_host, uint16_t dst_port);
+ void meas_feed_cfg_get(char **host, uint16_t *port);
+
diff --git a/net/openbsc/files/patch-src-libtrau-rtp_proxy.c b/net/openbsc/files/patch-src-libtrau-rtp_proxy.c
new file mode 100644
index 000000000000..d68c380a0865
--- /dev/null
+++ b/net/openbsc/files/patch-src-libtrau-rtp_proxy.c
@@ -0,0 +1,15 @@
+--- src/libtrau/rtp_proxy.c.orig 2015-02-10 22:03:25 UTC
++++ src/libtrau/rtp_proxy.c
+@@ -47,6 +47,12 @@
+ # define __BYTE_ORDER __DARWIN_BYTE_ORDER
+ # define __LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
+ # define __BIG_ENDIAN __DARWIN_BIG_ENDIAN
++# elif defined(__FreeBSD__)
++# if __FreeBSD_version < 1000000
++# include <machine/endian.h>
++# else
++# include <x86/endian.h>
++# endif
+ # else
+ # error "__BYTE_ORDER should be defined by someone"
+ # endif
diff --git a/net/openbsc/files/patch-src-utils-Makefile.am b/net/openbsc/files/patch-src-utils-Makefile.am
new file mode 100644
index 000000000000..fe81564cb320
--- /dev/null
+++ b/net/openbsc/files/patch-src-utils-Makefile.am
@@ -0,0 +1,25 @@
+--- src/utils/Makefile.am.orig 2015-02-10 22:03:25 UTC
++++ src/utils/Makefile.am
+@@ -6,7 +6,8 @@ noinst_HEADERS = meas_db.h
+
+ bin_PROGRAMS = bs11_config isdnsync
+ if HAVE_SQLITE3
+-bin_PROGRAMS += osmo-meas-pcap2db osmo-meas-udp2db
++#bin_PROGRAMS += osmo-meas-pcap2db osmo-meas-udp2db
++bin_PROGRAMS += osmo-meas-udp2db
+ endif
+ if HAVE_LIBCDK
+ bin_PROGRAMS += meas_vis
+@@ -32,9 +33,9 @@ meas_vis_SOURCES = meas_vis.c
+ meas_vis_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lcdk -lncurses
+ meas_vis_CFLAGS = $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
+
+-osmo_meas_pcap2db_SOURCES = meas_pcap2db.c meas_db.c
+-osmo_meas_pcap2db_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lpcap $(SQLITE3_LIBS)
+-osmo_meas_pcap2db_CFLAGS = $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
++#osmo_meas_pcap2db_SOURCES = meas_pcap2db.c meas_db.c
++#osmo_meas_pcap2db_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lpcap $(SQLITE3_LIBS)
++#osmo_meas_pcap2db_CFLAGS = $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
+
+ osmo_meas_udp2db_SOURCES = meas_udp2db.c meas_db.c
+ osmo_meas_udp2db_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(SQLITE3_LIBS)
diff --git a/net/openbsc/files/patch-src-utils-meas_udp2db.c b/net/openbsc/files/patch-src-utils-meas_udp2db.c
new file mode 100644
index 000000000000..fd0f5dc720ab
--- /dev/null
+++ b/net/openbsc/files/patch-src-utils-meas_udp2db.c
@@ -0,0 +1,13 @@
+--- src/utils/meas_udp2db.c.orig 2015-02-10 22:03:25 UTC
++++ src/utils/meas_udp2db.c
+@@ -37,6 +37,10 @@
+
+ #include <openbsc/meas_feed.h>
+
++#ifdef __FreeBSD__
++#include <sys/socket.h>
++#endif
++
+ #include "meas_db.h"
+
+ static struct osmo_fd udp_ofd;
diff --git a/net/openbsc/pkg-descr b/net/openbsc/pkg-descr
new file mode 100644
index 000000000000..3b360ae18295
--- /dev/null
+++ b/net/openbsc/pkg-descr
@@ -0,0 +1,5 @@
+OpenBSC is a minimalistic implementation of the GSM Network, with
+particular emphasis on the functionality typically provided by the BSC,
+MSC, HLR, VLR and SMSC.
+
+WWW: http://openbsc.osmocom.org/trac/
diff --git a/net/openbsc/pkg-plist b/net/openbsc/pkg-plist
new file mode 100644
index 000000000000..bbe6a1eda6f7
--- /dev/null
+++ b/net/openbsc/pkg-plist
@@ -0,0 +1,27 @@
+bin/osmo-nitb
+bin/osmo-bsc_mgcp
+bin/bs11_config
+bin/isdnsync
+bin/ipaccess-find
+bin/ipaccess-config
+bin/ipaccess-proxy
+bin/osmo-gbproxy
+%%SQLITE%%bin/osmo-meas-udp2db
+include/openbsc/gsm_04_08.h
+include/openbsc/meas_rep.h
+include/openbsc/bsc_api.h
+libdata/pkgconfig/openbsc.pc
+share/doc/openbsc/examples/osmo-bsc/osmo-bsc.cfg
+share/doc/openbsc/examples/osmo-bsc_mgcp/mgcp.cfg
+share/doc/openbsc/examples/osmo-bsc_nat/black-list.cfg
+share/doc/openbsc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg
+share/doc/openbsc/examples/osmo-gbproxy/osmo-gbproxy.cfg
+share/doc/openbsc/examples/osmo-nitb/bs11/openbsc-1bts-2trx-hopping.cfg
+share/doc/openbsc/examples/osmo-nitb/bs11/openbsc-1bts-2trx.cfg
+share/doc/openbsc/examples/osmo-nitb/bs11/openbsc-2bts-2trx.cfg
+share/doc/openbsc/examples/osmo-nitb/bs11/openbsc.cfg
+share/doc/openbsc/examples/osmo-nitb/nanobts/openbsc-multitrx.cfg
+share/doc/openbsc/examples/osmo-nitb/nanobts/openbsc.cfg
+share/doc/openbsc/examples/osmo-nitb/nokia/openbsc_nokia_3trx.cfg
+share/doc/openbsc/examples/osmo-nitb/rbs2308/openbsc.cfg
+share/doc/openbsc/examples/osmo-sgsn/osmo-sgsn.cfg