]>
Commit | Line | Data |
---|---|---|
ac8ca4ca JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without tests # unit tests | |
6 | # | |
7 | Summary: Module metadata manipulation library | |
8 | Name: libmodulemd | |
9 | Version: 2.12.0 | |
7e23c54e | 10 | Release: 1 |
ac8ca4ca JR |
11 | License: MIT |
12 | Group: Libraries | |
7e23c54e | 13 | Source0: https://github.com/fedora-modularity/libmodulemd/releases/download/libmodulemd-%{version}/modulemd-%{version}.tar.xz |
ac8ca4ca JR |
14 | # Source0-md5: e0b77248ee9d786d6d226492805d2cf2 |
15 | Patch0: no-docs-for-build.patch | |
16 | URL: https://github.com/fedora-modularity/libmodulemd | |
7e23c54e JR |
17 | BuildRequires: glib2-devel |
18 | %{?with_apidocs:BuildRequires: gtk-doc} | |
19 | BuildRequires: libmagic-devel | |
ac8ca4ca JR |
20 | BuildRequires: meson >= 0.47.0 |
21 | BuildRequires: ninja >= 1.5 | |
ac8ca4ca | 22 | BuildRequires: pkgconfig |
7e23c54e JR |
23 | BuildRequires: rpm-devel |
24 | BuildRequires: rpmbuild(macros) >= 1.726 | |
ac8ca4ca | 25 | BuildRequires: yaml-devel |
ac8ca4ca JR |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
29 | C Library for manipulating module metadata files. | |
30 | ||
31 | %package devel | |
32 | Summary: Header files for %{name} library | |
33 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
34 | Group: Development/Libraries | |
35 | Requires: %{name} = %{version}-%{release} | |
36 | ||
37 | %description devel | |
38 | Header files for %{name} library. | |
39 | ||
40 | %description devel -l pl.UTF-8 | |
41 | Pliki nagłówkowe biblioteki %{name}. | |
42 | ||
43 | %package static | |
44 | Summary: Static %{name} library | |
45 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
46 | Group: Development/Libraries | |
47 | Requires: %{name}-devel = %{version}-%{release} | |
48 | ||
49 | %description static | |
50 | Static %{name} library. | |
51 | ||
52 | %description static -l pl.UTF-8 | |
53 | Statyczna biblioteka %{name}. | |
54 | ||
55 | %package apidocs | |
56 | Summary: API documentation for %{name} library | |
57 | Summary(pl.UTF-8): Dokumentacja API biblioteki %{name} | |
58 | Group: Documentation | |
59 | BuildArch: noarch | |
60 | ||
61 | %description apidocs | |
62 | API documentation for %{name} library. | |
63 | ||
64 | %description apidocs -l pl.UTF-8 | |
65 | Dokumentacja API biblioteki %{name}. | |
66 | ||
7e23c54e JR |
67 | %package -n python2-%{name} |
68 | Summary: Python 2 bindings for %{name} | |
69 | Requires: %{name}%{?_isa} = %{version}-%{release} | |
70 | Requires: python-pygobject3 | |
71 | Requires: python-six | |
72 | ||
73 | %description -n python2-%{name} | |
74 | Python 2 bindings for %{name} | |
75 | ||
76 | %package -n python3-%{name} | |
77 | Summary: Python 3 bindings for %{name} | |
78 | Requires: %{name}%{?_isa} = %{version}-%{release} | |
79 | Requires: python3-pygobject3 | |
80 | Requires: python3-six | |
81 | ||
82 | %description -n python3-%{name} | |
83 | Python 3 bindings for %{name} | |
84 | ||
85 | %package validator | |
86 | Summary: Simple modulemd YAML validator | |
87 | Requires: %{name}%{?_isa} = %{version}-%{release} | |
88 | ||
89 | %description validator | |
90 | Simple modulemd YAML validator. | |
91 | ||
ac8ca4ca JR |
92 | %prep |
93 | %setup -q -n modulemd-%{version} | |
94 | %patch0 -p1 | |
95 | ||
96 | %build | |
97 | %meson build \ | |
98 | %if %{with doc} | |
99 | -Dwith_docs=true \ | |
100 | -Dglib_docpath=%{_gtkdocdir} \ | |
101 | %endif | |
102 | %{?with_python2:-Dwith_py2=true} | |
103 | ||
104 | %ninja_build -C build | |
105 | ||
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %ninja_install -C build | |
110 | ||
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %post -p /sbin/ldconfig | |
115 | %postun -p /sbin/ldconfig | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
119 | %doc README.md | |
120 | %attr(755,root,root) %{_libdir}/%{name}.so.*.*.* | |
121 | %ghost %{_libdir}/%{name}.so.2 | |
7e23c54e | 122 | %{_libdir}/girepository-1.0/Modulemd-2.0.typelib |
ac8ca4ca JR |
123 | |
124 | %files devel | |
125 | %defattr(644,root,root,755) | |
126 | %{_libdir}/%{name}.so | |
127 | %{_includedir}/modulemd-2.0 | |
128 | %{_pkgconfigdir}/modulemd-2.0.pc | |
7e23c54e | 129 | %{_datadir}/gir-1.0/Modulemd-2.0.gir |
ac8ca4ca JR |
130 | |
131 | %files static | |
132 | %defattr(644,root,root,755) | |
133 | %{_libdir}/%{name}.a | |
134 | ||
135 | %if %{with apidocs} | |
136 | %files apidocs | |
137 | %defattr(644,root,root,755) | |
138 | %doc %{_gtkdocdir}/modulemd-2.0 | |
139 | %endif | |
7e23c54e JR |
140 | |
141 | %if %{with python2} | |
142 | %files -n python2-%{name} | |
143 | %defattr(644,root,root,755) | |
144 | %{py_sitedir}/gi/overrides/Modulemd.py | |
145 | %endif | |
146 | ||
147 | %files -n python3-%{name} | |
148 | %defattr(644,root,root,755) | |
149 | %{py3_sitedir}/gi/overrides/Modulemd.py | |
150 | ||
151 | %files validator | |
152 | %defattr(644,root,root,755) | |
153 | %attr(755,root,root) %{_bindir}/modulemd-validator | |
154 | %{_mandir}/man1/modulemd-validator.1* |