summaryrefslogtreecommitdiffstats
path: root/libstrophe.spec
blob: 814a7d91519f759f742b3115385f8dd734cc63b6 (plain)
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
178
179
# Commit: Release libstrophe-0.13.1
%global snapdate 20240227
%global commit 4d59a9fe452266d5c0c12b6fe5e6136ad1cea87b
%global shortcommit %(c=%{commit}; echo ${c:0:7})


Name:           libstrophe
Version:        0.13.1
Release:        10^%{snapdate}git%{shortcommit}%{?dist}
Summary:        An XMPP library for C

License:        MIT and GPLv3
URL:            https://strophe.im/%{name}/
Source0:        https://github.com/strophe/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz

BuildRequires:  gcc
BuildRequires:  automake
BuildRequires:  autoconf
BuildRequires:  libtool
BuildRequires:  zlib-devel
# expat or libxml, but no need for both
BuildRequires:  expat-devel
#BuildRequires:  libxml2-devel
BuildRequires:  openssl-devel
# For docs
BuildRequires:  doxygen
BuildRequires:  lcov

%description
libstrophe is a minimal XMPP library written in C. It has almost no
external dependencies, only an XML parsing library (expat or libxml
are both supported). It is designed for both POSIX and Windows
systems.

Commit: %{shortcommit}



%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.



%package        doc
Summary:        Documentation for %{name}
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}

%description    doc
The %{name}-doc package contains HTML documentation for developing
applications that use %{name}.



%prep
%autosetup -n %{name}-%{commit}


%build
autoreconf -i -W all
# expat is the default; use --with-libxml2 to switch
# create a code coverage report: --enable-coverage
%configure --disable-static --enable-coverage
%make_build
# Build HTML documentation
doxygen
make coverage  # results are in coverage/


%install
%make_install
# Removing libstrophe.la generated
rm -f %{buildroot}%{_libdir}/libstrophe.la

# Install examples/ dir shipping binary files generated
mkdir -p %{buildroot}%{_libdir}/%{name}/
cp -a examples/ %{buildroot}%{_libdir}/%{name}/
mv %{buildroot}%{_libdir}/%{name}/examples/.libs %{buildroot}%{_libdir}/%{name}/examples/libs
mv %{buildroot}%{_libdir}/%{name}/examples/.deps %{buildroot}%{_libdir}/%{name}/examples/deps
rm -f %{buildroot}%{_libdir}/%{name}/examples/.dirstamp
rm -f %{buildroot}%{_libdir}/%{name}/examples/deps/.dirstamp

# Install HTML documentation for the doc subpackage
mkdir -p %{buildroot}%{_pkgdocdir}/
cp -a docs/html/ %{buildroot}%{_pkgdocdir}/
cp -a coverage/ %{buildroot}%{_pkgdocdir}/html/


%check
# the tests suite is launched with 'make coverage'
# no need to run it twice



%files
%license LICENSE.txt GPL-LICENSE.txt MIT-LICENSE.txt
%doc README AUTHORS ChangeLog 
%{_libdir}/%{name}.so.*


%files devel
%doc examples/README.md
%{_includedir}/strophe.h
%{_libdir}/%{name}.so
%{_libdir}/%{name}/
%{_libdir}/pkgconfig/%{name}.pc


%files doc
%{_pkgdocdir}/html/



%changelog
* Tue Feb 27 2024 Matthieu Saulnier <fantom@fedoraproject.org> - 0.13.1-10^20240227git4d59a9f
- Update to latest snapshot

* Sun Feb 4 2024 Matthieu Saulnier <fantom@fedoraproject.org> - 0.13.0-10^20240204gitd6d71e9
- Update to latest snapshot
- Add zlib as new BuildRequires

* Fri Dec 1 2023 Matthieu Saulnier <fantom@fedoraproject.org> - 0.12.3-13^20231201gitc5b6026
- Update to latest snapshot

* Thu Aug 10 2023 Matthieu Saulnier <fantom@fedoraproject.org> - 0.12.3-12^20230810git069787d
- Update to latest snapshot
- Remove tests suite from devel subpackage

* Wed Aug 9 2023 Matthieu Saulnier <fantom@fedoraproject.org> - 0.12.3-11^20230809git9eba8e8
- Update to latest snapshot
- Enable code coverage report
- Cleanup %%check section

* Tue Aug 8 2023 Matthieu Saulnier <fantom@fedoraproject.org> - 0.12.3-10^20230808gitf13ea6e
- Bump release to a higher value than stable branches
- Switch to git snapshot

* Wed Aug 2 2023 Matthieu Saulnier <fantom@fedoraproject.org> - 0.12.3-1
- Update to 0.12.3
- Improve file ownership in doc subpackage

* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Fri Aug 26 2022 Matthieu Saulnier <fantom@fedoraproject.org> - 0.12.2-1
- Update to 0.12.2 version

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.10.1-5
- Rebuilt with OpenSSL 3.0.0

* Wed Aug 25 2021 Matthieu Saulnier <fantom@fedoraproject.org> - 0.10.1-4
- Package Review RHBZ#1994501:
  - Remove useless ldconfig scriptlets
  - Fix Requires tag of the doc subpackage

* Thu Aug 19 2021 Matthieu Saulnier <fantom@fedoraproject.org> - 0.10.1-3
- Package Review RHBZ#1994501:
  - Use more %%{name} macro in %%files section

* Tue Aug 17 2021 Matthieu Saulnier <fantom@fedoraproject.org> - 0.10.1-2
- Package Review RHBZ#1994501:
  - Fix Requires tag of the doc subpackage

* Tue Aug 17 2021 Matthieu Saulnier <fantom@fedoraproject.org> - 0.10.1-1
- Initial packaging