]>
Commit | Line | Data |
---|---|---|
5657a9ed JB |
1 | # TODO: use gtk4-update-icon-cache |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without apidocs # API documentation | |
5 | ||
d65eee9f MB |
6 | Summary: GNOME binary editor |
7 | Summary(pl.UTF-8): Edytor binarny dla GNOME | |
a21fa5d4 | 8 | Name: ghex |
7488dba6 | 9 | Version: 42.1 |
e19885bf | 10 | Release: 1 |
581e2c08 | 11 | License: GPL v2 |
d62d3da5 | 12 | Group: X11/Applications/Editors |
5657a9ed | 13 | Source0: https://download.gnome.org/sources/ghex/42/%{name}-%{version}.tar.xz |
7488dba6 | 14 | # Source0-md5: 6d5b4d83e4f00427f27efcfe92e05790 |
5657a9ed | 15 | Patch0: %{name}-no-update.patch |
e19885bf | 16 | URL: https://wiki.gnome.org/Apps/Ghex |
8ea32fd6 | 17 | BuildRequires: gettext-tools |
5657a9ed JB |
18 | %{?with_apidocs:BuildRequires: gi-docgen} |
19 | BuildRequires: glib2-devel >= 1:2.66.0 | |
20 | BuildRequires: gobject-introspection-devel | |
21 | BuildRequires: gtk4-devel >= 4.0.0 | |
22 | BuildRequires: meson >= 0.59.0 | |
28734864 | 23 | BuildRequires: ninja >= 1.5 |
341875a7 | 24 | BuildRequires: pkgconfig |
5657a9ed | 25 | BuildRequires: rpm-build >= 4.6 |
28734864 | 26 | BuildRequires: rpmbuild(macros) >= 1.736 |
d65eee9f MB |
27 | BuildRequires: tar >= 1:1.22 |
28 | BuildRequires: xz | |
fa5faff3 | 29 | BuildRequires: yelp-tools |
5657a9ed | 30 | Requires(post,postun): glib2 >= 1:2.66.0 |
2331e518 | 31 | Requires(post,postun): gtk-update-icon-cache |
d65eee9f MB |
32 | Requires: %{name}-libs = %{version}-%{release} |
33 | Requires: hicolor-icon-theme | |
7188ac79 | 34 | Conflicts: glibc-misc < 6:2.7 |
69775058 | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
a21fa5d4 | 36 | |
37 | %description | |
38 | GHex allows the user to load data from any file, view and edit it in | |
39 | either hex or ascii. A must for anyone playing games that use | |
40 | non-ascii format for saving. | |
41 | ||
059ed03f JR |
42 | %description -l pl.UTF-8 |
43 | GHex pozwala użytkownikowi na wczytanie danych z dowolnego pliku, | |
d65eee9f MB |
44 | przeglądanie i edycję ich w trybie szesnastkowym i ASCII. Obowiązkowe |
45 | narzędzie dla wszystkich graczy, których gry zapisują stan w formacie | |
46 | innym niż tekstowy. | |
47 | ||
48 | %package libs | |
49 | Summary: GHex library | |
50 | Summary(pl.UTF-8): Biblioteka GHex | |
51 | Group: X11/Libraries | |
5657a9ed JB |
52 | Requires: glib2 >= 1:2.66.0 |
53 | Requires: gtk4 >= 4.0.0 | |
d65eee9f MB |
54 | |
55 | %description libs | |
56 | GHex library. | |
57 | ||
58 | %description libs -l pl.UTF-8 | |
59 | Biblioteka GHex. | |
a21fa5d4 | 60 | |
d3ef15ab | 61 | %package devel |
62 | Summary: GHex devel files | |
f44a2055 | 63 | Summary(pl.UTF-8): Pliki nagłówkowe GHex |
d62d3da5 | 64 | Group: X11/Development/Libraries |
d65eee9f | 65 | Requires: %{name}-libs = %{version}-%{release} |
5657a9ed | 66 | Requires: gtk4-devel >= 4.0.0 |
d3ef15ab | 67 | |
68 | %description devel | |
25545d6f | 69 | GHex devel files. |
d3ef15ab | 70 | |
059ed03f JR |
71 | %description devel -l pl.UTF-8 |
72 | Pliki nagłówkowe GHex. | |
d3ef15ab | 73 | |
74 | %package static | |
25545d6f | 75 | Summary: GHex static library |
f44a2055 | 76 | Summary(pl.UTF-8): Biblioteka statyczna GHex |
d62d3da5 | 77 | Group: X11/Development/Libraries |
b19f0cc4 | 78 | Requires: %{name}-devel = %{version}-%{release} |
d3ef15ab | 79 | |
80 | %description static | |
25545d6f | 81 | GHex static library. |
d3ef15ab | 82 | |
059ed03f | 83 | %description static -l pl.UTF-8 |
25545d6f | 84 | Biblioteka statyczna GHex. |
d3ef15ab | 85 | |
5657a9ed JB |
86 | %package apidocs |
87 | Summary: API documentation for GHex library | |
88 | Summary(pl.UTF-8): Dokumentacja API biblioteki GHex | |
89 | Group: Documentation | |
90 | BuildArch: noarch | |
91 | ||
92 | %description apidocs | |
93 | API documentation for GHex library. | |
94 | ||
95 | %description apidocs -l pl.UTF-8 | |
96 | Dokumentacja API biblioteki GHex. | |
97 | ||
a21fa5d4 | 98 | %prep |
a21fa5d4 | 99 | %setup -q |
100 | %patch0 -p1 | |
7a96b9b9 | 101 | |
a21fa5d4 | 102 | %build |
5657a9ed JB |
103 | %meson build \ |
104 | %{?with_apidocs:-Dgtk_doc=true} | |
28734864 JB |
105 | |
106 | %ninja_build -C build | |
a21fa5d4 | 107 | |
108 | %install | |
a21fa5d4 | 109 | rm -rf $RPM_BUILD_ROOT |
aa6f2774 | 110 | |
28734864 | 111 | %ninja_install -C build |
d65eee9f | 112 | |
5657a9ed JB |
113 | %if %{with apidocs} |
114 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} | |
115 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/gtkhex-4.0 $RPM_BUILD_ROOT%{_gtkdocdir} | |
116 | %endif | |
117 | ||
118 | %find_lang %{name} --with-gnome | |
a21fa5d4 | 119 | |
120 | %clean | |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %post | |
581e2c08 | 124 | %update_icon_cache hicolor |
dc45796a | 125 | %glib_compile_schemas |
a21fa5d4 | 126 | |
25545d6f | 127 | %postun |
581e2c08 | 128 | %update_icon_cache hicolor |
dc45796a | 129 | %glib_compile_schemas |
a21fa5d4 | 130 | |
e19885bf JB |
131 | %post libs -p /sbin/ldconfig |
132 | %postun libs -p /sbin/ldconfig | |
d65eee9f | 133 | |
a21fa5d4 | 134 | %files -f %{name}.lang |
135 | %defattr(644,root,root,755) | |
e9d645e0 | 136 | %doc NEWS README.md |
dc45796a | 137 | %attr(755,root,root) %{_bindir}/ghex |
5657a9ed JB |
138 | %dir %{_libdir}/gtkhex-4.0 |
139 | %attr(755,root,root) %{_libdir}/gtkhex-4.0/libhex-buffer-mmap.so | |
dc45796a | 140 | %{_datadir}/glib-2.0/schemas/org.gnome.GHex.gschema.xml |
28734864 JB |
141 | %{_datadir}/metainfo/org.gnome.GHex.appdata.xml |
142 | %{_desktopdir}/org.gnome.GHex.desktop | |
e9d645e0 JB |
143 | %{_iconsdir}/hicolor/scalable/apps/org.gnome.GHex.svg |
144 | %{_iconsdir}/hicolor/scalable/apps/org.gnome.GHex.Devel.svg | |
145 | %{_iconsdir}/hicolor/symbolic/apps/org.gnome.GHex-symbolic.svg | |
d65eee9f MB |
146 | |
147 | %files libs | |
148 | %defattr(644,root,root,755) | |
5657a9ed JB |
149 | %attr(755,root,root) %{_libdir}/libgtkhex-4.so.*.*.* |
150 | %attr(755,root,root) %ghost %{_libdir}/libgtkhex-4.so.0 | |
151 | %{_libdir}/girepository-1.0/Hex-4.typelib | |
d3ef15ab | 152 | |
153 | %files devel | |
154 | %defattr(644,root,root,755) | |
5657a9ed JB |
155 | %attr(755,root,root) %{_libdir}/libgtkhex-4.so |
156 | %{_includedir}/gtkhex-4 | |
157 | %{_datadir}/gir-1.0/Hex-4.gir | |
158 | %{_pkgconfigdir}/gtkhex-4.pc | |
d3ef15ab | 159 | |
160 | %files static | |
161 | %defattr(644,root,root,755) | |
5657a9ed JB |
162 | %{_libdir}/libgtkhex-4.a |
163 | ||
164 | %if %{with apidocs} | |
165 | %files apidocs | |
166 | %defattr(644,root,root,755) | |
167 | %{_gtkdocdir}/gtkhex-4.0 | |
168 | %endif |