Debian Codegraph @

fedora/font-manager.spec

raw
1 %global MajorVersion 0
2 %global MinorVersion 9
3 %global PatchVersion 4
4 %global build_timestamp %{lua: print(os.date("%Y%m%d"))}
5 %global DBusName com.github.FontManager.FontManager
6 %global DBusName2 com.github.FontManager.FontViewer
7 %global git_archive https://github.com/FontManager/font-manager/archive/master.tar.gz
8
9 %bcond adwaita 1
10 %bcond libarchive 1
11 %bcond nautilus 1
12 %bcond nemo 1
13 %bcond thunar 1
14 %bcond webkit 1
15
16 Name: font-manager
17 Version: %{MajorVersion}.%{MinorVersion}.%{PatchVersion}.%{build_timestamp}
18 Release: 1
19 Summary: A simple font management application for Gtk+ Desktop Environments
20 License: GPLv3+
21 Url: http://fontmanager.github.io/
22 Source0: %{git_archive}
23
24 BuildRequires: gettext
25 BuildRequires: meson
26 BuildRequires: fontconfig-devel >= 2.12
27 BuildRequires: freetype-devel >= 2.10
28 BuildRequires: glib2-devel >= 2.62
29 BuildRequires: gobject-introspection-devel
30 BuildRequires: gtk4-devel >= 4.12
31 BuildRequires: json-glib-devel >= 1.5
32 BuildRequires: libappstream-glib
33 BuildRequires: libxml2-devel >= 2.9.10
34 BuildRequires: pango-devel >= 1.45
35 BuildRequires: sqlite-devel >= 3.35
36 BuildRequires: vala >= 0.42
37 BuildRequires: yelp-tools
38 BuildRequires: desktop-file-utils
39
40 %if %{with adwaita}
41 BuildRequires: libadwaita-devel
42 %endif
43
44 %if %{with libarchive}
45 BuildRequires: libarchive-devel >= 3.7
46 %endif
47
48 %if %{with webkit}
49 BuildRequires: libsoup3-devel >= 3.2
50 BuildRequires: webkitgtk6.0-devel >= 2.4
51 %endif
52
53 %if %{with nautilus}
54 BuildRequires: nautilus-devel
55 %endif
56
57 %if %{with nemo}
58 BuildRequires: nemo-devel
59 %endif
60
61 %if %{with thunar}
62 BuildRequires: Thunar-devel
63 %endif
64
65 Requires: fontconfig
66 Requires: %{name}-common
67 Requires: font-viewer
68 Requires: freetype
69 Requires: gtk4 >= 4.12
70 Requires: sqlite
71 Requires: yelp
72
73 %if %{with adwaita}
74 Requires: libadwaita
75 %endif
76
77 %if %{with libarchive}
78 Requires: libarchive >= 3.7
79 %endif
80
81 %if %{with webkit}
82 Requires: libsoup3
83 Requires: webkitgtk6.0
84 %endif
85
86 %description
87 Font Manager is intended to provide a way for average users to easily
88 manage desktop fonts, without having to resort to command line tools
89 or editing configuration files by hand. While designed primarily with
90 the Gnome Desktop Environment in mind, it should work well with other
91 Gtk+ desktop environments.
92
93 Font Manager is NOT a professional-grade font management solution.
94
95 %package -n %{name}-common
96 Summary: Common files used by font-manager
97 %description -n %{name}-common
98 This package contains common files such as libraries, help files,
99 translations, etc.
100 These files are required by font-manager and font-viewer.
101
102 %package -n font-viewer
103 Summary: Full featured font file preview application for GTK+ Desktop Environments
104 Requires: %{name}-common >= %{version}
105 %description -n font-viewer
106 This package contains the font-viewer component of font-manager.
107
108 %if %{with nautilus}
109 %package -n nautilus-%{name}
110 Summary: Nautilus extension for Font Manager
111 Requires: font-viewer >= %{version}
112 Requires: %{name}-common >= %{version}
113 %description -n nautilus-%{name}
114 This package provides integration with the Nautilus file manager.
115 %endif
116
117 %if %{with nemo}
118 %package -n nemo-%{name}
119 Summary: Nemo extension for Font Manager
120 Requires: font-viewer >= %{version}
121 Requires: %{name}-common >= %{version}
122 %description -n nemo-%{name}
123 This package provides integration with the Nemo file manager.
124 %endif
125
126 %if %{with thunar}
127 %package -n thunar-%{name}
128 Summary: Thunar extension for Font Manager
129 Requires: font-viewer >= %{version}
130 Requires: %{name}-common >= %{version}
131 %description -n thunar-%{name}
132 This package provides integration with the Thunar file manager.
133 %endif
134
135 %prep
136 %autosetup -n %{name}-master
137
138 %build
139 %meson --buildtype=debugoptimized \
140 -Dadwaita=%{?with_adwaita:true}%{!?with_adwaita:false} \
141 -Dlibarchive=%{?with_libarchive:true}%{!?with_libarchive:false} \
142 -Dnautilus=%{?with_nautilus:true}%{!?with_nautilus:false} \
143 -Dnemo=%{?with_nemo:true}%{!?with_nemo:false} \
144 -Dthunar=%{?with_thunar:true}%{!?with_thunar:false} \
145 -Dwebkit=%{?with_webkit:true}%{!?with_webkit:false} \
146 -Dreproducible=true
147 %meson_build
148
149 %install
150 %meson_install
151
152 %find_lang %{name}
153
154 %check
155 appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.metainfo.xml
156
157 %posttrans
158 /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
159 /usr/bin/gtk4-update-icon-cache -q -t -f %{_datadir}/icons/hicolor &> /dev/null || :
160 /usr/bin/update-desktop-database -q %{_datadir}/applications &> /dev/null || :
161
162 %files
163 %{_bindir}/%{name}
164 %{_datadir}/metainfo/%{DBusName}.metainfo.xml
165 %{_datadir}/applications/%{DBusName}.desktop
166 %{_datadir}/dbus-1/services/%{DBusName}.service
167 %{_datadir}/gnome-shell/search-providers/%{DBusName}.SearchProvider.ini
168 %{_datadir}/icons/hicolor/scalable/apps/%{DBusName}.svg
169 %{_mandir}/man1/%{name}.*
170
171 %files -n %{name}-common -f %{name}.lang
172 %license COPYING
173 %{_libdir}/%{name}
174 %{_datadir}/help/*/%{name}
175 %{_datadir}/glib-2.0/schemas/%{DBusName}.gschema.xml
176
177 %files -n font-viewer
178 %{_libexecdir}/%{name}/font-viewer
179 %{_datadir}/metainfo/%{DBusName2}.metainfo.xml
180 %{_datadir}/applications/%{DBusName2}.desktop
181 %{_datadir}/dbus-1/services/%{DBusName2}.service
182 %{_datadir}/glib-2.0/schemas/%{DBusName2}.gschema.xml
183 %{_datadir}/icons/hicolor/scalable/apps/%{DBusName2}.svg
184
185 %if %{with nautilus}
186 %files -n nautilus-%{name}
187 %{_libdir}/nautilus/extensions*/nautilus-%{name}.so
188 %endif
189
190 %if %{with nemo}
191 %files -n nemo-%{name}
192 %{_libdir}/nemo/extensions-3.0/nemo-%{name}.so
193 %endif
194
195 %if %{with thunar}
196 %files -n thunar-%{name}
197 %{_libdir}/thunarx-3/thunar-%{name}.so
198 %endif
199
200 %changelog
201 * Wed Mar 5 2025 JerryCasiano <[email protected]> 0.9.4-1
202 - Refer to https://github.com/FontManager/font-manager/commits/master for changes.