Commit 6dd77065 authored by Lubomir Rintel's avatar Lubomir Rintel
Browse files

apn-conf: generate Android-compatible APN list

Some distros (Ubuntu Touch) read out Android-style APN list. Generate
one from our database so they can use it.

parent 647f2133
......@@ -9,6 +9,11 @@ EXTRA_DIST =
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = mobile-broadband-provider-info.pc
apns-conf.xml: $(top_srcdir)/apns-conf.xsl $(top_srcdir)/$(SP_XML_DB)
$(AM_V_GEN) $(XSLTPROC) --output $@ $^
pkgdata_DATA = apns-conf.xml
xmllint --valid $(top_srcdir)/$(SP_XML_DB) 2>&1 > /dev/null || exit 1;
<?xml version="1.0" encoding="utf-8"?>
The person or persons who have associated work with this document
(the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best
of his knowledge, the work of authorship identified is in the public domain of
the country from which the work is published, or (b) hereby dedicates whatever
copyright the dedicators holds in the work of authorship identified below
(the "Work") to the public domain. A certifier, moreover, dedicates any
copyright interest he may have in the associated work, and for these purposes,
is described as a "dedicator" below.
A certifier has taken reasonable steps to verify the copyright status of this
work. Certifier recognizes that his good faith efforts may not shield him from
liability if in fact the work certified is not in the public domain.
Dedicator makes this dedication for the benefit of the public at large and to
the detriment of the Dedicator's heirs and successors. Dedicator intends this
dedication to be an overt act of relinquishment in perpetuity of all present
and future rights under copyright law, whether vested or contingent, in the
Work. Dedicator understands that such relinquishment of all rights includes the
relinquishment of all rights to enforce (by lawsuit or otherwise) those
copyrights in the Work.
Dedicator recognizes that, once placed in the public domain, the Work may be
freely reproduced, distributed, transmitted, used, modified, built upon, or
otherwise exploited by anyone for any purpose, commercial or non-commercial,
and in any way, including by methods that have not yet been invented or
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="/">
<xsl:comment> Automatically generated from serviceproviders.xml </xsl:comment>
<xsl:for-each select="comment()">
<apns version="8">
<xsl:for-each select="serviceproviders/country/provider/gsm/apn">
<xsl:attribute name="carrier">
<xsl:when test="name">
<xsl:value-of select="name" />
<xsl:value-of select="../../name" />
<xsl:attribute name="mcc">
<xsl:value-of select="../network-id/@mcc" />
<xsl:attribute name="mnc">
<xsl:value-of select="../network-id/@mnc" />
<xsl:attribute name="apn">
<xsl:value-of select="@value" />
<xsl:if test="username">
<xsl:attribute name="user">
<xsl:value-of select="username" />
<xsl:if test="password">
<xsl:attribute name="password">
<xsl:value-of select="password" />
<xsl:if test="usage/@type = 'mms'">
<xsl:attribute name="mmsc">
<xsl:value-of select="mmsc" />
<xsl:when test="contains(mmsproxy,':')">
<xsl:attribute name="mmsproxy">
<xsl:value-of select="substring-before(mmsproxy,':')" />
<xsl:attribute name="mmsport">
<xsl:value-of select="substring-after(mmsproxy,':')" />
<xsl:attribute name="mmsproxy">
<xsl:value-of select="mmsproxy" />
<xsl:attribute name="mmsport">8080</xsl:attribute>
<xsl:attribute name="type">
<xsl:value-of select="'default'" />
<xsl:if test="usage/@type = 'internet'">,supl</xsl:if>
<xsl:if test="usage/@type = 'mms'">,mms</xsl:if>
......@@ -4,6 +4,11 @@ AC_INIT(mobile-broadband-provider-info, 20190116,, mobile-broadb
AM_INIT_AUTOMAKE([-Wall -Werror foreign no-dist-gzip dist-bzip2])
if test -z "$XSLTPROC"; then
AC_MSG_ERROR([xsltproc not found])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment