Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ debian/phrog/
debian/phrog.substvars
debian/tmp_home/
target/
vendor/
*.tar.gz
*.src.rpm
*.rpm
*.log
20 changes: 16 additions & 4 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@ files_to_sync:
- .packit.yaml
upstream_package_name: phrog
downstream_package_name: phrog
srpm_build_deps:
- cargo

# Pre-bake the vendor tarball alongside the spec so SRPMs are self-contained
# and `mock` builds work fully offline. Used by the default (vendored) build
# path; the non-vendor path ignores Source1.
actions:
post-upstream-clone:
- cargo vendor --locked --versioned-dirs vendor
- tar -H pax --create --gzip --sort=name --owner=0 --group=0 --numeric-owner --file phrog-vendor.tar.gz vendor

jobs:
# Build PRs
# Build PRs against the non-vendor path, leaning on the gtk3-rs RPMs
# resurrected in samcday/phrog-nightly.
- job: copr_build
manual_trigger: true
trigger: pull_request
Expand All @@ -21,7 +33,8 @@ jobs:
fedora-rawhide-aarch64: *opts
fedora-rawhide-x86_64: *opts

# Build main commits in samcday/phrog-nightly COPR
# Build main commits in samcday/phrog-nightly COPR via the vendor path,
# mirroring what ships in Fedora dist-git.
- job: copr_build
trigger: commit
branch: main
Expand All @@ -30,9 +43,8 @@ jobs:
additional_repos:
- copr://samcday/phosh-nightly

# Build tagged releases in samcday/phrog COPR
# Build tagged releases in samcday/phrog COPR via the vendor path.
- job: copr_build
trigger: release
enable_net: true
owner: samcday
project: phrog
16 changes: 14 additions & 2 deletions phrog.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
%global _cargo_generate_buildrequires 0
%endif

# gettext-sys's build.rs falls back to compiling its bundled gettext when
# this is unset, and that bundled build is broken on Fedora 43+. Force the
# system libintl path; gettext-devel provides the headers.
%global gettext_sys_env export GETTEXT_SYSTEM=1

Name: phrog
Version: 0.53.0_rc7
Release: %autorelease
Summary: Mobile-friendly greeter for greetd
License: GPL-3.0-only
URL: https://github.com/samcday/phrog
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
%if %{with vendor}
Source1: %{name}-vendor.tar.gz
%endif

ExcludeArch: %{ix86}

Expand All @@ -32,6 +40,7 @@ BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libhandy-1)
BuildRequires: pkgconfig(libphosh-0.45)
BuildRequires: gettext-devel
%endif

Requires: accountsservice
Expand All @@ -51,7 +60,7 @@ mkdir -p /tmp/runtime-dir
chmod 0700 /tmp/runtime-dir

%if %{with vendor}
%{__cargo} vendor --locked --versioned-dirs vendor
tar -xf %{SOURCE1}
%cargo_prep -v vendor
%else
%cargo_prep
Expand All @@ -60,6 +69,7 @@ chmod 0700 /tmp/runtime-dir
%endif

%build
%{gettext_sys_env}
%cargo_build
%cargo_vendor_manifest
%{cargo_license_summary}
Expand All @@ -77,6 +87,7 @@ chmod 0700 /tmp/runtime-dir
%{__install} -Dpm 0755 data/phrog-greetd-session -t %{buildroot}%{_libexecdir}/
%{__install} -d %{buildroot}%{_datadir}/phrog/autostart
%{__install} -d %{buildroot}%{_sysconfdir}/phrog/autostart
%{gettext_sys_env}
%cargo_install

%if %{with check}
Expand All @@ -85,6 +96,7 @@ export G_MESSAGES_DEBUG=all
export XDG_RUNTIME_DIR=/tmp/runtime-dir
cat > test.sh <<HERE
#!/bin/bash
%{gettext_sys_env}
%cargo_test
HERE
chmod +x test.sh
Expand Down
Loading