aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2005-11-08 01:35:42 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2005-11-08 01:35:42 +0000
commit6aa17e12b777f9e4075141b75ad54d05211d2122 (patch)
treee66d7eac78a4c963da2a73d063163994730c7085 /net
parentff1f04733a5cbae16dd88b524f201616a39dffe3 (diff)
downloadports-6aa17e12b777f9e4075141b75ad54d05211d2122.tar.gz
ports-6aa17e12b777f9e4075141b75ad54d05211d2122.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/openser/Makefile140
-rw-r--r--net/openser/distinfo2
-rw-r--r--net/openser/files/patch-Makefile81
-rw-r--r--net/openser/files/patch-Makefile.defs59
-rw-r--r--net/openser/files/pkg-deinstall.in24
-rw-r--r--net/openser/files/pkg-install.in12
-rw-r--r--net/openser/pkg-descr4
8 files changed, 323 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index b4679bb33b05..c2a1a28bdbfd 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -484,6 +484,7 @@
SUBDIR += openmpi
SUBDIR += openntpd
SUBDIR += openradius
+ SUBDIR += openser
SUBDIR += openslp
SUBDIR += openverse
SUBDIR += ortp
diff --git a/net/openser/Makefile b/net/openser/Makefile
new file mode 100644
index 000000000000..8a49504736b8
--- /dev/null
+++ b/net/openser/Makefile
@@ -0,0 +1,140 @@
+# New ports collection makefile for: openser
+# Date created: 20 October 2005
+# Whom: jesusr
+#
+# $FreeBSD$
+#
+
+PORTNAME= openser
+PORTVERSION= 1.0.0
+CATEGORIES= net
+MASTER_SITES= http://openser.org/pub/openser/${PORTVERSION}/src/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-tls_src
+
+MAINTAINER= jesusr@FreeBSD.org
+COMMENT= A very fast and configurable SIP proxy with TLS support
+
+LIB_DEPENDS= radiusclient-ng.2:${PORTSDIR}/net/radiusclient
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-tls
+
+USE_REINPLACE= yes
+USE_GMAKE= yes
+USE_GNOME= libxml2
+MAKE_ENV= CC="${CC}" \
+ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}"
+
+PLIST_FILES= sbin/openser sbin/openser_gen_ha1 sbin/openser_mysql.sh \
+ sbin/openserctl sbin/openserunix
+PLIST_DIRS= lib/openser/modules lib/openser
+
+MODULES= acc alias_db auth auth_db auth_diameter avpops cpl-c dbtext \
+ dispatcher diversion domain enum exec flatstore gflags group \
+ lcr mangler maxfwd mediaproxy msilo nathelper options pa pdt \
+ permissions pike registrar rr sl sms speeddial textops tm uac \
+ uac_redirect uri uri_db usrloc xlog
+
+RC_FILES= acc/radiusclient.conf \
+ acc/servers \
+ acc/sip_dictionary \
+ dictionary.radius \
+ openser.cfg
+RC_DIRS= acc
+
+MAN5= openser.cfg.5
+MAN8= openser.8
+
+PORTDOCS= *
+
+SUB_FILES= pkg-install pkg-deinstall
+SUB_LIST= RC_DIRS="${RC_DIRS}" RC_FILES="${RC_FILES}"
+
+OPTIONS= MYSQL "MySQL support" on \
+ POSTGRESQL "PostgreSQL support" on \
+ TLS "TLS support" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_MYSQL)
+USE_MYSQL= yes
+MODULES+= mysql
+.else
+MAKE_ENV+= MYSQL=mysql
+.endif
+
+.if defined(WITH_POSTGRESQL)
+USE_PGSQL= yes
+MODULES+= postgres
+.else
+MAKE_ENV+= POSTGRESQL=postgres
+.endif
+
+.if defined(WITH_TLS)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+PLIST_FILES+= etc/openser/tls/README
+TLS_RC_FILES= tls/rootCA/cacert.pem \
+ tls/rootCA/certs/01.pem \
+ tls/rootCA/index.txt \
+ tls/rootCA/private/cakey.pem \
+ tls/rootCA/serial \
+ tls/user/user-calist.pem \
+ tls/user/user-cert.pem \
+ tls/user/user-cert_req.pem \
+ tls/user/user-privkey.pem
+RC_FILES+= ${TLS_RC_FILES}
+TLS_RC_DIRS= tls/user \
+ tls/rootCA/certs \
+ tls/rootCA/private \
+ tls/rootCA \
+ tls
+RC_DIRS+= ${TLS_RC_DIRS}
+.else
+MAKE_ARGS+= TLS=""
+.endif
+
+PLIST_FILES+= ${MODULES:S|^|lib/openser/modules/|:S|$|.so|} \
+ ${RC_FILES:S|^|etc/openser/|:S|$|.default|}
+
+post-patch:
+.if defined(NOPORTDOCS)
+ @${REINPLACE_CMD} -e 's|install-doc install-man|install-man|' \
+ ${WRKSRC}/Makefile
+.endif
+ @${REINPLACE_CMD} -e 's|/usr/local/etc/ser|${PREFIX}/etc/openser|' \
+ ${WRKSRC}/scripts/sc.dbtext \
+ ${WRKSRC}/modules/dispatcher/README
+ @${REINPLACE_CMD} -e 's|/etc/openser|${PREFIX}/etc/openser|' \
+ ${WRKSRC}/modules/mediaproxy/README
+ @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \
+ ${WRKSRC}/etc/openser.cfg \
+ ${WRKSRC}/scripts/mysqldb.sh \
+ ${WRKSRC}/scripts/postgresqldb.sh \
+ ${WRKSRC}/scripts/sc \
+ ${WRKSRC}/scripts/sc.dbtext \
+ ${WRKSRC}/modules/speeddial/README
+ @${REINPLACE_CMD} -e 's|/home/jiri/sip_router/modules/acc/etc|${PREFIX}/etc/openser/acc|; \
+ s|/usr/local|${LOCALBASE}|' \
+ ${WRKSRC}/modules/acc/etc/radiusclient.conf
+ @${REINPLACE_CMD} -e 's|/usr/local/etc/radiusclient|${PREFIX}/etc/openser/acc|' \
+ ${WRKSRC}/modules/acc/acc_mod.c ${WRKSRC}/modules/acc/README
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/etc/openser.cfg \
+ ${PREFIX}/etc/openser/openser.cfg.default
+ ${MKDIR} ${PREFIX}/etc/openser/acc
+ ${INSTALL_DATA} ${WRKSRC}/modules/acc/etc/radiusclient.conf \
+ ${PREFIX}/etc/openser/acc/radiusclient.conf.default
+ ${INSTALL_DATA} ${WRKSRC}/modules/acc/etc/servers \
+ ${PREFIX}/etc/openser/acc/servers.default
+ ${INSTALL_DATA} ${WRKSRC}/modules/acc/etc/sip_dictionary \
+ ${PREFIX}/etc/openser/acc/sip_dictionary.default
+.for d in ${TLS_RC_DIRS}
+ ${MKDIR} ${PREFIX}/etc/openser/${d}
+.endfor
+.for f in ${TLS_RC_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/openser/${f}.default
+.endfor
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
+.include <bsd.port.post.mk>
diff --git a/net/openser/distinfo b/net/openser/distinfo
new file mode 100644
index 000000000000..51d255a534f0
--- /dev/null
+++ b/net/openser/distinfo
@@ -0,0 +1,2 @@
+MD5 (openser-1.0.0-tls_src.tar.gz) = d56814cc463d5ecd563c3ebee9feaa28
+SIZE (openser-1.0.0-tls_src.tar.gz) = 1360975
diff --git a/net/openser/files/patch-Makefile b/net/openser/files/patch-Makefile
new file mode 100644
index 000000000000..4cf5432f9d59
--- /dev/null
+++ b/net/openser/files/patch-Makefile
@@ -0,0 +1,81 @@
+--- Makefile.orig Fri Oct 28 23:27:18 2005
++++ Makefile Sun Oct 30 22:14:24 2005
+@@ -46,7 +46,7 @@
+ skip_modules?=
+
+ # if not set on the cmd. line or the env, exclude this modules:
+-exclude_modules?= jabber cpl-c pa postgres mysql \
++exclude_modules?= jabber $(POSTGRESQL) $(MYSQL) \
+ avp_radius auth_radius group_radius uri_radius
+ # always exclude the CVS dir
+ override exclude_modules+= CVS $(skip_modules)
+@@ -320,17 +320,9 @@
+
+ # 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.sample
+- chmod 644 $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample
+- 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; \
+- fi
+ # radius dictionary
+ $(INSTALL-TOUCH) $(cfg-prefix)/$(cfg-dir)/dictionary.radius
+- $(INSTALL-CFG) etc/dictionary.radius $(cfg-prefix)/$(cfg-dir)
++ $(INSTALL-CFG) etc/dictionary.radius $(cfg-prefix)/$(cfg-dir)/dictionary.radius.default
+ #$(INSTALL-CFG) etc/$(NAME).cfg $(cfg-prefix)/$(cfg-dir)
+ if [ -z $(TLS) ]; then \
+ echo "No TLS scripts installed" ; \
+@@ -341,36 +333,16 @@
+ mkdir $(cfg-prefix)/$(cfg-dir)/tls/rootCA/private ; \
+ mkdir $(cfg-prefix)/$(cfg-dir)/tls/user ; \
+ $(INSTALL-TOUCH) etc/tls/README $(cfg-prefix)/$(cfg-dir)/tls/; \
+- $(INSTALL) etc/tls/README $(cfg-prefix)/$(cfg-dir)/tls/; \
+- $(INSTALL-TOUCH) etc/tls/rootCA/index.txt $(cfg-prefix)/$(cfg-dir)/tls/rootCA/; \
+- $(INSTALL) etc/tls/rootCA/index.txt $(cfg-prefix)/$(cfg-dir)/tls/rootCA/; \
+- $(INSTALL-TOUCH) etc/tls/rootCA/serial $(cfg-prefix)/$(cfg-dir)/tls/rootCA/; \
+- $(INSTALL) etc/tls/rootCA/serial $(cfg-prefix)/$(cfg-dir)/tls/rootCA/; \
+- $(INSTALL-TOUCH) etc/tls/rootCA/cacert.pem $(cfg-prefix)/$(cfg-dir)/tls/rootCA/; \
+- $(INSTALL) etc/tls/rootCA/cacert.pem $(cfg-prefix)/$(cfg-dir)/tls/rootCA/; \
+- $(INSTALL-TOUCH) etc/tls/rootCA/certs/01.pem $(cfg-prefix)/$(cfg-dir)/tls/rootCA/certs/; \
+- $(INSTALL) etc/tls/rootCA/certs/01.pem $(cfg-prefix)/$(cfg-dir)/tls/rootCA/certs/; \
+- $(INSTALL-TOUCH) etc/tls/rootCA/private/cakey.pem $(cfg-prefix)/$(cfg-dir)/tls/rootCA/private/; \
+- $(INSTALL) etc/tls/rootCA/private/cakey.pem $(cfg-prefix)/$(cfg-dir)/tls/rootCA/private/; \
+- $(INSTALL-TOUCH) etc/tls/user/user-calist.pem $(cfg-prefix)/$(cfg-dir)/tls/user/; \
+- $(INSTALL) etc/tls/user/user-calist.pem $(cfg-prefix)/$(cfg-dir)/tls/user/; \
+- $(INSTALL-TOUCH) etc/tls/user/user-cert.pem $(cfg-prefix)/$(cfg-dir)/tls/users/; \
+- $(INSTALL) etc/tls/user/user-cert.pem $(cfg-prefix)/$(cfg-dir)/tls/user/; \
+- $(INSTALL-TOUCH) etc/tls/user/user-privkey.pem $(cfg-prefix)/$(cfg-dir)/tls/user/; \
+- $(INSTALL) etc/tls/user/user-privkey.pem $(cfg-prefix)/$(cfg-dir)/tls/user/; \
+- $(INSTALL-TOUCH) etc/tls/user/user-cert_req.pem $(cfg-prefix)/$(cfg-dir)/tls/user/; \
+- $(INSTALL) etc/tls/user/user-cert_req.pem $(cfg-prefix)/$(cfg-dir)/tls/user/; \
++ $(BSD_INSTALL_DATA) etc/tls/README $(cfg-prefix)/$(cfg-dir)/tls/; \
+ fi
+
+ install-bin: $(bin-prefix)/$(bin-dir) utils/gen_ha1/gen_ha1 utils/$(NAME)unix/$(NAME)unix
+ $(INSTALL-TOUCH) $(bin-prefix)/$(bin-dir)/$(NAME)
+ $(INSTALL-BIN) $(NAME) $(bin-prefix)/$(bin-dir)
+ $(INSTALL-TOUCH) $(bin-prefix)/$(bin-dir)/sc
+- $(INSTALL-BIN) scripts/sc $(bin-prefix)/$(bin-dir)
+- mv -f $(bin-prefix)/$(bin-dir)/sc $(bin-prefix)/$(bin-dir)/$(NAME)ctl
++ $(BSD_INSTALL_SCRIPT) scripts/sc $(bin-prefix)/$(bin-dir)/$(NAME)ctl
+ $(INSTALL-TOUCH) $(bin-prefix)/$(bin-dir)/mysqldb.sh
+- $(INSTALL-BIN) scripts/mysqldb.sh $(bin-prefix)/$(bin-dir)
+- mv -f $(bin-prefix)/$(bin-dir)/mysqldb.sh $(bin-prefix)/$(bin-dir)/$(NAME)_mysql.sh
++ $(BSD_INSTALL_SCRIPT) scripts/mysqldb.sh $(bin-prefix)/$(bin-dir)/$(NAME)_mysql.sh
+ $(INSTALL-TOUCH) $(bin-prefix)/$(bin-dir)/$(NAME)_gen_ha1
+ $(INSTALL-BIN) utils/gen_ha1/gen_ha1 $(bin-prefix)/$(bin-dir)/$(NAME)_gen_ha1
+ $(INSTALL-TOUCH) $(bin-prefix)/$(bin-dir)/$(NAME)unix
+@@ -418,9 +390,7 @@
+ if [ -f modules/"$$r"/README ]; then \
+ $(INSTALL-TOUCH) $(doc-prefix)/$(doc-dir)/README ; \
+ $(INSTALL-DOC) modules/"$$r"/README \
+- $(doc-prefix)/$(doc-dir)/README ; \
+- mv -f $(doc-prefix)/$(doc-dir)/README \
+- $(doc-prefix)/$(doc-dir)/README."$$r" ; \
++ $(doc-prefix)/$(doc-dir)/README."$$r" ; \
+ fi ; \
+ fi ; \
+ done
diff --git a/net/openser/files/patch-Makefile.defs b/net/openser/files/patch-Makefile.defs
new file mode 100644
index 000000000000..2c7700ecea72
--- /dev/null
+++ b/net/openser/files/patch-Makefile.defs
@@ -0,0 +1,59 @@
+--- Makefile.defs.orig Fri Oct 28 18:32:39 2005
++++ Makefile.defs Sun Oct 30 20:09:02 2005
+@@ -147,13 +147,13 @@
+ TAR ?= tar
+ endif
+
+-INSTALL-TOUCH = touch # used to create the file first (good to
++INSTALL-TOUCH = : # used to create the file first (good to
+ # make solaris install work)
+-INSTALL-CFG = $(INSTALL) -m 644
+-INSTALL-BIN = $(INSTALL) -m 755
+-INSTALL-MODULES = $(INSTALL) -m 755
+-INSTALL-DOC = $(INSTALL) -m 644
+-INSTALL-MAN = $(INSTALL) -m 644
++INSTALL-CFG = $(BSD_INSTALL_DATA)
++INSTALL-BIN = $(BSD_INSTALL_PROGRAM)
++INSTALL-MODULES = $(BSD_INSTALL_PROGRAM)
++INSTALL-DOC = $(BSD_INSTALL_DATA)
++INSTALL-MAN = $(BSD_INSTALL_MAN)
+
+ #set some vars from the environment (and not make builtins)
+ CC := $(shell echo "$${CC}")
+@@ -449,7 +449,7 @@
+ found_lock_method=yes
+ endif
+
+-CFLAGS=
++saved_CFLAGS:=$(CFLAGS)
+ LDFLAGS=
+ # setting CFLAGS
+ ifeq ($(mode), release)
+@@ -970,7 +970,8 @@
+ ifneq ($(found_lock_method), yes)
+ DEFS+= -DUSE_PTHREAD_MUTEX # try pthread sems
+ found_lock_method=yes
+- LIBS= -pthread -lfl #dlopen is in libc
++ saved_CFLAGS+= $(PTHREAD_CFLAGS)
++ LIBS= $(PTHREAD_LIBS) -lfl #dlopen is in libc
+ else
+ LIBS= -lfl #dlopen is in libc
+ endif
+@@ -1045,10 +1046,15 @@
+ endif
+ endif
+
++CFLAGS= $(saved_CFLAGS) -I$(LOCALBASE)/include
++MOD_CFLAGS= -fPIC $(CFLAGS)
++LDFLAGS= -L$(LOCALBASE)/lib
++MOD_LDFLAGS= -shared $(LDFLAGS)
++
+ #add libssl if needed
+ ifneq ($(TLS),)
+-DEFS+= -I$(LOCALBASE)/ssl/include
+-LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
++DEFS+= -I$(OPENSSLINC)
++LIBS+= -L$(OPENSSLLIB) -lssl -lcrypto
+ endif
+
+ ifneq ($(found_lock_method), yes)
diff --git a/net/openser/files/pkg-deinstall.in b/net/openser/files/pkg-deinstall.in
new file mode 100644
index 000000000000..5ca38f0f45b0
--- /dev/null
+++ b/net/openser/files/pkg-deinstall.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+rc_dir=$PKG_PREFIX/etc/openser
+
+if [ "$2" = DEINSTALL ]; then
+ for f in %%RC_FILES%%; do
+ if /usr/bin/cmp -s $rc_dir/$f.default $rc_dir/$f; then
+ /bin/rm -f $rc_dir/$f
+ fi
+ done
+elif [ "$2" = POST-DEINSTALL ]; then
+ rc_dirs=`for d in %%RC_DIRS%%; do echo $d; done | /usr/bin/sort -r`
+
+ for d in $rc_dirs ""; do
+ /bin/rmdir $rc_dir/$d 2>/dev/null || /usr/bin/true
+ done
+
+ if [ -e $rc_dir ]; then
+ echo "==============================================================================="
+ echo "If you are permanently removing this port, you should manually remove the"
+ echo "$rc_dir directory."
+ echo "==============================================================================="
+ fi
+fi
diff --git a/net/openser/files/pkg-install.in b/net/openser/files/pkg-install.in
new file mode 100644
index 000000000000..79e885fcf5fc
--- /dev/null
+++ b/net/openser/files/pkg-install.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ "$2" != POST-INSTALL ] && exit
+
+rc_dir=$PKG_PREFIX/etc/openser
+
+for f in %%RC_FILES%%; do
+ if ! [ -e $rc_dir/$f ]; then
+ /usr/bin/install -o root -g wheel -m 644 \
+ $rc_dir/$f.default $rc_dir/$f
+ fi
+done
diff --git a/net/openser/pkg-descr b/net/openser/pkg-descr
new file mode 100644
index 000000000000..146c6cc9f73b
--- /dev/null
+++ b/net/openser/pkg-descr
@@ -0,0 +1,4 @@
+OpenSER is a scalable and robust SIP server, spawned from FhG FOKUS SIP
+Express Router (SER).
+
+WWW: http://www.openser.org/