]> git.pld-linux.org Git - packages/libcomps.git/blob - libcomps.spec
up to 0.1.20
[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.20
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:  478b2e8d4189eee9480805a76549a795
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 BuildRequires:  rpmbuild(macros) >= 1.742
29 %{?with_doc:BuildRequires:      sphinx-pdg}
30 BuildRequires:  rpm-pythonprov
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Libcomps is library for structure-like manipulation with content of
35 comps XML files. Supports read/write XML file, structure(s)
36 modification.
37
38 %description -l pl.UTF-8
39 Libcomps to bibliotek do operacji strukturalnych na treści plików
40 comps XML. Obsługiwany jest odczyt i zapis pliku XML oraz modyfikacja
41 struktury.
42
43 %package devel
44 Summary:        Development files for libcomps library
45 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libcomps
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48 Requires:       expat-devel >= 1.95
49 Requires:       libxml2-devel >= 2.0
50
51 %description devel
52 Development files for libcomps library
53
54 %description devel -l pl.UTF-8
55 Pliki programistyczne biblioteki libcomps.
56
57 %package -n python3-libcomps
58 Summary:        Python 3.x bindings for libcomps library
59 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki libcomps
60 Group:          Libraries/Python
61 Requires:       %{name} = %{version}-%{release}
62
63 %description -n python3-libcomps
64 Python 3.x bindings for libcomps library.
65
66 %description -n python3-libcomps -l pl.UTF-8
67 Wiązania Pythona 3.x do biblioteki libcomps.
68
69 %prep
70 %setup -q
71 %patch0 -p1
72
73 %build
74 install -d build
75 cd build
76 %cmake ../libcomps \
77         %{cmake_on_off doc ENABLE_DOCS} \
78         -DENABLE_TESTS:BOOL=NO
79
80 %{__make}
81 %{?with_doc:%{__make} pydocs}
82 %if %{with tests}
83 %{__make} test
84 %endif
85
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %{__make} -C build install \
91         DESTDIR=$RPM_BUILD_ROOT
92
93 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
94 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
95
96 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
97 %{__sed} -e 's,^prefix=.*,prefix=%{_prefix},' \
98         -e 's,@LIB_SUFFIX@,%{_lib},' \
99         -e 's,@VERSION@,%{version},' \
100         libcomps.pc.in > $RPM_BUILD_ROOT%{_pkgconfigdir}/libcomps.pc
101
102 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post   -p /sbin/ldconfig
108 %postun -p /sbin/ldconfig
109
110 %files
111 %defattr(644,root,root,755)
112 %doc README.md COPYING
113 %attr(755,root,root) %{_libdir}/libcomps.so.0
114
115 %files devel
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_libdir}/libcomps.so
118 %{_includedir}/libcomps
119 %{_pkgconfigdir}/libcomps.pc
120
121 %files -n python3-libcomps
122 %{?with_doc:%doc build/src/python/docs/html/{*.html,*.js,_static}}
123 %defattr(644,root,root,755)
124 %dir %{py3_sitedir}/libcomps
125 %{py3_sitedir}/libcomps/__init__.py
126 %attr(755,root,root) %{py3_sitedir}/libcomps/_libpycomps.so
127 %{py3_sitedir}/libcomps/__pycache__
128 %{py3_sitedir}/libcomps-*-py*.egg-info
This page took 0.15254 seconds and 3 git commands to generate.