]> git.pld-linux.org Git - packages/libplist.git/blob - libplist.spec
- python- R: base
[packages/libplist.git] / libplist.spec
1 #
2 # Conditional build:
3 %bcond_without  swig    # build with Swig
4 %bcond_without  cython  # build with Cython
5
6 Summary:        Library for manipulating Apple Property Lists
7 Summary(pl.UTF-8):      Biblioteka do manipulowania Apple Property Lists
8 Name:           libplist
9 Version:        1.8
10 Release:        3
11 License:        LGPL v2+
12 Group:          Libraries
13 #Source0-Download: http://www.libimobiledevice.org/
14 Source0:        http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
15 # Source0-md5:  2a9e0258847d50f9760dc3ece25f4dc6
16 URL:            http://www.libimobiledevice.org/
17 BuildRequires:  cmake >= 2.8.2-2
18 BuildRequires:  glib2-devel >= 1:2.14.1
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  libxml2-devel >= 1:2.6.30
21 BuildRequires:  pkgconfig
22 %{?with_cython:BuildRequires:   python-Cython}
23 BuildRequires:  python-devel
24 BuildRequires:  python-modules
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.600
27 %{?with_swig:BuildRequires:     swig-python}
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
56 Requires:       %{name} = %{version}-%{release}
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 \
71         -DENABLE_SWIG=%{!?with_swig:NO}%{?with_swig:YES} \
72         -DENABLE_CYTHON=%{!?with_cython:NO}%{?with_cython:YES} \
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
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
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)
103 %doc AUTHORS NEWS README
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
118 %if %{with cython} || %{with swig}
119 %files -n python-plist
120 %defattr(644,root,root,755)
121 %if %{with cython}
122 %attr(755,root,root) %{py_sitedir}/plist.so
123 %endif
124 %if %{with swig}
125 %dir %{py_sitedir}/plist
126 %attr(755,root,root) %{py_sitedir}/plist/_plist.so
127 %{py_sitedir}/plist/*.py[co]
128 %endif
129 %endif
This page took 0.091897 seconds and 3 git commands to generate.