From 0b7495179f5ef7b7fc4b1bd6c82557b6275cb8ad Mon Sep 17 00:00:00 2001 From: spacedream Date: Sat, 10 Apr 2021 09:26:08 +0000 Subject: [PATCH 1/3] Delete Makefile --- Makefile | 113 ------------------------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 932a039e..00000000 --- a/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -# -# Copyright (C) 2017 - 2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk-chan-quectel -PKG_VERSION:=1.1-20180312 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=file:///home/sd/wrk/ - -#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -#PKG_SOURCE_URL:=https://github.com/wdoekes/asterisk-chan-quectel.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -#PKG_SOURCE_VERSION:=3e2b3ca6fd4d0a996404dfdc724973e92f2683eb -#PKG_MIRROR_HASH:=655d1b6a78fb92f5a41410747d2ad633493e5eb2c5a2a0fdf8057dde4011213e -#PKG_SOURCE_PROTO:=git - -PKG_FIXUP:=autoreconf - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYRIGHT.txt LICENSE.txt -PKG_MAINTAINER:=Jiri Slachta - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -MODULES_DIR:=/usr/lib/asterisk/modules - -include $(INCLUDE_DIR)/package.mk - -define Package/asterisk-chan-quectel/Default - SUBMENU:=Telephony - SECTION:=net - CATEGORY:=Network - URL:=https://github.com/wdoekes/asterisk-chan-quectel - DEPENDS:=+USE_UCLIBC:libiconv-full +kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch - TITLE:=Quectel UMTS 3G cards support -endef - -define Package/asterisk13-chan-quectel -$(call Package/asterisk-chan-quectel/Default) - DEPENDS+=asterisk13 - VARIANT:=asterisk13 -endef - -define Package/asterisk15-chan-quectel -$(call Package/asterisk-chan-quectel/Default) - DEPENDS+=asterisk15 - VARIANT:=asterisk15 -endef - -define Package/description/Default - Asterisk channel driver for Quectel UMTS 3G cards. -endef - -Package/asterisk13-chan-quectel/description = $(Package/description/Default) -Package/asterisk15-chan-quectel/description = $(Package/description/Default) - -ifeq ($(BUILD_VARIANT),asterisk13) - CHAN_DONGLE_AST_HEADERS:=$(STAGING_DIR)/usr/include/asterisk-13/include - CONFIGURE_ARGS+= \ - --with-astversion=13 -endif - -ifeq ($(BUILD_VARIANT),asterisk15) - CHAN_DONGLE_AST_HEADERS:=$(STAGING_DIR)/usr/include/asterisk-15/include - CONFIGURE_ARGS+= \ - --with-astversion=15 -endif - -CONFIGURE_ARGS+= \ - --with-asterisk=$(CHAN_DONGLE_AST_HEADERS) - -TARGET_CFLAGS+= \ - -I$(CHAN_DONGLE_AST_HEADERS) - -MAKE_FLAGS+=LD="$(TARGET_CC)" - -# musl and glibc include their own iconv, but uclibc does not -TARGET_CPPFLAGS+=$(if $(CONFIG_USE_UCLIBC),-I$(STAGING_DIR)/usr/lib/libiconv-full/include) -TARGET_LDFLAGS+=$(if $(CONFIG_USE_UCLIBC),-L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv) - -# $CHAN_DONGLE_ICONV_INC used by 200-fix-iconv-detection.patch -CONFIGURE_VARS += \ - CHAN_DONGLE_ICONV_INC="$(TOOLCHAIN_DIR)/include $(STAGING_DIR)/usr/lib/libiconv-full/include" \ - DESTDIR="$(MODULES_DIR)" \ - ac_cv_type_size_t=yes \ - ac_cv_type_ssize_t=yes - -define Package/conffiles/Default -/etc/asterisk/dongle.conf -endef - -Package/asterisk13-chan-quectel/conffiles = $(Package/conffiles/Default) -Package/asterisk15-chan-quectel/conffiles = $(Package/conffiles/Default) - -define Package/Install/Default - $(INSTALL_DIR) $(1)/etc/asterisk - $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/dongle.conf $(1)/etc/asterisk - $(INSTALL_DIR) $(1)$(MODULES_DIR) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chan_dongle.so $(1)$(MODULES_DIR) -endef - -Package/asterisk13-chan-quectel/install = $(Package/Install/Default) -Package/asterisk15-chan-quectel/install = $(Package/Install/Default) - -$(eval $(call BuildPackage,asterisk13-chan-quectel)) -$(eval $(call BuildPackage,asterisk15-chan-quectel)) From b05ba34705b42aa552335c6c39fb1fb11e7ddb54 Mon Sep 17 00:00:00 2001 From: spacedream Date: Sat, 10 Apr 2021 12:31:26 +0000 Subject: [PATCH 2/3] Create docker-publish.yml --- .github/workflows/docker-publish.yml | 76 ++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 00000000..5b123f83 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,76 @@ +name: Docker + +on: + push: + # Publish `master` as Docker `latest` image. + branches: + - master + + # Publish `v1.2.3` tags as releases. + tags: + - v* + + # Run tests for any PRs. + pull_request: + +env: + # TODO: Change variable to your image's name. + IMAGE_NAME: image + +jobs: + # Run tests. + # See also https://docs.docker.com/docker-hub/builds/automated-testing/ + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run tests + run: | + if [ -f docker-compose.test.yml ]; then + docker-compose --file docker-compose.test.yml build + docker-compose --file docker-compose.test.yml run sut + else + docker build . --file Dockerfile + fi + + # Push image to GitHub Packages. + # See also https://docs.docker.com/docker-hub/builds/ + push: + # Ensure test job passes before pushing image. + needs: test + + runs-on: ubuntu-latest + if: github.event_name == 'push' + + steps: + - uses: actions/checkout@v2 + + - name: Build image + run: docker build . --file Dockerfile --tag $IMAGE_NAME + + - name: Log into registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin + + - name: Push image + run: | + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + + # Change all uppercase to lowercase + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + # Strip git ref prefix from version + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + + # Strip "v" prefix from tag name + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + + # Use Docker `latest` tag convention + [ "$VERSION" == "master" ] && VERSION=latest + + echo IMAGE_ID=$IMAGE_ID + echo VERSION=$VERSION + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION From 4145ecb4080354c3bdddca2b3aaf6370c90af0a9 Mon Sep 17 00:00:00 2001 From: spacedream Date: Sat, 10 Apr 2021 12:33:40 +0000 Subject: [PATCH 3/3] Delete .github/workflows directory --- .github/workflows/docker-publish.yml | 76 ---------------------------- 1 file changed, 76 deletions(-) delete mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index 5b123f83..00000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Docker - -on: - push: - # Publish `master` as Docker `latest` image. - branches: - - master - - # Publish `v1.2.3` tags as releases. - tags: - - v* - - # Run tests for any PRs. - pull_request: - -env: - # TODO: Change variable to your image's name. - IMAGE_NAME: image - -jobs: - # Run tests. - # See also https://docs.docker.com/docker-hub/builds/automated-testing/ - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Run tests - run: | - if [ -f docker-compose.test.yml ]; then - docker-compose --file docker-compose.test.yml build - docker-compose --file docker-compose.test.yml run sut - else - docker build . --file Dockerfile - fi - - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - push: - # Ensure test job passes before pushing image. - needs: test - - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v2 - - - name: Build image - run: docker build . --file Dockerfile --tag $IMAGE_NAME - - - name: Log into registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - - # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=latest - - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION