]> git.pld-linux.org Git - packages/libgpod.git/blob - libgpod.spec
add bcond for python; group bcond BRs
[packages/libgpod.git] / libgpod.spec
1 # TODO
2 # check: http://fred.uwcs.co.uk/diff (from http://www.fredemmott.co.uk/blog_121)
3 # some warning at doc build:
4 #warning: failed to load external entity "../../docs/reference/xml/*.xml"
5 #unable to parse ../../docs/reference/xml/*.xml
6 #make[3]: [gpod_doc.i] Error 6 (ignored)
7 # - mountdir perms?: %dir %{_localstatedir}/run/%{name}
8 #
9 # Conditional build:
10 %bcond_without  dotnet  # without .NET support
11 %bcond_without  python  # without Python bindings
12
13 %ifarch x32
14 %undefine       with_dotnet
15 %endif
16
17 %{?with_dotnet:%include /usr/lib/rpm/macros.mono}
18 Summary:        Shared library to access the contents of an iPod
19 Summary(pl.UTF-8):      Biblioteka współdzielona do dostępu do zawartości iPodów
20 Name:           libgpod
21 Version:        0.8.3
22 Release:        0.1
23 License:        GPL v2
24 Group:          Libraries
25 Source0:        http://downloads.sourceforge.net/gtkpod/%{name}-%{version}.tar.bz2
26 # Source0-md5:  f8a0b7a34e768e33a708e8dd172bd6f8
27 Source1:        %{name}.tmpfiles
28 Patch0:         %{name}-gcc43.patch
29 Patch1:         %{name}-monodir.patch
30 URL:            http://www.gtkpod.org/libgpod/
31 BuildRequires:  autoconf >= 2.52
32 BuildRequires:  automake
33 BuildRequires:  docbook-dtd412-xml
34 BuildRequires:  gdk-pixbuf2-devel >= 2.6.0
35 BuildRequires:  gettext-tools
36 BuildRequires:  glib2-devel >= 1:2.16.0
37 BuildRequires:  gtk-doc >= 1.0
38 BuildRequires:  intltool >= 0.35
39 BuildRequires:  libimobiledevice-devel >= 1.1.5
40 BuildRequires:  libplist-devel >= 1.0.0
41 BuildRequires:  libsmbios-devel
42 BuildRequires:  libtool
43 BuildRequires:  libusb-devel
44 BuildRequires:  libxml2-devel
45 BuildRequires:  pkgconfig
46 BuildRequires:  rpmbuild(macros) >= 1.647
47 BuildRequires:  sg3_utils-devel >= 1.26
48 BuildRequires:  sqlite3-devel
49 BuildRequires:  zlib-devel
50 # for noinst test only
51 #BuildRequires: taglib-devel
52 %if %{with dotnet}
53 BuildRequires:  dotnet-gtk-sharp2-devel >= 2.12.0
54 BuildRequires:  mono-devel >= 1.9.1
55 BuildRequires:  rpmbuild(monoautodeps)
56 %endif
57 %if %{with python}
58 BuildRequires:  python-devel >= 2.1.1
59 BuildRequires:  python-eyeD3 >= 0.6.6
60 BuildRequires:  python-mutagen >= 1.8
61 BuildRequires:  python-pygobject-devel >= 2.8.0
62 BuildRequires:  rpm-pythonprov
63 BuildRequires:  swig-python >= 1.3.24
64 %endif
65 Suggests:       udev-libgpod = %{version}-%{release}
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %description
69 libgpod is a library meant to abstract access to an iPod content. It
70 provides an easy to use API to retrieve the list of files and playlist
71 stored on an iPod, to modify them and to save them back to the iPod.
72
73 %description -l pl.UTF-8
74 libgpod to biblioteka mająca na celu wyabstrahowanie dostępu do
75 zawartości iPodów. Udostępnia łatwe w użyciu API do pobierania listy
76 plików i playlist zapisanych na iPodzie, modyfikowania ich i
77 zapisywania z powrotem na iPoda.
78
79 %package -n udev-libgpod
80 Summary:        UDEV rules and programs for iPod devices
81 Summary(pl.UTF-8):      Reguły i programy używane przez UDEV dla urządzeń iPod
82 Group:          Applications/System
83 Requires:       %{name} = %{version}-%{release}
84 Obsoletes:      hal-libgpod
85
86 %description -n udev-libgpod
87 UDEV rules and programs to initialize iPod devices for libgpod
88 library.
89
90 %description -n udev-libgpod -l pl.UTF-8
91 Reguły i program dla UDEV do przygotowywania urządzeń iPod do użytku z
92 biblioteką libgpod.
93
94 %package devel
95 Summary:        Header files for libgpod library
96 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libgpod
97 Group:          Development/Libraries
98 Requires:       %{name} = %{version}-%{release}
99 Requires:       gdk-pixbuf2-devel >= 2.6.0
100 Requires:       glib2-devel >= 1:2.16.0
101
102 %description devel
103 This is the package containing the header files for libgpod library.
104
105 %description devel -l pl.UTF-8
106 Ten pakiet zawiera pliki nagłówkowe biblioteki libgpod.
107
108 %package static
109 Summary:        Static libgpod library
110 Summary(pl.UTF-8):      Statyczna biblioteka libgpod
111 Group:          Development/Libraries
112 Requires:       %{name}-devel = %{version}-%{release}
113
114 %description static
115 Static libgpod library.
116
117 %description static -l pl.UTF-8
118 Statyczna biblioteka libgpod.
119
120 %package apidocs
121 Summary:        libgpod API documentation
122 Summary(pl.UTF-8):      Dokumentacja API biblioteki libgpod
123 Group:          Documentation
124 Requires:       gtk-doc-common
125
126 %description apidocs
127 libgpod API documentation.
128
129 %description apidocs -l pl.UTF-8
130 Dokumentacja API biblioteki libgpod.
131
132 %package -n python-gpod
133 Summary:        Module for libgpod access from Python
134 Summary(pl.UTF-8):      Moduł Pythona umożliwiający korzystanie z biblioteki libgpod
135 Group:          Development/Languages/Python
136 Requires:       %{name} = %{version}-%{release}
137 Requires:       python-eyeD3 >= 0.6.6
138 Requires:       python-libs
139
140 %description -n python-gpod
141 This is the libgpod Python support package.
142
143 %description -n python-gpod -l pl.UTF-8
144 Moduł umożliwiający korzystanie z biblioteki libgpod z poziomu
145 Pythona.
146
147 %package -n dotnet-%{name}-sharp
148 Summary:        C#/.NET library to access iPod content
149 Summary(pl.UTF-8):      Biblioteka C#/.NET pozwalajaca na dostęp do iPoda
150 Group:          Development/Languages
151 Requires:       %{name} = %{version}-%{release}
152
153 %description -n dotnet-%{name}-sharp
154 C#/.NET library to access iPod content. Provides bindings to the
155 libgpod library.
156
157 %description -n dotnet-%{name}-sharp -l pl.UTF-8
158 Biblioteka C#/.NET pozwalająca na dostęp do iPoda. Udostępnia wiązania
159 do biblioteki libgpod.
160
161 %package -n dotnet-%{name}-sharp-devel
162 Summary:        Development files for libgpod-sharp
163 Summary(pl.UTF-8):      Development files for libgpod-sharp
164 Group:          Development/Languages
165 Requires:       dotnet-%{name}-sharp = %{version}-%{release}
166 Requires:       pkgconfig
167
168 %description -n dotnet-%{name}-sharp-devel
169 C#/.NET library to access iPod content. Provides bindings to the
170 libgpod library.
171
172 This package contains the files required to develop programs that will
173 use dotnet-libgpod-sharp.
174
175 %description -n dotnet-%{name}-sharp-devel -l pl.UTF-8
176 Pliki programistyczne biblioteki C#/.NET libgpod-sharp.
177
178 %prep
179 %setup -q
180 %patch0 -p1
181 %patch1 -p1
182
183 %build
184 %{__gtkdocize}
185 %{__glib_gettextize}
186 %{__intltoolize}
187 %{__libtoolize}
188 %{__aclocal} -I m4
189 %{__autoconf}
190 %{__autoheader}
191 %{__automake}
192 %configure \
193         --disable-silent-rules \
194         --enable-gtk-doc \
195         --enable-mono%{!?with_dotnet:=no} \
196         --with-html-dir=%{_gtkdocdir} \
197         --with-temp-mount-dir=%{_localstatedir}/run/%{name} \
198         --with-python=%{!?with_python:no}%{?with_python:yes} \
199         --without-hal \
200         --enable-udev
201
202 %{__make}
203
204 %install
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
207
208 %{__make} install \
209         DESTDIR=$RPM_BUILD_ROOT
210
211 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgpod.la
212
213 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
214
215 %if %{with python}
216 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gpod/*.la
217 %py_postclean
218 %endif
219
220 %find_lang %{name} --all-name
221
222 %clean
223 rm -rf $RPM_BUILD_ROOT
224
225 %post   -p /sbin/ldconfig
226 %postun -p /sbin/ldconfig
227
228 %files -f %{name}.lang
229 %defattr(644,root,root,755)
230 %doc AUTHORS ChangeLog README
231 %attr(755,root,root) %{_bindir}/ipod-read-sysinfo-extended
232 %attr(755,root,root) %{_libdir}/libgpod.so.*.*.*
233 %attr(755,root,root) %ghost %{_libdir}/libgpod.so.4
234 %dir %{_localstatedir}/run/%{name}
235 %{systemdtmpfilesdir}/%{name}.conf
236
237 %files -n udev-libgpod
238 %defattr(644,root,root,755)
239 %attr(755,root,root) /lib/udev/iphone-set-info
240 %attr(755,root,root) /lib/udev/ipod-set-info
241 /lib/udev/rules.d/90-libgpod.rules
242
243 %files devel
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libgpod.so
246 %{_pkgconfigdir}/libgpod-1.0.pc
247 %{_includedir}/gpod-1.0
248
249 %files static
250 %defattr(644,root,root,755)
251 %{_libdir}/libgpod.a
252
253 %files apidocs
254 %defattr(644,root,root,755)
255 %{_gtkdocdir}/libgpod
256
257 %if %{with python}
258 %files -n python-gpod
259 %defattr(644,root,root,755)
260 %dir %{py_sitedir}/gpod
261 %{py_sitedir}/gpod/*.py[co]
262 %attr(755,root,root) %{py_sitedir}/gpod/_gpod.so
263 %endif
264
265 %if %{with dotnet}
266 %files -n dotnet-%{name}-sharp
267 %defattr(644,root,root,755)
268 %dir %{_prefix}/lib/libgpod
269 %{_prefix}/lib/libgpod/libgpod-sharp-test.exe
270 %{_prefix}/lib/libgpod/libgpod-sharp-test.exe.mdb
271 %{_prefix}/lib/libgpod/libgpod-sharp.dll
272 %{_prefix}/lib/libgpod/libgpod-sharp.dll.config
273 %{_prefix}/lib/libgpod/libgpod-sharp.dll.mdb
274
275 %files -n dotnet-%{name}-sharp-devel
276 %defattr(644,root,root,755)
277 %{_pkgconfigdir}/libgpod-sharp.pc
278 %endif
This page took 0.108166 seconds and 3 git commands to generate.