From 248fed7fbe843c2d014bc27921292c8d9d0f9075 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:53:10 +0100 Subject: [PATCH] Add a SwayNotificationCenter-git COPR package (#498) * Added -git RPM spec file * Updated README with -git information --- .gitignore | 1 - README.md | 2 + build-scripts/swaync-git.rpkg.spec | 121 +++++++++++++++++++++++++++++ build-scripts/swaync.rpkg.spec | 10 +-- 4 files changed, 128 insertions(+), 6 deletions(-) create mode 100644 build-scripts/swaync-git.rpkg.spec diff --git a/.gitignore b/.gitignore index 92729738..530be56d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ SwayNotificationCenter ./src/swaync ./src/swaync* .cache/ -swaync-git* diff --git a/README.md b/README.md index 97355e8d..fae1091c 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,9 @@ The package is available on COPR: ```zsh dnf copr enable erikreider/SwayNotificationCenter +# Or latest stable release or -git package dnf install SwayNotificationCenter +dnf install SwayNotificationCenter-git ``` ### Fedora Silverblue (and other rpm-ostree variants) diff --git a/build-scripts/swaync-git.rpkg.spec b/build-scripts/swaync-git.rpkg.spec new file mode 100644 index 00000000..0d06582f --- /dev/null +++ b/build-scripts/swaync-git.rpkg.spec @@ -0,0 +1,121 @@ +# vim: syntax=spec +%global alt_pkg_name swaync + +Name: {{{ git_repo_name }}}-git +Version: 0.10.1 +Release: 1%{?dist} +Summary: Notification daemon with GTK GUI +Provides: desktop-notification-daemon +Provides: sway-notification-center = %{version}-%{release} +Provides: %{alt_pkg_name} = %{version}-%{release} +License: GPLv3 +URL: https://github.com/ErikReider/SwayNotificationCenter +VCS: {{{ git_repo_vcs }}} +Source: {{{ git_repo_pack }}} + +BuildRequires: meson >= 0.51.0 +BuildRequires: vala >= 0.56 +BuildRequires: scdoc +BuildRequires: pkgconfig(gtk+-3.0) >= 3.22 +BuildRequires: pkgconfig(gtk-layer-shell-0) >= 0.1 +BuildRequires: pkgconfig(json-glib-1.0) >= 1.0 +BuildRequires: pkgconfig(libhandy-1) >= 1.4.0 +BuildRequires: pkgconfig(glib-2.0) >= 2.50 +BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.68 +BuildRequires: pkgconfig(gee-0.8) >= 0.20 +BuildRequires: pkgconfig(bash-completion) +BuildRequires: pkgconfig(fish) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(granite) +BuildRequires: systemd-devel +BuildRequires: systemd +BuildRequires: sassc +BuildRequires: granite-devel + +Requires: gvfs +Requires: libnotify +Requires: dbus +%{?systemd_requires} + +%description +A simple notification daemon with a GTK gui for notifications and the control center + +%package bash-completion +BuildArch: noarch +Summary: Bash completion files for %{name} +Provides: %{alt_pkg_name}-bash-completion = %{version}-%{release} + +Requires: bash-completion +Requires: %{name} = %{version}-%{release} + +%description bash-completion +This package installs Bash completion files for %{name} + +%package zsh-completion +BuildArch: noarch +Summary: Zsh completion files for %{name} +Provides: %{alt_pkg_name}-zsh-completion = %{version}-%{release} + +Requires: zsh +Requires: %{name} = %{version}-%{release} + +%description zsh-completion +This package installs Zsh completion files for %{name} + +%package fish-completion +BuildArch: noarch +Summary: Fish completion files for %{name} +Provides: %{alt_pkg_name}-fish-completion = %{version}-%{release} + +Requires: fish +Requires: %{name} = %{version}-%{release} + +%description fish-completion +This package installs Fish completion files for %{name} + +%prep +{{{ git_repo_setup_macro }}} + +%build +%meson +%meson_build + +%install +%meson_install + +%post +%systemd_user_post swaync.service + +%preun +%systemd_user_preun swaync.service + +%files +%doc README.md +%{_bindir}/swaync-client +%{_bindir}/swaync +%license COPYING +%config(noreplace) %{_sysconfdir}/xdg/swaync/configSchema.json +%config(noreplace) %{_sysconfdir}/xdg/swaync/config.json +%config(noreplace) %{_sysconfdir}/xdg/swaync/style.css +%{_userunitdir}/swaync.service +%{_datadir}/dbus-1/services/org.erikreider.swaync.service +%{_datadir}/glib-2.0/schemas/org.erikreider.swaync.gschema.xml +%{_mandir}/man1/swaync-client.1.gz +%{_mandir}/man1/swaync.1.gz +%{_mandir}/man5/swaync.5.gz + +%files bash-completion +%{_datadir}/bash-completion/completions/swaync +%{_datadir}/bash-completion/completions/swaync-client + +%files zsh-completion +%{_datadir}/zsh/site-functions/_swaync +%{_datadir}/zsh/site-functions/_swaync-client + +%files fish-completion +%{_datadir}/fish/vendor_completions.d/swaync-client.fish +%{_datadir}/fish/vendor_completions.d/swaync.fish + +# Changelog will be empty until you make first annotated Git tag. +%changelog +{{{ git_repo_changelog }}} diff --git a/build-scripts/swaync.rpkg.spec b/build-scripts/swaync.rpkg.spec index 3a3fcd32..f8509dd0 100644 --- a/build-scripts/swaync.rpkg.spec +++ b/build-scripts/swaync.rpkg.spec @@ -1,7 +1,7 @@ # vim: syntax=spec %global alt_pkg_name swaync -Name: {{{ git_dir_name }}} +Name: {{{ git_repo_name }}} Version: 0.10.1 Release: 1%{?dist} Summary: Notification daemon with GTK GUI @@ -10,8 +10,8 @@ Provides: sway-notification-center = %{version}-%{release} Provides: %{alt_pkg_name} = %{version}-%{release} License: GPLv3 URL: https://github.com/ErikReider/SwayNotificationCenter -VCS: {{{ git_dir_vcs }}} -Source: {{{ git_dir_pack }}} +VCS: {{{ git_repo_vcs }}} +Source: {{{ git_repo_pack }}} BuildRequires: meson >= 0.51.0 BuildRequires: vala >= 0.56 @@ -74,7 +74,7 @@ Requires: %{name} = %{version}-%{release} This package installs Fish completion files for %{name} %prep -{{{ git_dir_setup_macro }}} +{{{ git_repo_setup_macro }}} %build %meson @@ -118,4 +118,4 @@ This package installs Fish completion files for %{name} # Changelog will be empty until you make first annotated Git tag. %changelog -{{{ git_dir_changelog }}} +{{{ git_repo_changelog }}}