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