add 3G CN: osmo-hlr, osmocom-3g, osmo-iuh, libasn1c

Copy openbsc to osmocom-3g (for lack of a better name) to build the vlr_3G
branch of openbsc.git, producing osmo-msc, osmo-sgsn with Iu capabilities and
osmo-bsc_mgcp (now a misnomer) to direct RTP streams.

Add osmo-hlr.

Add osmo-iuh for osmo-hnbgw, and libosmo-ranap dependency of osmocom-3g.

Add libasn1c.
diff --git a/recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp b/recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp
new file mode 100644
index 0000000..042d535
--- /dev/null
+++ b/recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp
Binary files differ
diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr.inc b/recipes-osmocom/osmo-hlr/osmo-hlr.inc
new file mode 100644
index 0000000..4a549e8
--- /dev/null
+++ b/recipes-osmocom/osmo-hlr/osmo-hlr.inc
@@ -0,0 +1,51 @@
+DESCRIPTION = "Osmocom GSM/UMTS Home Location Register"
+DEPENDS = "libosmocore libosmo-abis libsqlite3"
+HOMEPAGE = "http://osmocom.org/projects/osmo-hlr"
+LICENSE = "AGPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
+
+SRC_URI = "file://osmo-hlr.init"
+
+INC_PR = "r1.${META_TELEPHONY_OSMO_INC}"
+
+inherit autotools update-rc.d pkgconfig
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+	echo "${PV}" > ${S}/.tarball-version
+}
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/osmocom
+	install -m 0660 ${S}/doc/examples/osmo-hlr/osmo-hlr.cfg ${D}${sysconfdir}/osmocom/osmo-hlr.cfg
+
+	# Install sysv-init files
+	install -d ${D}${sysconfdir}/init.d
+	install -d ${D}${sysconfdir}/rc5.d
+	install -m 0775 ${WORKDIR}/osmo-hlr.init ${D}${sysconfdir}/init.d/osmo-hlr
+
+	# Install systemd files and enable on sysinit
+	install -d ${D}${systemd_unitdir}/system
+	for i in `ls ${S}/contrib/systemd`; do
+		install -m 0644 ${S}/contrib/systemd/$i ${D}${systemd_unitdir}/system/
+	done
+
+	install -d ${D}/var/lib/osmocom
+}
+
+PACKAGES =+ "osmo-hlr"
+
+INITSCRIPT_PACKAGES = "osmo-hlr"
+
+# Do not start any of the services by default
+SYSTEMD_AUTO_ENABLE = "disable"
+
+CONFFILES_osmo-hlr = "${sysconfdir}/osmocom/osmo-hlr.cfg"
+INITSCRIPT_NAME_osmo-hlr = "osmo-hlr"
+INITSCRIPT_PARAMS_osmo-hlr = "defaults 30 30"
+FILES_osmo-hlr = " ${bindir}/osmo-hlr \
+		/var/lib/osmocom \
+		${sysconfdir}/init.d/osmo-hlr \
+		${sysconfdir}/osmocom/osmo-hlr.cfg \
+		${systemd_unitdir}/system/osmo-hlr.service \
+		"
diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init b/recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init
new file mode 100755
index 0000000..2444f89
--- /dev/null
+++ b/recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init
@@ -0,0 +1,48 @@
+!/bin/sh
+### BEGIN INIT INFO
+# Provides:		osmo-hlr
+# Required-Start:	$syslog $networking
+# Required-Stop:	$syslog
+# Default-Start:	5
+# Default-Stop:		1
+# Short-Description:	Osmocom HLR
+### END INIT INFO
+
+DAEMON=/usr/bin/osmo-hlr
+NAME=osmo-hlr
+DESC="Osmocom HLR"
+NORMAL_ARGS="-D -c /etc/osmocom/osmo-hlr.cfg -l /var/lib/osmocom/hlr.db"
+
+OSMOHLR_EXTRA_ARGS=""
+NO_START=1
+
+set -e
+
+test ! -r /etc/default/osmo-hlr || . /etc/default/osmo-hlr
+test "$NO_START" = "0" || exit 0
+test -x "$DAEMON" || exit 0
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon -S \
+	  -x "$DAEMON" -- $NORMAL_ARGS $OSMOHLR_EXTRA_ARGS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon -K -x "$DAEMON"
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	$0 stop
+	$0 start
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
new file mode 100644
index 0000000..b5cffe9
--- /dev/null
+++ b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
@@ -0,0 +1,10 @@
+require ${PN}.inc
+
+PV = "0.1.0+gitr${SRCPV}"
+PRINC = "0"
+PR = "${INC_PR}.1"
+
+SRCREV = "743cf42ac5dfa2661317e73f70b204bde7450ff2"
+SRC_URI += "git://git.osmocom.org/osmo-hlr.git;protocol=git"
+
+S = "${WORKDIR}/git/osmo-hlr"