]> git.pld-linux.org Git - packages/gxml.git/blob - gxml.spec
902da18e5811c0d8edcdeacfdc3902f0fab2c7d9
[packages/gxml.git] / gxml.spec
1 #
2 # Conditional build:
3 %bcond_with     apidocs         # API documentation (no longer supported in autotools build, meson build is broken)
4 %bcond_without  static_libs     # static library
5
6 Summary:        GXml - GObject API that wraps around libxml2
7 Summary(pl.UTF-8):      GXml - API GObject obudowujące libxml2
8 Name:           gxml
9 Version:        0.18.1
10 Release:        1
11 License:        LGPL v2.1+
12 Group:          Libraries
13 Source0:        http://ftp.gnome.org/pub/GNOME/sources/gxml/0.18/%{name}-%{version}.tar.xz
14 # Source0-md5:  a5fce2147184eb55571305858b9f4d03
15 Patch0:         %{name}-normalize.patch
16 URL:            https://github.com/GNOME/gxml
17 BuildRequires:  autoconf >= 2.65
18 BuildRequires:  automake >= 1:1.11
19 BuildRequires:  gettext-tools >= 0.18.1
20 BuildRequires:  glib2-devel >= 1:2.32.0
21 BuildRequires:  gobject-introspection-devel >= 1.32.0
22 BuildRequires:  intltool >= 0.35.0
23 BuildRequires:  libgee-devel >= 0.18.0
24 BuildRequires:  libtool >= 2:2
25 BuildRequires:  libxml2-devel >= 1:2.7
26 BuildRequires:  pkgconfig >= 1:0.21
27 BuildRequires:  sed >= 4.0
28 BuildRequires:  tar >= 1:1.22
29 BuildRequires:  vala >= 2:0.34.7
30 %{?with_apidocs:BuildRequires:  valadoc >= 0.30}
31 BuildRequires:  xz
32 BuildRequires:  yelp-tools
33 Requires:       glib2 >= 1:2.32.0
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 GXml is a GObject API that wraps around libxml2.
38
39 %description -l pl.UTF-8
40 GXml to API GObject obudowujące libxml2.
41
42 %package devel
43 Summary:        Header files for GXml library
44 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki GXml
45 Group:          Development/Libraries
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       glib2-devel >= 1:2.32.0
48 Requires:       libgee-devel >= 0.18.0
49 Requires:       libxml2-devel >= 1:2.7
50
51 %description devel
52 Header files for GXml library.
53
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki GXml.
56
57 %package static
58 Summary:        Static GXml library
59 Summary(pl.UTF-8):      Statyczna biblioteka GXml
60 Group:          Development/Libraries
61 Requires:       %{name}-devel = %{version}-%{release}
62
63 %description static
64 Static GXml library.
65
66 %description static -l pl.UTF-8
67 Statyczna biblioteka GXml.
68
69 %package -n vala-gxml
70 Summary:        Vala API for GXml library
71 Summary(pl.UTF-8):      API języka Vala dla biblioteki GXml
72 Group:          Development/Libraries
73 Requires:       %{name}-devel = %{version}-%{release}
74 Requires:       vala >= 2:0.34.7
75 Requires:       vala-libgee >= 0.18.0
76 %if "%{_rpmversion}" >= "5"
77 BuildArch:      noarch
78 %endif
79
80 %description -n vala-gxml
81 Vala API for GXml library.
82
83 %description -n vala-gxml -l pl.UTF-8
84 API języka Vala dla biblioteki GXml.
85
86 %package apidocs
87 Summary:        API documentation for GXml library
88 Summary(pl.UTF-8):      Dokumentacja API biblioteki GXml
89 Group:          Documentation
90
91 %description apidocs
92 API documentation for GXml library.
93
94 %description apidocs -l pl.UTF-8
95 Dokumentacja API biblioteki GXml.
96
97 %prep
98 %setup -q
99 %patch0 -p1
100
101 %build
102 %if 1
103 %{__intltoolize}
104 %{__libtoolize}
105 %{__aclocal} -I m4
106 %{__autoconf}
107 %{__autoheader}
108 %{__automake}
109 %configure \
110         %{!?with_apidocs:--disable-docs} \
111         --disable-silent-rules \
112         %{?with_static_libs:--enable-static}
113
114 %{__make}
115 %else
116 %meson build \
117         %{?with_apidocs:-Ddocs=true} \
118         -Dintrospection=true
119
120 %ninja_build -C build
121 %endif
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125
126 %if 1
127 %{__make} install \
128         DESTDIR=$RPM_BUILD_ROOT \
129         gxmlgtkdocdir=%{_gtkdocdir}/gxml
130
131 # obsoleted by pkg-config
132 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgxml-0.16.la
133 # packaged as %doc
134 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gxml
135
136 # gtk-doc no longer supported in autotools build
137 ## what a mess... gtk-doc XML intermediate files are installed to html dir...
138 #%{__rm} -r $RPM_BUILD_ROOT%{_gtkdocdir}/gxml/*.{bottom,top,stamp,txt,types,xml}
139 #cp -p docs/valadoc/gtk-doc/gtk-doc/gxml/html/* $RPM_BUILD_ROOT%{_gtkdocdir}/gxml
140 #
141 ## similar to gtk-doc?
142 #%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/devhelp
143 %else
144 %ninja_install -C build
145 %endif
146
147 # "GXml" gettext domain, "gxml" gnome help
148 %find_lang GXml --with-gnome --all-name
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %post   -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
155
156 %files -f GXml.lang
157 %defattr(644,root,root,755)
158 %doc AUTHORS ChangeLog NEWS README
159 %attr(755,root,root) %{_libdir}/libgxml-0.16.so.*.*.*
160 %attr(755,root,root) %ghost %{_libdir}/libgxml-0.16.so.3
161 %{_libdir}/girepository-1.0/GXml-0.16.typelib
162
163 %files devel
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_libdir}/libgxml-0.16.so
166 %{_includedir}/gxml-0.16
167 %{_datadir}/gir-1.0/GXml-0.16.gir
168 %{_pkgconfigdir}/gxml-0.16.pc
169
170 %if %{with static_libs}
171 %files static
172 %defattr(644,root,root,755)
173 %{_libdir}/libgxml-0.16.a
174 %endif
175
176 %files -n vala-gxml
177 %defattr(644,root,root,755)
178 %{_datadir}/vala/vapi/gxml-0.16.deps
179 %{_datadir}/vala/vapi/gxml-0.16.vapi
180
181 %if %{with apidocs}
182 %files apidocs
183 %defattr(644,root,root,755)
184 %{_gtkdocdir}/gxml
185 %endif
This page took 0.051567 seconds and 2 git commands to generate.