Desktop/icon files, rpm dist
This commit is contained in:
10
build-aux/post-install.sh
Normal file
10
build-aux/post-install.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
datadir=$1
|
||||
|
||||
# Package managers set this so we don't need to run
|
||||
if [ -z "$DESTDIR" ]; then
|
||||
echo Compiling GSettings schemas...
|
||||
glib-compile-schemas ${datadir}/glib-2.0/schemas
|
||||
fi
|
||||
|
||||
26
build-aux/resize.py
Executable file
26
build-aux/resize.py
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os, sys
|
||||
|
||||
icon_class = [
|
||||
'16x16',
|
||||
'24x24',
|
||||
'32x32',
|
||||
'48x48',
|
||||
'256x256',
|
||||
'512x512',
|
||||
]
|
||||
|
||||
magick = sys.argv[1]
|
||||
input_file = sys.argv[2]
|
||||
output = sys.argv[3]
|
||||
|
||||
for iclass in icon_class:
|
||||
outdir = os.path.join(output, iclass, 'apps')
|
||||
outfile = os.path.join(outdir, 'net.buzzert.kordophone.png')
|
||||
|
||||
os.makedirs(outdir, exist_ok=True)
|
||||
os.system('{magick} {input} -resize {klass} {outfile}'
|
||||
.format(magick=magick, input=input_file, klass=iclass, outfile=outfile))
|
||||
|
||||
|
||||
57
dist/rpm/kordophone.spec
vendored
Normal file
57
dist/rpm/kordophone.spec
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
Name: kordophone
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: GTK4/Libadwaita client for Kordophone
|
||||
|
||||
License: GPL
|
||||
URL: https://git.sr.ht/~buzzert/kordophone-2-gtk
|
||||
# Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: meson >= 0.56.0
|
||||
BuildRequires: vala
|
||||
BuildRequires: gcc
|
||||
BuildRequires: pkgconfig(gtk4)
|
||||
BuildRequires: pkgconfig(libadwaita-1)
|
||||
BuildRequires: pkgconfig(gio-2.0)
|
||||
BuildRequires: pkgconfig(gee-0.8)
|
||||
BuildRequires: pkgconfig(gio-unix-2.0)
|
||||
BuildRequires: pkgconfig(libsecret-1)
|
||||
|
||||
Requires: gtk4
|
||||
Requires: libadwaita
|
||||
Requires: glib2
|
||||
Requires: libgee
|
||||
Requires: libsecret
|
||||
Requires: kordophoned >= 1.0.0
|
||||
|
||||
%description
|
||||
A GTK4/Libadwaita Linux Client for the Kordophone client daemon.
|
||||
|
||||
%prep
|
||||
if [ ! -d .git ]; then
|
||||
git clone --bare https://git.sr.ht/~buzzert/kordophone-2-gtk .git
|
||||
git config --local --bool core.bare false
|
||||
git reset --hard
|
||||
fi
|
||||
|
||||
%build
|
||||
%meson
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
|
||||
%files
|
||||
%{_bindir}/kordophone
|
||||
%{_datadir}/applications/net.buzzert.kordophone.desktop
|
||||
%{_datadir}/icons/
|
||||
%{_datadir}/icons/hicolor/16x16/apps/net.buzzert.kordophone.png
|
||||
%{_datadir}/icons/hicolor/24x24/apps/net.buzzert.kordophone.png
|
||||
%{_datadir}/icons/hicolor/32x32/apps/net.buzzert.kordophone.png
|
||||
%{_datadir}/icons/hicolor/48x48/apps/net.buzzert.kordophone.png
|
||||
%{_datadir}/icons/hicolor/256x256/apps/net.buzzert.kordophone.png
|
||||
%{_datadir}/icons/hicolor/512x512/apps/net.buzzert.kordophone.png
|
||||
%{_datadir}/icons/net.buzzert.kordophone.png
|
||||
|
||||
%changelog
|
||||
- Initial RPM package
|
||||
@@ -8,12 +8,46 @@ dependencies = [
|
||||
]
|
||||
|
||||
gnome = import('gnome')
|
||||
kp_prefix = get_option('prefix')
|
||||
datadir = join_paths(kp_prefix, get_option('datadir'))
|
||||
resources = gnome.compile_resources(
|
||||
'kordophone-resources',
|
||||
'resources/kordophone.gresource.xml',
|
||||
source_dir: 'resources'
|
||||
)
|
||||
|
||||
# Icons
|
||||
app_icon_dirs = [
|
||||
'16x16',
|
||||
'24x24',
|
||||
'32x32',
|
||||
'48x48',
|
||||
'256x256',
|
||||
'512x512',
|
||||
]
|
||||
|
||||
build_tools_dir = meson.source_root() / 'build-aux'
|
||||
|
||||
image_magick = find_program('magick', required : true)
|
||||
resizer = find_program(build_tools_dir / 'resize.py')
|
||||
icons = custom_target('icons',
|
||||
output: 'hicolor',
|
||||
input: 'resources/net.buzzert.kordophone.png',
|
||||
command: [resizer, image_magick, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'icons'),
|
||||
)
|
||||
|
||||
# Full res icon for Desktop Entry
|
||||
install_data('resources/net.buzzert.kordophone.png',
|
||||
install_dir: join_paths(datadir, 'icons'),
|
||||
)
|
||||
|
||||
# Desktop
|
||||
install_data('resources/net.buzzert.kordophone.desktop',
|
||||
install_dir: join_paths(datadir, 'applications')
|
||||
)
|
||||
|
||||
sources = [
|
||||
'application/kordophone-application.vala',
|
||||
'application/main-window.vala',
|
||||
@@ -49,8 +83,9 @@ sources = [
|
||||
executable('kordophone',
|
||||
sources,
|
||||
resources,
|
||||
icons,
|
||||
dependencies : dependencies,
|
||||
vala_args: ['--pkg', 'posix'],
|
||||
link_args: ['-lm'],
|
||||
install : true
|
||||
)
|
||||
)
|
||||
|
||||
9
src/resources/net.buzzert.kordophone.desktop
Normal file
9
src/resources/net.buzzert.kordophone.desktop
Normal file
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Name=Kordophone
|
||||
Comment=Kordophone GTK Client
|
||||
Exec=kordophone
|
||||
Icon=net.buzzert.kordophone.png
|
||||
Terminal=false
|
||||
|
||||
BIN
src/resources/net.buzzert.kordophone.png
Normal file
BIN
src/resources/net.buzzert.kordophone.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 272 KiB |
Reference in New Issue
Block a user