]>
Commit | Line | Data |
---|---|---|
486cfdf5 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without swig # build with Swig | |
4 | %bcond_without cython # build with Cython | |
5 | ||
7980613e MB |
6 | Summary: Library for manipulating Apple Property Lists |
7 | Summary(pl.UTF-8): Biblioteka do manipulowania Apple Property Lists | |
8 | Name: libplist | |
a0267948 | 9 | Version: 1.8 |
8d2cbeb9 | 10 | Release: 3 |
7980613e MB |
11 | License: LGPL v2+ |
12 | Group: Libraries | |
8d2cbeb9 | 13 | #Source0-Download: http://www.libimobiledevice.org/ |
a0267948 ER |
14 | Source0: http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2 |
15 | # Source0-md5: 2a9e0258847d50f9760dc3ece25f4dc6 | |
4987ce66 | 16 | URL: http://www.libimobiledevice.org/ |
a649e5ba | 17 | BuildRequires: cmake >= 2.8.2-2 |
7980613e | 18 | BuildRequires: glib2-devel >= 1:2.14.1 |
af989959 | 19 | BuildRequires: libstdc++-devel |
7980613e MB |
20 | BuildRequires: libxml2-devel >= 1:2.6.30 |
21 | BuildRequires: pkgconfig | |
486cfdf5 | 22 | %{?with_cython:BuildRequires: python-Cython} |
7980613e | 23 | BuildRequires: python-devel |
af989959 | 24 | BuildRequires: python-modules |
25 | BuildRequires: rpm-pythonprov | |
486cfdf5 ER |
26 | BuildRequires: rpmbuild(macros) >= 1.600 |
27 | %{?with_swig:BuildRequires: swig-python} | |
7980613e MB |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | Library for manipulating Apple Property Lists in binary and XML | |
32 | format. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Biblioteka do manipulowania Apple Property Lists w formacie binarnym i | |
36 | XML. | |
37 | ||
38 | %package devel | |
39 | Summary: Header files for libplist library | |
40 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libplist | |
41 | Group: Development/Libraries | |
42 | Requires: %{name} = %{version}-%{release} | |
43 | Requires: glib2-devel >= 1:2.14.1 | |
44 | Requires: libxml2-devel >= 1:2.6.30 | |
45 | ||
46 | %description devel | |
47 | Header files for libplist library. | |
48 | ||
49 | %description devel -l pl.UTF-8 | |
50 | Pliki nagłówkowe biblioteki libplist. | |
51 | ||
52 | %package -n python-plist | |
53 | Summary: libplist Python bindings | |
54 | Summary(pl.UTF-8): Wiązania libplist dla Pythona | |
55 | Group: Development/Languages/Python | |
8d2cbeb9 | 56 | Requires: %{name} = %{version}-%{release} |
7980613e MB |
57 | |
58 | %description -n python-plist | |
59 | libplist Python bindings. | |
60 | ||
61 | %description -n python-plist -l pl.UTF-8 | |
62 | Wiązania libplist dla Pythona. | |
63 | ||
64 | %prep | |
65 | %setup -q | |
66 | ||
67 | %build | |
68 | install -d build | |
69 | cd build | |
70 | %cmake \ | |
486cfdf5 ER |
71 | -DENABLE_SWIG=%{!?with_swig:NO}%{?with_swig:YES} \ |
72 | -DENABLE_CYTHON=%{!?with_cython:NO}%{?with_cython:YES} \ | |
7980613e MB |
73 | ../ |
74 | ||
75 | %{__make} | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %{__make} -C build install \ | |
81 | DESTDIR=$RPM_BUILD_ROOT | |
82 | ||
83 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
84 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
85 | %py_postclean | |
86 | ||
486cfdf5 ER |
87 | # cmake sucks, fix perms |
88 | %if %{with cython} | |
89 | chmod a+x $RPM_BUILD_ROOT%{py_sitedir}/plist.so | |
90 | %endif | |
91 | %if %{with swig} | |
92 | chmod a+x $RPM_BUILD_ROOT%{py_sitedir}/plist/_plist.so | |
93 | %endif | |
94 | ||
7980613e MB |
95 | %clean |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %post -p /sbin/ldconfig | |
99 | %postun -p /sbin/ldconfig | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
8d2cbeb9 | 103 | %doc AUTHORS NEWS README |
7980613e MB |
104 | %attr(755,root,root) %{_bindir}/plutil* |
105 | %attr(755,root,root) %{_libdir}/libplist++.so.*.*.* | |
106 | %attr(755,root,root) %ghost %{_libdir}/libplist++.so.1 | |
107 | %attr(755,root,root) %{_libdir}/libplist.so.*.*.* | |
108 | %attr(755,root,root) %ghost %{_libdir}/libplist.so.1 | |
109 | ||
110 | %files devel | |
111 | %defattr(644,root,root,755) | |
112 | %attr(755,root,root) %{_libdir}/libplist++.so | |
113 | %attr(755,root,root) %{_libdir}/libplist.so | |
114 | %{_includedir}/plist | |
115 | %{_pkgconfigdir}/libplist++.pc | |
116 | %{_pkgconfigdir}/libplist.pc | |
117 | ||
486cfdf5 | 118 | %if %{with cython} || %{with swig} |
7980613e MB |
119 | %files -n python-plist |
120 | %defattr(644,root,root,755) | |
486cfdf5 ER |
121 | %if %{with cython} |
122 | %attr(755,root,root) %{py_sitedir}/plist.so | |
123 | %endif | |
124 | %if %{with swig} | |
7980613e MB |
125 | %dir %{py_sitedir}/plist |
126 | %attr(755,root,root) %{py_sitedir}/plist/_plist.so | |
127 | %{py_sitedir}/plist/*.py[co] | |
486cfdf5 ER |
128 | %endif |
129 | %endif |