]>
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 | |
10 | Version: 0.4 | |
d6f2db5a | 11 | Release: 3 |
16060b92 JB |
12 | License: LGPL v2.1+ |
13 | Group: Libraries | |
14 | Source0: http://ftp.gnome.org/pub/GNOME/sources/gcab/0.4/%{name}-%{version}.tar.xz | |
15 | # Source0-md5: 27c9f182bd279bedae3ba2fc5734c651 | |
16 | BuildRequires: gettext-devel | |
17 | BuildRequires: glib2-devel >= 1:2.22.0 | |
18 | BuildRequires: gobject-introspection-devel >= 0.9.4 | |
19 | BuildRequires: gtk-doc >= 1.14 | |
20 | BuildRequires: intltool >= 0.40.0 | |
21 | BuildRequires: pkgconfig | |
22 | BuildRequires: tar >= 1:1.22 | |
23 | %{?with_vala:BuildRequires: vala >= 2:0.14} | |
24 | BuildRequires: xz | |
25 | BuildRequires: zlib-devel | |
26 | Requires: glib2 >= 1:2.22.0 | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | Cabinet file library. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | Biblioteka obsługi plików cabinet. | |
34 | ||
35 | %package devel | |
36 | Summary: Header files for gcab library | |
37 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gcab | |
38 | Group: Development/Libraries | |
39 | Requires: %{name} = %{version}-%{release} | |
40 | Requires: glib2-devel >= 1:2.22.0 | |
41 | ||
42 | %description devel | |
43 | Header files for gcab library. | |
44 | ||
45 | %description devel -l pl.UTF-8 | |
46 | Pliki nagłówkowe biblioteki gcab. | |
47 | ||
48 | %package static | |
49 | Summary: Static gcab library | |
50 | Summary(pl.UTF-8): Statyczna biblioteka gcab | |
51 | Group: Development/Libraries | |
52 | Requires: %{name}-devel = %{version}-%{release} | |
53 | ||
54 | %description static | |
55 | Static gcab library. | |
56 | ||
57 | %description static -l pl.UTF-8 | |
58 | Statyczna biblioteka gcab. | |
59 | ||
60 | %package apidocs | |
61 | Summary: gcab API documentation | |
62 | Summary(pl.UTF-8): Dokumentacja API biblioteki gcab | |
63 | Group: Documentation | |
64 | Requires: gtk-doc-common | |
bb035b74 ER |
65 | %if "%{_rpmversion}" >= "5" |
66 | BuildArch: noarch | |
67 | %endif | |
16060b92 JB |
68 | |
69 | %description apidocs | |
70 | API documentation for gcab library. | |
71 | ||
72 | %description apidocs -l pl.UTF-8 | |
73 | Dokumentacja API biblioteki gcab. | |
74 | ||
75 | %package -n vala-gcab | |
76 | Summary: Vala API for gcab library | |
77 | Summary(pl.UTF-8): API języka Vala dla biblioteki gcab | |
78 | Group: Development/Libraries | |
79 | Requires: %{name}-devel = %{version}-%{release} | |
80 | Requires: vala >= 2:0.14 | |
81 | ||
82 | %description -n vala-gcab | |
83 | Vala API for gcab library. | |
84 | ||
85 | %description -n vala-gcab -l pl.UTF-8 | |
86 | API języka Vala dla biblioteki gcab. | |
87 | ||
88 | %prep | |
89 | %setup -q | |
90 | ||
91 | %build | |
f3f17e67 JB |
92 | # disabling fast install in configure breaks DESTDIR install |
93 | # (libtool tries to relink gcab and fails, leaving temporary script instead of binary) | |
16060b92 JB |
94 | %configure \ |
95 | --disable-silent-rules \ | |
96 | %{!?with_static_libs:--disable-static} \ | |
f3f17e67 | 97 | --enable-fast-install \ |
16060b92 JB |
98 | --with-html-dir=%{_gtkdocdir} |
99 | %{__make} | |
100 | ||
101 | %install | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %{__make} install \ | |
105 | DESTDIR=$RPM_BUILD_ROOT | |
106 | ||
107 | # obsoleted by pkg-config | |
108 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgcab-1.0.la | |
109 | ||
110 | %find_lang %{name} | |
111 | ||
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %post -p /sbin/ldconfig | |
116 | %postun -p /sbin/ldconfig | |
117 | ||
118 | %files -f %{name}.lang | |
119 | %defattr(644,root,root,755) | |
120 | %doc NEWS | |
121 | %attr(755,root,root) %{_bindir}/gcab | |
122 | %attr(755,root,root) %{_libdir}/libgcab-1.0.so.*.*.* | |
123 | %attr(755,root,root) %ghost %{_libdir}/libgcab-1.0.so.0 | |
124 | %{_libdir}/girepository-1.0/GCab-1.0.typelib | |
125 | %{_mandir}/man1/gcab.1* | |
126 | ||
127 | %files devel | |
128 | %defattr(644,root,root,755) | |
129 | %attr(755,root,root) %{_libdir}/libgcab-1.0.so | |
130 | %{_includedir}/libgcab-1.0 | |
131 | %{_datadir}/gir-1.0/GCab-1.0.gir | |
132 | %{_pkgconfigdir}/libgcab-1.0.pc | |
133 | ||
134 | %if %{with static_libs} | |
135 | %files static | |
136 | %defattr(644,root,root,755) | |
137 | %{_libdir}/libgcab-1.0.a | |
138 | %endif | |
139 | ||
140 | %if %{with apidocs} | |
141 | %files apidocs | |
142 | %defattr(644,root,root,755) | |
143 | %{_gtkdocdir}/gcab | |
144 | %endif | |
145 | ||
146 | %if %{with vala} | |
147 | %files -n vala-gcab | |
148 | %defattr(644,root,root,755) | |
149 | %{_datadir}/vala/vapi/libgcab-1.0.vapi | |
150 | %endif |