Linux + iPhone Continuity / iMessage / SMS
feat(packaging): fedora COPR build
Zack Bartelda94558814b9
diff --git a/.copr/Makefile b/.copr/Makefilenew file mode 100644index 0000000..abbab9c--- /dev/null+++ b/.copr/Makefile@@ -0,0 +1,20 @@+# COPR make_srpm entry point: builds the source RPM from this checkout.+#+# make -f .copr/Makefile srpm outdir=/tmp/srpm+#+# Version comes from the nearest v* tag. Commits past it become 0.2.41^3.gabc1234,+# which sorts after 0.2.41 and before 0.2.42.++top := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))..)+outdir ?= $(top)/build/srpm+git := git -C $(top) -c safe.directory='*'++srpm:+ command -v git >/dev/null && command -v rpmbuild >/dev/null || dnf -y install git rpm-build+ set -e; \+ desc=$$($(git) describe --tags --match 'v*' | sed 's/^v//'); \+ ver=$$(echo "$$desc" | sed 's/-\([0-9]*\)-g/^\1.g/'); \+ work=$$(mktemp -d); \+ $(git) archive --prefix=tether-$$ver/ -o $$work/tether-$$ver.tar.gz HEAD; \+ sed -e "s/@VERSION@/$$ver/" -e "s/@TETHER_VERSION@/$$desc/" $(top)/packaging/rpm/tether.spec > $$work/tether.spec; \+ rpmbuild -bs --define "_sourcedir $$work" --define "_srcrpmdir $(outdir)" $$work/tether.specdiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 8dd1691..c855337 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -136,6 +136,23 @@ jobs:path: build/flatpak/*.flatpakif-no-files-found: error+ copr:+ needs: [package]+ if: github.ref_type == 'tag'+ runs-on: ubuntu-latest+ container: fedora:latest+ steps:+ - name: build in COPR+ env:+ COPR_CONFIG: ${{ secrets.COPR_CONFIG }}+ TAG: ${{ github.ref_name }}+ run: |+ dnf install -y copr-cli+ mkdir -p ~/.config+ printf '%s\n' "$COPR_CONFIG" > ~/.config/copr+ copr-cli buildscm zackb/tether --clone-url "https://github.com/$GITHUB_REPOSITORY.git" \+ --commit "$TAG" --method make_srpm+release:needs: [package, appimage, flatpak]if: github.ref_type == 'tag'diff --git a/README.md b/README.mdindex 050e094..38740f3 100644--- a/README.md+++ b/README.md@@ -95,6 +95,23 @@ The extension communicates with `tetherd` via native messaging. This allows useryay -S tether```+### Fedora++```bash+sudo dnf copr enable zackb/tether+sudo dnf install tether+```++Update with `dnf upgrade`.++On Fedora Atomic (Silverblue, Kinoite, Bazzite):++```bash+curl -fsSL "https://copr.fedorainfracloud.org/coprs/zackb/tether/repo/fedora-$(rpm -E %fedora)/zackb-tether-fedora-$(rpm -E %fedora).repo" \+ | sudo tee /etc/yum.repos.d/zackb-tether.repo+rpm-ostree install tether+```+### AppImageOne file, no install, for distros without a package and for immutable systems.diff --git a/packaging/rpm/tether.spec b/packaging/rpm/tether.specnew file mode 100644index 0000000..789a7e9--- /dev/null+++ b/packaging/rpm/tether.spec@@ -0,0 +1,74 @@+# Built by COPR through .copr/Makefile, which fills in the @...@ fields.+# The COPR project allows network access: FetchContent and npm download at build time.++Name: tether+Version: @VERSION@+Release: 1%{?dist}+Summary: Bridge an iPhone to the Linux desktop: clipboard, files, messages, and notifications+License: MIT+URL: https://github.com/zackb/tether+Source0: %{name}-%{version}.tar.gz++BuildRequires: gcc-c+++BuildRequires: cmake+BuildRequires: git+BuildRequires: pkgconf-pkg-config+BuildRequires: wayland-devel+BuildRequires: avahi-devel+BuildRequires: openssl-devel+BuildRequires: glib2-devel+BuildRequires: libsecret-devel+BuildRequires: gtk3-devel+BuildRequires: gtk-layer-shell-devel+BuildRequires: libnotify-devel+BuildRequires: ncurses-devel+BuildRequires: gettext+BuildRequires: npm+BuildRequires: zip++Requires: bluez+Requires: bluez-obexd++%description+Tether bridges an iPhone to the Linux desktop: clipboard sync, file transfer,+messages, calls, and notifications.++%prep+%autosetup++%build+%cmake -DTETHER_VERSION=@TETHER_VERSION@+%cmake_build++%install+%cmake_install+%find_lang %{name}++%check+%ctest++%files -f %{name}.lang+%license LICENSE+%doc README.md+%{_bindir}/tether+%{_bindir}/tether-dialog+%{_bindir}/tether-gtk+%{_bindir}/tether-native-host+%{_bindir}/tether-tui+%{_bindir}/tetherd+%{_sysconfdir}/chromium/native-messaging-hosts/com.tether.extension.json+%{_sysconfdir}/opt/chrome/native-messaging-hosts/com.tether.extension.json+%{_sysconfdir}/ufw/applications.d/tether+%{_libdir}/mozilla/native-messaging-hosts/com.tether.extension.json+%{_libdir}/thunderbird/native-messaging-hosts/com.tether.extension.json+%{_prefix}/lib/firewalld/services/tether.xml+%{_unitdir}/[email protected]+%{_userunitdir}/tetherd.service+%{_datadir}/applications/tether-gtk.desktop+%{_datadir}/icons/hicolor/*/apps/tether*+%{_datadir}/kio/servicemenus/tether-send.desktop+%{_metainfodir}/com.tether.desktop.metainfo.xml+%{_datadir}/tether/+%{_mandir}/man1/tether.1*+%{_mandir}/man1/tether-gtk.1*+%{_mandir}/man8/tetherd.8*