forked from fedora-modularity/libmodulemd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibmodulemd.spec.in
177 lines (125 loc) · 4.18 KB
/
libmodulemd.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
%global libmodulemd_version @VERSION@
%global libmodulemd_v1_version @V1_VERSION@
Name: libmodulemd
Version: %{libmodulemd_version}
Release: 0%{?dist}.@DATETIME@
Summary: Module metadata manipulation library
License: MIT
URL: https://github.com/fedora-modularity/libmodulemd
Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}.tar.xz
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: pkgconfig(gtk-doc)
BuildRequires: python3-devel
BuildRequires: python3-gobject-base
BuildRequires: valgrind
Obsoletes: python2-modulemd < 1.3.4
# Make sure we upgrade libmodulemd1 to match
Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release}
# Patches
%description
C Library for manipulating module metadata files.
See https://github.com/fedora-modularity/libmodulemd/blob/master/README.md for
more details.
%package -n python3-%{name}
Summary: Python 3 bindings for %{name}
BuildArch: noarch
Requires: libmodulemd = %{version}-%{release}
Requires: python3-gobject-base
Obsoletes: python3-modulemd < 1.3.4
%description -n python3-%{name}
Python 3 bindings for %{name}
%package devel
Summary: Development files for libmodulemd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for libmodulemd.
%package -n libmodulemd1
Summary: Compatibility package for libmodulemd 1.x
Version: %{libmodulemd_v1_version}
Obsoletes: libmodulemd < 2
Provides: libmodulemd = %{libmodulemd_v1_version}-%{release}
Provides: libmodulemd%{?_isa} = %{libmodulemd_v1_version}-%{release}
%description -n libmodulemd1
Compatibility library for libmodulemd 1.x
%package -n libmodulemd1-devel
Summary: Compatibility development package for libmodulemd 1.x
Version: %{libmodulemd_v1_version}
Requires: libmodulemd1%{?_isa} = %{libmodulemd_v1_version}-%{release}
Conflicts: %{name}-devel
Obsoletes: libmodulemd-devel < 2
Provides: libmodulemd-devel = %{libmodulemd_v1_version}-%{release}
RemovePathPostfixes: .compat
%description -n libmodulemd1-devel
Development files for libmodulemd 1.x
%package -n python3-libmodulemd1
Summary: Python 3 bindings for %{name}1
Version: %{libmodulemd_v1_version}
BuildArch: noarch
Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release}
Requires: python3-gobject-base
%description -n python3-libmodulemd1
Python 3 bindings for libmodulemd1
%prep
%autosetup -p1 -n modulemd-%{libmodulemd_version}
%build
%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true
%if 0%{?rhel} <= 7
# ALERT!!! PURE HACK FOR EPEL!
# https://bugzilla.redhat.com/show_bug.cgi?id=1546757
sed -r -i -e "/g-ir-scanner/s/-l(gobject-2.0|glib-2.0|yaml)//g" %{_vpath_builddir}/build.ninja
%endif
%meson_build
%check
export LC_CTYPE=C.utf8
%ifarch %{power64}
# Valgrind is broken on ppc64[le] with GCC7:
# https://bugs.kde.org/show_bug.cgi?id=386945
export MMD_SKIP_VALGRIND=1
%endif
%meson_test
%install
%meson_install
ln -s libmodulemd.so.%{libmodulemd_v1_version} \
%{buildroot}%{_libdir}/%{name}.so.compat
%files
%license COPYING
%doc README.md
%{_bindir}/modulemd-validator
%{_libdir}/%{name}.so.2*
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Modulemd-2.0.typelib
%{python3_sitearch}/gi/overrides/
%files devel
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/modulemd-2.0.pc
%{_includedir}/modulemd-2.0/
%dir %{_datadir}/gir-1.0
%{_datadir}/gir-1.0/Modulemd-2.0.gir
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/modulemd-2.0/
%files -n python3-%{name}
%files -n python3-libmodulemd1
%files -n libmodulemd1
%license COPYING
%doc README.md
%{_bindir}/modulemd-validator-v1
%{_libdir}/%{name}.so.1*
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Modulemd-1.0.typelib
%files -n libmodulemd1-devel
%{_libdir}/%{name}.so.compat
%{_libdir}/pkgconfig/modulemd.pc
%{_includedir}/modulemd/
%dir %{_datadir}/gir-1.0
%{_datadir}/gir-1.0/Modulemd-1.0.gir
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/modulemd-1.0/
%changelog