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