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