diff --git a/.github/docker/debian/bookworm/amd64/fse.release.Dockerfile b/.github/docker/debian/bookworm/amd64/fse.release.Dockerfile new file mode 100644 index 0000000..fa1652a --- /dev/null +++ b/.github/docker/debian/bookworm/amd64/fse.release.Dockerfile @@ -0,0 +1,145 @@ +ARG BUILDER_IMAGE=debian:bookworm-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bookworm +ARG ARCH=amd64 + +# Credentials +ARG REPO_DOMAIN=fsa.freeswitch.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +deb-src https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + https://${REPO_DOMAIN}/repo/deb/fsa/pubkey.gpg \ + | apt-key add - && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install + +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bookworm/amd64/public.release.Dockerfile b/.github/docker/debian/bookworm/amd64/public.release.Dockerfile new file mode 100644 index 0000000..616f532 --- /dev/null +++ b/.github/docker/debian/bookworm/amd64/public.release.Dockerfile @@ -0,0 +1,147 @@ +ARG BUILDER_IMAGE=debian:bookworm-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bookworm +ARG ARCH=amd64 + +# Credentials +ARG REPO_DOMAIN=freeswitch.signalwire.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + --output ${GPG_KEY} \ + https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg && \ + file ${GPG_KEY} && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bookworm/arm32v7/fse.release.Dockerfile b/.github/docker/debian/bookworm/arm32v7/fse.release.Dockerfile new file mode 100644 index 0000000..3a9379a --- /dev/null +++ b/.github/docker/debian/bookworm/arm32v7/fse.release.Dockerfile @@ -0,0 +1,145 @@ +ARG BUILDER_IMAGE=arm32v7/debian:bookworm-20240513 + +FROM --platform=linux/arm32 ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bookworm +ARG ARCH=armhf + +# Credentials +ARG REPO_DOMAIN=fsa.freeswitch.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb https://${REPO_DOMAIN}/repo/deb/fsa-rpi/ ${CODENAME} 1.8 +deb-src https://${REPO_DOMAIN}/repo/deb/fsa-rpi/ ${CODENAME} 1.8 +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + https://${REPO_DOMAIN}/repo/deb/fsa-rpi/pubkey.gpg \ + | apt-key add - && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install + +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bookworm/arm32v7/public.release.Dockerfile b/.github/docker/debian/bookworm/arm32v7/public.release.Dockerfile new file mode 100644 index 0000000..314e1ff --- /dev/null +++ b/.github/docker/debian/bookworm/arm32v7/public.release.Dockerfile @@ -0,0 +1,147 @@ +ARG BUILDER_IMAGE=debian:bookworm-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bookworm +ARG ARCH=armhf + +# Credentials +ARG REPO_DOMAIN=freeswitch.signalwire.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + --output ${GPG_KEY} \ + https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg && \ + file ${GPG_KEY} && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bookworm/arm64v8/fse.release.Dockerfile b/.github/docker/debian/bookworm/arm64v8/fse.release.Dockerfile new file mode 100644 index 0000000..51b1ba3 --- /dev/null +++ b/.github/docker/debian/bookworm/arm64v8/fse.release.Dockerfile @@ -0,0 +1,145 @@ +ARG BUILDER_IMAGE=arm64v8/debian:bookworm-20240513 + +FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bookworm +ARG ARCH=arm64 + +# Credentials +ARG REPO_DOMAIN=fsa.freeswitch.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +deb-src https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + https://${REPO_DOMAIN}/repo/deb/fsa/pubkey.gpg \ + | apt-key add - && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install + +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bookworm/arm64v8/public.release.Dockerfile b/.github/docker/debian/bookworm/arm64v8/public.release.Dockerfile new file mode 100644 index 0000000..2b475a9 --- /dev/null +++ b/.github/docker/debian/bookworm/arm64v8/public.release.Dockerfile @@ -0,0 +1,147 @@ +ARG BUILDER_IMAGE=debian:bookworm-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bookworm +ARG ARCH=arm64 + +# Credentials +ARG REPO_DOMAIN=freeswitch.signalwire.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + --output ${GPG_KEY} \ + https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg && \ + file ${GPG_KEY} && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bullseye/amd64/fse.release.Dockerfile b/.github/docker/debian/bullseye/amd64/fse.release.Dockerfile new file mode 100644 index 0000000..5c1bb1d --- /dev/null +++ b/.github/docker/debian/bullseye/amd64/fse.release.Dockerfile @@ -0,0 +1,145 @@ +ARG BUILDER_IMAGE=debian:bullseye-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +ARG ARCH=amd64 + +# Credentials +ARG REPO_DOMAIN=fsa.freeswitch.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +deb-src https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + https://${REPO_DOMAIN}/repo/deb/fsa/pubkey.gpg \ + | apt-key add - && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install + +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bullseye/amd64/public.release.Dockerfile b/.github/docker/debian/bullseye/amd64/public.release.Dockerfile new file mode 100644 index 0000000..649d027 --- /dev/null +++ b/.github/docker/debian/bullseye/amd64/public.release.Dockerfile @@ -0,0 +1,147 @@ +ARG BUILDER_IMAGE=debian:bullseye-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +ARG ARCH=amd64 + +# Credentials +ARG REPO_DOMAIN=freeswitch.signalwire.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + --output ${GPG_KEY} \ + https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg && \ + file ${GPG_KEY} && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bullseye/arm32v7/fse.release.Dockerfile b/.github/docker/debian/bullseye/arm32v7/fse.release.Dockerfile new file mode 100644 index 0000000..8add8ae --- /dev/null +++ b/.github/docker/debian/bullseye/arm32v7/fse.release.Dockerfile @@ -0,0 +1,145 @@ +ARG BUILDER_IMAGE=debian:bullseye-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +ARG ARCH=armhf + +# Credentials +ARG REPO_DOMAIN=fsa.freeswitch.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb https://${REPO_DOMAIN}/repo/deb/fsa-rpi/ ${CODENAME} 1.8 +deb-src https://${REPO_DOMAIN}/repo/deb/fsa-rpi/ ${CODENAME} 1.8 +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + https://${REPO_DOMAIN}/repo/deb/fsa-rpi/pubkey.gpg \ + | apt-key add - && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install + +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bullseye/arm32v7/public.release.Dockerfile b/.github/docker/debian/bullseye/arm32v7/public.release.Dockerfile new file mode 100644 index 0000000..3341212 --- /dev/null +++ b/.github/docker/debian/bullseye/arm32v7/public.release.Dockerfile @@ -0,0 +1,147 @@ +ARG BUILDER_IMAGE=debian:bullseye-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +ARG ARCH=armhf + +# Credentials +ARG REPO_DOMAIN=freeswitch.signalwire.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + --output ${GPG_KEY} \ + https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg && \ + file ${GPG_KEY} && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bullseye/arm64v8/fse.release.Dockerfile b/.github/docker/debian/bullseye/arm64v8/fse.release.Dockerfile new file mode 100644 index 0000000..6c1664c --- /dev/null +++ b/.github/docker/debian/bullseye/arm64v8/fse.release.Dockerfile @@ -0,0 +1,145 @@ +ARG BUILDER_IMAGE=debian:bullseye-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +ARG ARCH=arm64 + +# Credentials +ARG REPO_DOMAIN=fsa.freeswitch.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +deb-src https://${REPO_DOMAIN}/repo/deb/fsa ${CODENAME} 1.8 +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + https://${REPO_DOMAIN}/repo/deb/fsa/pubkey.gpg \ + | apt-key add - && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install + +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/bullseye/arm64v8/public.release.Dockerfile b/.github/docker/debian/bullseye/arm64v8/public.release.Dockerfile new file mode 100644 index 0000000..8f2fb7f --- /dev/null +++ b/.github/docker/debian/bullseye/arm64v8/public.release.Dockerfile @@ -0,0 +1,147 @@ +ARG BUILDER_IMAGE=debian:bullseye-20240513 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +ARG ARCH=arm64 + +# Credentials +ARG REPO_DOMAIN=freeswitch.signalwire.com +ARG REPO_USERNAME=user + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + gnupg2 \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + unzip \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN . ~/.env && cat < /etc/apt/sources.list.d/freeswitch.list +deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main +EOF + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +RUN --mount=type=secret,id=REPO_PASSWORD,required=true \ + printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \ + printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \ + printf "password " >> /etc/apt/auth.conf && \ + cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \ + sha512sum /run/secrets/REPO_PASSWORD && \ + curl \ + --fail \ + --netrc-file /etc/apt/auth.conf \ + --output ${GPG_KEY} \ + https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg && \ + file ${GPG_KEY} && \ + apt-get --quiet update && \ + apt-get --yes --quiet install \ + libexpat1-dev \ + libfreeswitch-dev \ + libfreeswitch1 \ + libks2 \ + libsofia-sip-ua-dev \ + libspandsp3-dev \ + signalwire-client-c2 \ + && rm -f /etc/apt/auth.conf + +# Bootstrap and Build +RUN wget -O - https://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download \ + | tar xvz -C /root + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr +RUN CFLAGS="-fPIC" ./configure \ + --disable-shared \ + --enable-static \ + --prefix=/usr/local/apr \ + && make install + +WORKDIR /root/unimrcp-deps-1.6.0/libs/apr-util +RUN CFLAGS="-fPIC" ./configure \ + --prefix=/usr/local/apr \ + --with-apr=/usr/local/apr \ + --with-expat=/usr \ + && make install + +WORKDIR /root +RUN git clone https://github.com/unispeech/unimrcp.git + +WORKDIR /root/unimrcp +RUN ./bootstrap \ + && ./configure \ + --with-sofia-sip=/usr \ + && make install +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +ENV UNIMRCP_CFLAGS="-I/usr/local/unimrcp/include -I/usr/local/apr/include/apr-1/" +ENV UNIMRCP_LIBS="/usr/local/unimrcp/lib/libunimrcpclient.a /usr/local/apr/lib/libaprutil-1.a /usr/local/apr/lib/libapr-1.a -lexpat -lsofia-sip-ua -luuid -lcrypt -lpthread -lm" + +#RUN ./bootstrap.sh \ +# && ./configure \ +# && make install + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + --package "freeswitch-mod-unimrcp" \ + "Build, ${GIT_SHA}" \ + && debuild \ + --preserve-env \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d299cf6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,117 @@ +name: Build and Distribute + +on: + pull_request: + push: + branches: + - master + paths: + - "**" + workflow_dispatch: + +concurrency: + group: ${{ github.head_ref || github.ref }} + +jobs: + deb-fse: + name: 'DEB-FSE' + permissions: + id-token: write + contents: read + uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main + strategy: + # max-parallel: 1 + fail-fast: false + matrix: + os: + - debian + version: + - bookworm + - bullseye + platform: + - name: amd64 + runner: ubuntu-latest + - name: arm32v7 + runner: ubuntu-latest + - name: arm64v8 + runner: ubuntu-latest + release: + - release + with: + RUNNER: ${{ matrix.platform.runner }} + ARTIFACTS_PATTERN: '.*\.(deb)$' + DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/fse.${{ matrix.release }}.Dockerfile + MAINTAINER: 'Andrey Volk ' + META_FILE_PATH_PREFIX: /var/www/mod_unimrcp/fse/${{ matrix.release }}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }} + PLATFORM: ${{ matrix.platform.name }} + REPO_DOMAIN: 'fsa.freeswitch.com' + TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-fse-${{ matrix.release }}-artifact + UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} + secrets: + GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} + HOSTNAME: ${{ secrets.HOSTNAME }} + PROXY_URL: ${{ secrets.PROXY_URL }} + USERNAME: ${{ secrets.USERNAME }} + TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} + REPO_USERNAME: ${{ secrets.FSE_USERNAME }} + REPO_PASSWORD: ${{ secrets.FSE_PASSWORD }} + + deb-public: + name: 'DEB-PUBLIC' + permissions: + id-token: write + contents: read + uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main + strategy: + # max-parallel: 1 + fail-fast: false + matrix: + os: + - debian + version: + - bookworm + - bullseye + platform: + - name: amd64 + runner: ubuntu-latest + - name: arm32v7 + runner: ubuntu-latest + - name: arm64v8 + runner: ubuntu-latest + release: + - release + with: + RUNNER: ${{ matrix.platform.runner }} + ARTIFACTS_PATTERN: '.*\.(deb)$' + DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/public.${{ matrix.release }}.Dockerfile + MAINTAINER: 'Andrey Volk ' + META_FILE_PATH_PREFIX: /var/www/mod_unimrcp/public/${{ matrix.release }}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }} + PLATFORM: ${{ matrix.platform.name }} + REPO_DOMAIN: 'freeswitch.signalwire.com' + TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-${{ matrix.release }}-artifact + UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} + secrets: + GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} + HOSTNAME: ${{ secrets.HOSTNAME }} + PROXY_URL: ${{ secrets.PROXY_URL }} + USERNAME: ${{ secrets.USERNAME }} + TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} + REPO_USERNAME: 'signalwire' + REPO_PASSWORD: ${{ secrets.REPOTOKEN }} + + meta: + name: 'Publish build data to meta-repo' + if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} + needs: + - deb-fse + - deb-public + permissions: + id-token: write + contents: read + uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main + with: + META_CONTENT: '/var/www/mod_unimrcp/{fse,public}/release/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}' + META_REPO: signalwire/bamboo_gha_trigger + META_REPO_BRANCH: trigger/mod_unimrcp/${{ github.ref_name }} + secrets: + GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..c3c3ae4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,11 @@ +freeswitch-mod-unimrcp (20240709~1) unstable; urgency=low + + * New version release + + -- "SignalWire, Inc." Tue, 9 Jul 2024 20:50:42 +0200 + +freeswitch-mod-unimrcp (20240709~0) unstable; urgency=low + + * Stub release + + -- "SignalWire, Inc." Tue, 9 Jul 2024 20:50:00 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..4cdcd9d --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: freeswitch-mod-unimrcp +Section: comm +Priority: optional +Maintainer: "SignalWire, Inc." +Build-Depends: debhelper (>= 10), libssl-dev, libexpat1-dev, libfreeswitch-dev, libks2, libsofia-sip-ua-dev, libspandsp3-dev, signalwire-client-c2 +Standards-Version: 4.1.0 + +Package: freeswitch-mod-unimrcp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Media Resource Control Protocol module + This package contains MRCP module for FreeSWITCH. + . + A FreeSWITCH module that that allows communication + with Media Resource Control Protocol (MRCP) servers. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..3a4e541 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,11 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mod_unimrcp +Source: https://github.com/freeswitch/mod_unimrcp/ + +Files: * +Copyright: © 2024 "SignalWire, Inc." +License: MPL-1.1 + +License: MPL-1.1 + On Debian systems, the full text of the MPL-1.1 License can be found in + the file /usr/share/common-licenses/MPL-1.1. diff --git a/debian/freeswitch-mod-unimrcp.install b/debian/freeswitch-mod-unimrcp.install new file mode 100644 index 0000000..2db3a20 --- /dev/null +++ b/debian/freeswitch-mod-unimrcp.install @@ -0,0 +1 @@ +usr/lib/freeswitch/*/*.so diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..799296d --- /dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +# WARNING: This Makefile will only work via `.github/docker/debian/*/*/*.Dockerfile` Dockerfile. + +%: + dh $@ + +override_dh_auto_install: + make install DESTDIR=$(CURDIR)/debian/tmp diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native)