]>
Commit | Line | Data |
---|---|---|
9e293e57 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_without static_libs # static library | |
397c0815 | 5 | %bcond_without tests # tests (with umockdev) |
9e293e57 JB |
6 | # |
7 | Summary: GObject bindings for libudev | |
8 | Summary(pl.UTF-8): Wiązania GObject do libudev | |
9 | Name: libgudev | |
397c0815 | 10 | Version: 231 |
9e293e57 JB |
11 | Release: 1 |
12 | License: LGPL v2.1+ | |
13 | Group: Libraries | |
14 | Source0: http://ftp.gnome.org/pub/GNOME/sources/libgudev/%{version}/%{name}-%{version}.tar.xz | |
397c0815 JB |
15 | # Source0-md5: 916c10c51ec61131e244c3936bbb2e0c |
16 | Patch0: %{name}-tests.patch | |
9e293e57 | 17 | URL: https://wiki.gnome.org/Projects/libgudev |
c308d91e JB |
18 | BuildRequires: autoconf >= 2.64 |
19 | BuildRequires: automake >= 1:1.11 | |
397c0815 | 20 | BuildRequires: glib2-devel >= 1:2.30.0 |
9e293e57 JB |
21 | BuildRequires: gobject-introspection-devel >= 1.31.1 |
22 | BuildRequires: gtk-doc >= 1.18 | |
c308d91e | 23 | BuildRequires: libtool >= 2:2.2 |
9e293e57 JB |
24 | BuildRequires: pkgconfig |
25 | BuildRequires: tar >= 1:1.22 | |
26 | BuildRequires: udev-devel >= 1:199 | |
397c0815 | 27 | %{?with_tests:BuildRequires: umockdev-devel} |
9e293e57 | 28 | BuildRequires: xz |
397c0815 | 29 | Requires: glib2 >= 1:2.30.0 |
9e293e57 JB |
30 | Requires: udev-libs >= 1:199 |
31 | Provides: udev-glib = 1:%{version}-%{release} | |
32 | Obsoletes: udev-glib < 1:230 | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | The libgudev library provides GObject bindings for libudev. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Biblioteka libgudev dostarcza wiązania GObject do biblioteki libudev. | |
40 | ||
41 | %package devel | |
42 | Summary: Header files for libgudev library | |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgudev | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
397c0815 | 46 | Requires: glib2-devel >= 1:2.30.0 |
9e293e57 JB |
47 | Requires: udev-devel >= 1:199 |
48 | Provides: udev-glib-devel = 1:%{version}-%{release} | |
49 | Obsoletes: udev-glib-devel < 1:230 | |
50 | ||
51 | %description devel | |
52 | Header files for libgudev library. | |
53 | ||
54 | %description devel -l pl.UTF-8 | |
55 | Pliki nagłówkowe biblioteki libgudev. | |
56 | ||
57 | %package static | |
58 | Summary: Static libgudev library | |
59 | Summary(pl.UTF-8): Statyczna biblioteka libgudev | |
60 | Group: Development/Libraries | |
61 | Requires: %{name}-devel = %{version}-%{release} | |
62 | Provides: udev-glib-static = 1:%{version}-%{release} | |
63 | Obsoletes: udev-glib-static < 1:230 | |
64 | ||
65 | %description static | |
66 | Static libgudev library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka libgudev. | |
70 | ||
71 | %package apidocs | |
72 | Summary: libgudev API documentation | |
73 | Summary(pl.UTF-8): Dokumentacja API biblioteki libgudev | |
74 | Group: Documentation | |
75 | Requires: gtk-doc-common | |
76 | Obsoletes: udev-glib-apidocs < 1:230 | |
77 | %if "%{_rpmversion}" >= "5" | |
78 | BuildArch: noarch | |
79 | %endif | |
80 | ||
81 | %description apidocs | |
82 | API documentation for libgudev library. | |
83 | ||
84 | %description apidocs -l pl.UTF-8 | |
85 | Dokumentacja API biblioteki libgudev. | |
86 | ||
87 | %prep | |
88 | %setup -q | |
397c0815 | 89 | %patch0 -p1 |
9e293e57 JB |
90 | |
91 | %build | |
92 | # rebuild ac/am/lt for as-needed to work | |
93 | %{__libtoolize} | |
94 | %{__aclocal} -I m4 | |
95 | %{__autoconf} | |
96 | %{__autoheader} | |
97 | %{__automake} | |
98 | %configure \ | |
99 | %{?with_apidocs:--enable-gtk-doc} \ | |
100 | --disable-silent-rules \ | |
101 | %{?with_static_libs:--enable-static} \ | |
397c0815 | 102 | %{!?with_tests:--disable-umockdev} \ |
9e293e57 JB |
103 | --with-html-dir=%{_gtkdocdir} |
104 | %{__make} | |
105 | ||
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %{__make} install \ | |
110 | DESTDIR=$RPM_BUILD_ROOT | |
111 | ||
112 | # obsoleted by pkg-config | |
113 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgudev-1.0.la | |
114 | ||
115 | %clean | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %post -p /sbin/ldconfig | |
119 | %postun -p /sbin/ldconfig | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
123 | %doc NEWS README | |
124 | %attr(755,root,root) %{_libdir}/libgudev-1.0.so.*.*.* | |
125 | %attr(755,root,root) %ghost %{_libdir}/libgudev-1.0.so.0 | |
126 | %{_libdir}/girepository-1.0/GUdev-1.0.typelib | |
127 | ||
128 | %files devel | |
129 | %defattr(644,root,root,755) | |
130 | %attr(755,root,root) %{_libdir}/libgudev-1.0.so | |
131 | %{_includedir}/gudev-1.0 | |
132 | %{_datadir}/gir-1.0/GUdev-1.0.gir | |
133 | %{_pkgconfigdir}/gudev-1.0.pc | |
134 | ||
135 | %if %{with static_libs} | |
136 | %files static | |
137 | %defattr(644,root,root,755) | |
138 | %{_libdir}/libgudev-1.0.a | |
139 | %endif | |
140 | ||
141 | %if %{with apidocs} | |
142 | %files apidocs | |
143 | %defattr(644,root,root,755) | |
144 | %{_gtkdocdir}/gudev | |
145 | %endif |