]> git.pld-linux.org Git - packages/libcomps.git/blob - libcomps.spec
8b1ecd3b5a28029644331c5c511eb0fb660c32aa
[packages/libcomps.git] / libcomps.spec
1 #
2 # TODO
3 # - fix missing -lm
4 # - convince upstream to fix SONAME: libcomps.so.0.1.6
5 #
6 # Conditional build:
7 %bcond_without  doc     # don't build (doxygen and sphinx) docs
8
9 Summary:        Comps XML file manipulation library
10 Summary(pl.UTF-8):      Biblioteka operacji na plikach Comps XML
11 Name:           libcomps
12 Version:        0.1.18
13 Release:        1
14 License:        GPL v2+
15 Group:          Libraries
16 #Source0Download: https://github.com/rpm-software-management/libcomps/releases
17 Source0:        https://github.com/rpm-software-management/libcomps/archive/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5:  68cba4a88933667cb6c2c1f496ad014d
19 Patch0:         %{name}-build.patch
20 URL:            https://github.com/rpm-software-management/libcomps
21 BuildRequires:  check-devel
22 BuildRequires:  cmake >= 2.6
23 %{?with_doc:BuildRequires:      doxygen}
24 BuildRequires:  expat-devel >= 1.95
25 BuildRequires:  libxml2-devel >= 2.0
26 BuildRequires:  python3-devel
27 BuildRequires:  python3-modules
28 %{?with_doc:BuildRequires:      sphinx-pdg}
29 BuildRequires:  rpm-pythonprov
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Libcomps is library for structure-like manipulation with content of
34 comps XML files. Supports read/write XML file, structure(s)
35 modification.
36
37 %description -l pl.UTF-8
38 Libcomps to bibliotek do operacji strukturalnych na treści plików
39 comps XML. Obsługiwany jest odczyt i zapis pliku XML oraz modyfikacja
40 struktury.
41
42 %package devel
43 Summary:        Development files for libcomps library
44 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libcomps
45 Group:          Development/Libraries
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       expat-devel >= 1.95
48 Requires:       libxml2-devel >= 2.0
49
50 %description devel
51 Development files for libcomps library
52
53 %description devel -l pl.UTF-8
54 Pliki programistyczne biblioteki libcomps.
55
56 %package -n python3-libcomps
57 Summary:        Python 3.x bindings for libcomps library
58 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki libcomps
59 Group:          Libraries/Python
60 Requires:       %{name} = %{version}-%{release}
61
62 %description -n python3-libcomps
63 Python 3.x bindings for libcomps library.
64
65 %description -n python3-libcomps -l pl.UTF-8
66 Wiązania Pythona 3.x do biblioteki libcomps.
67
68 %prep
69 %setup -q
70 %patch0 -p1
71
72 %build
73 install -d build
74 cd build
75 %cmake ../libcomps \
76         -DENABLE_TESTS:BOOL=NO
77
78 %{__make}
79 %{__make} pydocs
80 %if %{with tests}
81 %{__make} test
82 %endif
83
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %{__make} -C build install \
89         DESTDIR=$RPM_BUILD_ROOT
90
91 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
92 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
93
94 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
95 %{__sed} -e 's,^prefix=.*,prefix=%{_prefix},' \
96         -e 's,@LIB_SUFFIX@,%{_lib},' \
97         -e 's,@VERSION@,%{version},' \
98         libcomps.pc.in > $RPM_BUILD_ROOT%{_pkgconfigdir}/libcomps.pc
99
100 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post   -p /sbin/ldconfig
106 %postun -p /sbin/ldconfig
107
108 %files
109 %defattr(644,root,root,755)
110 %doc README.md COPYING
111 %attr(755,root,root) %{_libdir}/libcomps.so.0
112
113 %files devel
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_libdir}/libcomps.so
116 %{_includedir}/libcomps
117 %{_pkgconfigdir}/libcomps.pc
118
119 %files -n python3-libcomps
120 %doc build/src/python/docs/html/{*.html,*.js,_static}
121 %defattr(644,root,root,755)
122 %dir %{py3_sitedir}/libcomps
123 %{py3_sitedir}/libcomps/__init__.py
124 %attr(755,root,root) %{py3_sitedir}/libcomps/_libpycomps.so
125 %{py3_sitedir}/libcomps/__pycache__
126 %{py3_sitedir}/libcomps-*-py*.egg-info
This page took 0.091034 seconds and 2 git commands to generate.