]>
Commit | Line | Data |
---|---|---|
16060b92 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API docs | |
4 | %bcond_without static_libs # static library | |
5 | %bcond_without vala # Vala binding | |
bb035b74 | 6 | |
16060b92 JB |
7 | Summary: Cabinet file library |
8 | Summary(pl.UTF-8): Biblioteka obsługi plików cabinet | |
9 | Name: gcab | |
f4f68e75 JB |
10 | Version: 1.6 |
11 | Release: 1 | |
16060b92 JB |
12 | License: LGPL v2.1+ |
13 | Group: Libraries | |
f4f68e75 JB |
14 | Source0: https://download.gnome.org/sources/gcab/1.6/%{name}-%{version}.tar.xz |
15 | # Source0-md5: 13795d44b27c6b84107a83315edcfb01 | |
b1356fe6 | 16 | URL: https://gitlab.gnome.org/GNOME/gcab |
78c564a4 | 17 | BuildRequires: gcc >= 5:3.2 |
fdc291a4 | 18 | BuildRequires: gettext-tools |
f338627f | 19 | BuildRequires: glib2-devel >= 1:2.62.0 |
16060b92 JB |
20 | BuildRequires: gobject-introspection-devel >= 0.9.4 |
21 | BuildRequires: gtk-doc >= 1.14 | |
edcbefdf JB |
22 | BuildRequires: meson >= 0.50.0 |
23 | BuildRequires: ninja >= 1.5 | |
16060b92 | 24 | BuildRequires: pkgconfig |
f573b9c1 | 25 | BuildRequires: rpm-build >= 4.6 |
edcbefdf | 26 | BuildRequires: rpmbuild(macros) >= 1.736 |
78c564a4 | 27 | BuildRequires: sed >= 4.0 |
16060b92 JB |
28 | BuildRequires: tar >= 1:1.22 |
29 | %{?with_vala:BuildRequires: vala >= 2:0.14} | |
30 | BuildRequires: xz | |
31 | BuildRequires: zlib-devel | |
f338627f | 32 | Requires: glib2 >= 1:2.62.0 |
16060b92 JB |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
36 | Cabinet file library. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Biblioteka obsługi plików cabinet. | |
40 | ||
41 | %package devel | |
42 | Summary: Header files for gcab library | |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gcab | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
f338627f | 46 | Requires: glib2-devel >= 1:2.62.0 |
16060b92 JB |
47 | |
48 | %description devel | |
49 | Header files for gcab library. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Pliki nagłówkowe biblioteki gcab. | |
53 | ||
54 | %package static | |
55 | Summary: Static gcab library | |
56 | Summary(pl.UTF-8): Statyczna biblioteka gcab | |
57 | Group: Development/Libraries | |
58 | Requires: %{name}-devel = %{version}-%{release} | |
59 | ||
60 | %description static | |
61 | Static gcab library. | |
62 | ||
63 | %description static -l pl.UTF-8 | |
64 | Statyczna biblioteka gcab. | |
65 | ||
66 | %package apidocs | |
67 | Summary: gcab API documentation | |
68 | Summary(pl.UTF-8): Dokumentacja API biblioteki gcab | |
69 | Group: Documentation | |
70 | Requires: gtk-doc-common | |
bb035b74 | 71 | BuildArch: noarch |
16060b92 JB |
72 | |
73 | %description apidocs | |
74 | API documentation for gcab library. | |
75 | ||
76 | %description apidocs -l pl.UTF-8 | |
77 | Dokumentacja API biblioteki gcab. | |
78 | ||
79 | %package -n vala-gcab | |
80 | Summary: Vala API for gcab library | |
81 | Summary(pl.UTF-8): API języka Vala dla biblioteki gcab | |
82 | Group: Development/Libraries | |
83 | Requires: %{name}-devel = %{version}-%{release} | |
84 | Requires: vala >= 2:0.14 | |
f8d50002 | 85 | BuildArch: noarch |
16060b92 JB |
86 | |
87 | %description -n vala-gcab | |
88 | Vala API for gcab library. | |
89 | ||
90 | %description -n vala-gcab -l pl.UTF-8 | |
91 | API języka Vala dla biblioteki gcab. | |
92 | ||
93 | %prep | |
94 | %setup -q | |
95 | ||
f573b9c1 | 96 | %{__sed} -i -e '/^if git\.found/ s/git\.found()/false/' meson.build |
78c564a4 JB |
97 | %if %{with static_libs} |
98 | %{__sed} -i -e 's/shared_library/library/' libgcab/meson.build | |
99 | %endif | |
100 | ||
16060b92 | 101 | %build |
78c564a4 JB |
102 | %meson build |
103 | ||
edcbefdf | 104 | %ninja_build -C build |
16060b92 JB |
105 | |
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
edcbefdf | 109 | %ninja_install -C build |
16060b92 JB |
110 | |
111 | %find_lang %{name} | |
112 | ||
113 | %clean | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %post -p /sbin/ldconfig | |
117 | %postun -p /sbin/ldconfig | |
118 | ||
119 | %files -f %{name}.lang | |
120 | %defattr(644,root,root,755) | |
78c564a4 | 121 | %doc NEWS README.md |
16060b92 JB |
122 | %attr(755,root,root) %{_bindir}/gcab |
123 | %attr(755,root,root) %{_libdir}/libgcab-1.0.so.*.*.* | |
124 | %attr(755,root,root) %ghost %{_libdir}/libgcab-1.0.so.0 | |
125 | %{_libdir}/girepository-1.0/GCab-1.0.typelib | |
126 | %{_mandir}/man1/gcab.1* | |
127 | ||
128 | %files devel | |
129 | %defattr(644,root,root,755) | |
130 | %attr(755,root,root) %{_libdir}/libgcab-1.0.so | |
131 | %{_includedir}/libgcab-1.0 | |
132 | %{_datadir}/gir-1.0/GCab-1.0.gir | |
133 | %{_pkgconfigdir}/libgcab-1.0.pc | |
134 | ||
135 | %if %{with static_libs} | |
136 | %files static | |
137 | %defattr(644,root,root,755) | |
138 | %{_libdir}/libgcab-1.0.a | |
139 | %endif | |
140 | ||
141 | %if %{with apidocs} | |
142 | %files apidocs | |
143 | %defattr(644,root,root,755) | |
144 | %{_gtkdocdir}/gcab | |
145 | %endif | |
146 | ||
147 | %if %{with vala} | |
148 | %files -n vala-gcab | |
149 | %defattr(644,root,root,755) | |
78c564a4 | 150 | %{_datadir}/vala/vapi/libgcab-1.0.deps |
16060b92 JB |
151 | %{_datadir}/vala/vapi/libgcab-1.0.vapi |
152 | %endif |