diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..583decf --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7650944 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,84 @@ +name: Build & Release +on: + workflow_dispatch: + pull_request: + push: + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Test + run: | + make test + - name: Build + run: | + sudo apt-get update + sudo apt-get build-dep --no-install-recommends -y . + make all deb + - name: Workaround actions/upload-artifact#176 + run: | + echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ github.event.repository.name }} + path: | + ${{ env.artifacts_path }}/*.deb + release: + runs-on: ubuntu-22.04 + needs: build + if: ${{ github.event_name != 'pull_request' && github.ref_name == 'main' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - uses: actions/download-artifact@v3 + with: + name: ${{ github.event.repository.name }} + - name: Check if the latest version is releasable + run: | + version="$(dpkg-parsechangelog -S Version)" + echo "version=$version" >> $GITHUB_ENV + echo "changes<> $GITHUB_ENV + echo '```' >> $GITHUB_ENV + echo "$(dpkg-parsechangelog -S Changes)" >> $GITHUB_ENV + echo '```' >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + if [[ -n "$(git tag -l "$version")" ]] + then + echo "distro=UNRELEASED" >> $GITHUB_ENV + else + echo "distro=$(dpkg-parsechangelog -S Distribution)" >> $GITHUB_ENV + fi + echo "$version" > VERSION + - name: Release + if: env.distro != 'UNRELEASED' + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ env.version }} + body_path: README.md + token: ${{ secrets.GITHUB_TOKEN }} + target_commitish: main + draft: false + fail_on_unmatched_files: false + files: | + *.deb + pkg.conf + VERSION + - name: Append changelog + if: env.distro != 'UNRELEASED' + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ env.version }} + body: | + ## Changelog for ${{ env.version }} + ${{ env.changes }} + append_body: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7cb8b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.vscode* +/SOURCE +/VERSION \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d2d5c2c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src"] + path = src + url = https://github.com/radxa-pkg/rtl8723ds.git diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..560f157 --- /dev/null +++ b/Makefile @@ -0,0 +1,60 @@ +PROJECT ?= rtl8723ds +PREFIX ?= /usr +BINDIR ?= $(PREFIX)/bin +LIBDIR ?= $(PREFIX)/lib +MANDIR ?= $(PREFIX)/share/man + +.PHONY: all +all: build + +# +# Test +# +.PHONY: test +test: + +# +# Build +# +.PHONY: build +build: build-doc + +SRC-DOC := . +DOCS := $(SRC-DOC)/SOURCE +.PHONY: build-doc +build-doc: $(DOCS) + +$(SRC-DOC): + mkdir -p $(SRC-DOC) + +.PHONY: $(SRC-DOC)/SOURCE +$(SRC-DOC)/SOURCE: $(SRC-DOC) + echo -e "git clone $(shell git remote get-url origin)\ngit checkout $(shell git rev-parse HEAD)" > "$@" + +# +# Clean +# +.PHONY: distclean +distclean: clean + +.PHONY: clean +clean: clean-doc clean-deb + +.PHONY: clean-doc +clean-doc: + rm -rf $(DOCS) + +.PHONY: clean-deb +clean-deb: + rm -rf debian/.debhelper debian/rtl8723ds-dkms debian/debhelper-build-stamp debian/files debian/*.debhelper.log debian/*.*.debhelper debian/*.substvars + +# +# Release +# +.PHONY: dch +dch: debian/changelog + gbp dch --debian-branch=main + +.PHONY: deb +deb: debian + debuild --no-lintian --lintian-hook "lintian --fail-on error,warning --suppress-tags bad-distribution-in-changes-file -- %p_%v_*.changes" --no-sign -b diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a04579 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# rtl8723ds + +[![Release](https://github.com/radxa-pkg/rtl8723ds/actions/workflows/release.yml/badge.svg)](https://github.com/radxa-pkg/rtl8723ds/actions/workflows/release.yml) + +Realtek RTL8723DS Wi-Fi driver diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..272cfe2 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,7 @@ +/.debhelper +/debhelper-build-stamp +/files +/rtl8723ds-dkms +/*.debhelper.log +/*.postrm.debhelper +/*.substvars diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..93d7933 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +rtl8723ds (5.1.1.5+git20230505.339d6c4-1) stable; urgency=medium + + * Imported from radxa-pkg/rtl8723ds#339d6c4d89c51db3b0ca9e9772c73d7e48e71ca3 + + -- "Radxa Computer Co., Ltd" Mon, 10 Apr 2023 21:31:55 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +12 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..63137f7 --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: rtl8723ds +Maintainer: "Radxa Computer Co., Ltd" +Section: misc +Priority: optional +Standards-Version: 4.6.0 +Build-Depends: debhelper (>=12~), + devscripts, + dh-sequence-dkms, + lintian, + +Package: rtl8723ds-dkms +Architecture: all +Section: misc +Priority: optional +Depends: ${misc:Depends}, +Description: dkms sources for Realtek RTL8723DS Wi-Fi driver + This package provides the dkms source code for Realtek + RTL8723DS Wi-Fi driver. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..0187ce9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: rtl8723ds +Source: https://github.com/radxa-pkg/rtl8723ds + +Files: * +Copyright: © 2022 Radxa Computer Co., Ltd +License: GPL-3+ + +License: GPL-3+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA. + . + On Debian systems, the complete text of the GNU General Public License + can be found in /usr/share/common-licenses/GPL-3. diff --git a/debian/dkms b/debian/dkms new file mode 100644 index 0000000..a654c7c --- /dev/null +++ b/debian/dkms @@ -0,0 +1,5 @@ +PACKAGE_NAME="rtl8723ds" +PACKAGE_VERSION="#MODULE_VERSION#" +BUILT_MODULE_NAME[0]="$PACKAGE_NAME" +DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless/" +AUTOINSTALL="YES" diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..11b531f --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +SOURCE diff --git a/debian/lintian-overrides b/debian/lintian-overrides new file mode 100644 index 0000000..99674c6 --- /dev/null +++ b/debian/lintian-overrides @@ -0,0 +1,2 @@ +# We do not track this on GitHub +rtl8723ds-dkms: initial-upload-closes-no-bugs diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b539017 --- /dev/null +++ b/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/architecture.mk + +%: + dh $@ + +override_dh_install: + dh_install -prtl8723ds-dkms src/* usr/src/rtl8723ds-$(DEB_VERSION)/ + +override_dh_dkms: + dh_dkms -V $(DEB_VERSION) + +override_dh_builddeb: + dh_builddeb -- -Zxz diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..8dd5451 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,4 @@ +# Our package is built on GitHub-hosted runner, +# which uses Ubuntu, and will default to zstd compression. +# This is currently not supported in Debian. +rtl8723ds source: custom-compression-in-debian-rules diff --git a/src b/src new file mode 160000 index 0000000..339d6c4 --- /dev/null +++ b/src @@ -0,0 +1 @@ +Subproject commit 339d6c4d89c51db3b0ca9e9772c73d7e48e71ca3