Skip to content

Commit

Permalink
data: Move phrog gschema.xml here
Browse files Browse the repository at this point in the history
The resources directory is intended for things that are embedded into,
or otherwise needed by, the main phrog binary.

The data directory is for stuff that should be dropped in the filesystem
somewhere to support phrog at runtime.

Put differently, resources/ is for the build, data/ is for the
packaging scripts.

Signed-off-by: Sam Day <me@samcday.com>
  • Loading branch information
samcday committed Feb 2, 2025
1 parent 02b6589 commit 90a862d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build() {
}

package() {
install -Dm755 resources/mobi.phosh.phrog.gschema.xml -t "$pkgdir"/usr/share/glib-2.0/schemas/
install -Dm644 data/mobi.phosh.phrog.gschema.xml -t "$pkgdir"/usr/share/glib-2.0/schemas/
install -Dm755 target/release/phrog -t "$pkgdir"/usr/bin/
}

Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn main() {
PathBuf::from(std::env::var("HOME").unwrap()).join(".local/share/glib-2.0/schemas");
std::fs::create_dir_all(&schema_path).expect("failed to create schema dir");

let phrog_gschema = PathBuf::from("resources/mobi.phosh.phrog.gschema.xml");
let phrog_gschema = PathBuf::from("data/mobi.phosh.phrog.gschema.xml");
let dest_path = schema_path.join(phrog_gschema.file_name().unwrap());
std::fs::copy(&phrog_gschema, dest_path).expect("failed to copy phrog schema file");
println!("cargo::rerun-if-changed={}", phrog_gschema.display());
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion phrog.spec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Provides: greetd-%{name} = %{version}

%install
install -d %{buildroot}%{_datadir}/glib-2.0/schemas/
%{__install} -Dpm 0644 resources/mobi.phosh.phrog.gschema.xml %{buildroot}%{_datadir}/glib-2.0/schemas/
%{__install} -Dpm 0644 data/mobi.phosh.phrog.gschema.xml %{buildroot}%{_datadir}/glib-2.0/schemas/
%cargo_install

%if %{with check}
Expand Down

0 comments on commit 90a862d

Please sign in to comment.