]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # todo: | |
3 | # - mono bindings (build crashes on ppc) | |
4 | # | |
5 | # Conditional build: | |
6 | %bcond_without apidocs # disable gtk-doc | |
7 | %bcond_without static_libs # don't build static library | |
8 | # | |
9 | Summary: Bluetooth GObject based library | |
10 | Summary(pl.UTF-8): Biblioteka do programowania urządzeń Bluetooth | |
11 | Name: libbtctl | |
12 | Version: 0.10.0 | |
13 | Release: 4 | |
14 | License: GPL | |
15 | Group: Libraries | |
16 | Source0: http://ftp.gnome.org/pub/GNOME/sources/libbtctl/0.10/%{name}-%{version}.tar.bz2 | |
17 | # Source0-md5: 83d5f90efb2b26d1bd12a668940d02ba | |
18 | Patch0: %{name}-make-jN.patch | |
19 | Patch1: %{name}-newapi.patch | |
20 | URL: http://usefulinc.com/software/gnome-bluetooth/ | |
21 | BuildRequires: autoconf >= 2.52 | |
22 | BuildRequires: automake | |
23 | BuildRequires: bluez-libs-devel >= 2.25 | |
24 | BuildRequires: glib2-devel >= 1:2.12.4 | |
25 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.7} | |
26 | BuildRequires: intltool >= 0.35.0 | |
27 | BuildRequires: libtool | |
28 | BuildRequires: openobex-devel >= 1.2 | |
29 | BuildRequires: pkgconfig | |
30 | BuildRequires: python-devel >= 1:2.3 | |
31 | BuildRequires: python-pygtk-devel >= 2.10.3 | |
32 | BuildRequires: rpm-pythonprov | |
33 | Requires: bluez-libs >= 2.25 | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | This package contains a library to control Bluetooth devices. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Ten pakiet zawiera bibliotekę do kontrolowania urządzeń Bluetooth. | |
41 | ||
42 | %package devel | |
43 | Summary: Header files for libbtctl library | |
44 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libbtctl | |
45 | Group: Development/Libraries | |
46 | Requires: %{name} = %{version}-%{release} | |
47 | Requires: bluez-libs-devel >= 2.25 | |
48 | Requires: glib2-devel >= 1:2.12.4 | |
49 | Requires: openobex-devel >= 1.2 | |
50 | ||
51 | %description devel | |
52 | Header files for libbtctl library. | |
53 | ||
54 | %description devel -l pl.UTF-8 | |
55 | Pliki nagłówkowe biblioteki libbtctl. | |
56 | ||
57 | %package static | |
58 | Summary: Static libbtctl library | |
59 | Summary(pl.UTF-8): Statyczna biblioteka libbtctl | |
60 | Group: Development/Libraries | |
61 | Requires: %{name}-devel = %{version}-%{release} | |
62 | ||
63 | %description static | |
64 | Static libbtctl library. | |
65 | ||
66 | %description static -l pl.UTF-8 | |
67 | Statyczna biblioteka libbtctl. | |
68 | ||
69 | %package -n python-btctl | |
70 | Summary: Python bindings for libbtctl library | |
71 | Summary(pl.UTF-8): Wiązania dla języka Python biblioteki libbtctl | |
72 | Group: Libraries/Python | |
73 | Requires: %{name} = %{version}-%{release} | |
74 | %pyrequires_eq python-libs | |
75 | ||
76 | %description -n python-btctl | |
77 | Static libbtctl library. | |
78 | ||
79 | %description -n python-btctl -l pl.UTF-8 | |
80 | Wiązania dla języka Python biblioteki libbtctl. | |
81 | ||
82 | %package apidocs | |
83 | Summary: libbtctl API documentation | |
84 | Summary(pl.UTF-8): Dokumentacja API libbtctl | |
85 | Group: Documentation | |
86 | Requires: gtk-doc-common | |
87 | ||
88 | %description apidocs | |
89 | libbtctl API documentation. | |
90 | ||
91 | %description apidocs -l pl.UTF-8 | |
92 | Dokumentacja API libbtctl. | |
93 | ||
94 | %prep | |
95 | %setup -q | |
96 | %patch0 -p1 | |
97 | %patch1 -p1 | |
98 | ||
99 | %build | |
100 | %{__libtoolize} | |
101 | %{__aclocal} | |
102 | %{__autoheader} | |
103 | %{__autoconf} | |
104 | %{__automake} | |
105 | %configure \ | |
106 | --disable-mono \ | |
107 | --%{?with_apidocs:en}%{!?with_apidocs:dis}able-gtk-doc \ | |
108 | --with-html-path=%{_gtkdocdir} \ | |
109 | %{!?with_static_libs:--disable-static} | |
110 | %{__make} \ | |
111 | pydir=%{py_sitedir} | |
112 | ||
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %{__make} install \ | |
117 | DESTDIR=$RPM_BUILD_ROOT \ | |
118 | HTML_DIR=%{_gtkdocdir} \ | |
119 | pydir=%{py_sitedir} | |
120 | ||
121 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a} | |
122 | ||
123 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}} | |
124 | ||
125 | %find_lang %{name} | |
126 | ||
127 | %clean | |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %post -p /sbin/ldconfig | |
131 | %postun -p /sbin/ldconfig | |
132 | ||
133 | %files -f %{name}.lang | |
134 | %defattr(644,root,root,755) | |
135 | %doc AUTHORS ChangeLog README | |
136 | %attr(755,root,root) %{_libdir}/libbtctl.so.*.*.* | |
137 | %attr(755,root,root) %ghost %{_libdir}/libbtctl.so.4 | |
138 | ||
139 | %files devel | |
140 | %defattr(644,root,root,755) | |
141 | %attr(755,root,root) %{_libdir}/libbtctl.so | |
142 | %{_libdir}/libbtctl.la | |
143 | %{_includedir}/%{name} | |
144 | %{_pkgconfigdir}/libbtctl.pc | |
145 | ||
146 | %if %{with static_libs} | |
147 | %files static | |
148 | %defattr(644,root,root,755) | |
149 | %{_libdir}/libbtctl.a | |
150 | %endif | |
151 | ||
152 | %files -n python-btctl | |
153 | %defattr(644,root,root,755) | |
154 | %attr(755,root,root) %{py_sitedir}/btctl.so | |
155 | ||
156 | %if %{with apidocs} | |
157 | %files apidocs | |
158 | %defattr(644,root,root,755) | |
159 | %{_gtkdocdir}/libbtctl | |
160 | %endif |