summaryrefslogtreecommitdiffstats
path: root/libmemcached-awesome.spec
blob: b25f3ef37affdb3250deb7de375f4d7a6099984d (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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# remirepo spec file for libmemcached-awesome
#
# Copyright (c) 2009-2022 Remi Collet
# License: CC-BY-SA
# https://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#

%bcond_without               tests

%global libname              libmemcached
%global projname             %{libname}-awesome

# libmemcached >= 1.0.16 have soname 11
%if 0%{?rhel}
%global move_to_opt 1
%global _prefix /opt/%{?vendeur:%{vendeur}/}%{projname}
%global __arch_install_post /bin/true
Name:   %{?vendeur:%{vendeur}-}%{projname}
%else
%global move_to_opt 0
Name:   %{projname}
%endif

%global gh_commit            6e713c39031ff312164cc3ff12f943f8e8e01885
%global gh_short             %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner             awesomized
%global gh_project           libmemcached

%global upstream_version     1.1.3
#global upstream_prever      beta3

Summary:   Client library and command line tools for memcached server
Version:   %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release:   1%{?dist}
# SPDX:
License:   BSD-3-Clause
URL:       https://github.com/%{gh_owner}/%{gh_project}
Source0:   https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz

%if 0%{?rhel} == 7
BuildRequires: cmake3 >= 3.9
%global dtsenable source /opt/rh/devtoolset-9/enable
BuildRequires: devtoolset-9-toolchain
BuildRequires: python-sphinx
%else
BuildRequires: cmake >= 3.9
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: python3-sphinx
%endif
BuildRequires: cyrus-sasl-devel
BuildRequires: flex
BuildRequires: bison
BuildRequires: memcached
BuildRequires: systemtap-sdt-devel
BuildRequires: libevent-devel > 2
BuildRequires: openssl-devel

Provides:      bundled(bobjenkins-hash)
%if ! %{move_to_opt}
# package rename
Obsoletes:     %{libname}-libs         < 1.1
Provides:      %{libname}-libs         = %{version}-%{release}
Provides:      %{libname}-libs%{?_isa} = %{version}-%{release}
%endif


%description
%{projname} is a C/C++ client library and tools for the memcached
server (https://memcached.org/). It has been designed to be light
on memory usage, and provide full access to server side methods.

This is a resurrection of the original work from Brian Aker at libmemcached.org.


%package devel
Summary:    Header files and development libraries for %{name}

Requires:   %{name}%{?_isa} = %{version}-%{release}
Requires:   pkgconfig
Requires:   cyrus-sasl-devel%{?_isa}
%if ! %{move_to_opt}
# package rename
Obsoletes:  %{libname}-devel         < 1.1
Provides:   %{libname}-devel         = %{version}-%{release}
Provides:   %{libname}-devel%{?_isa} = %{version}-%{release}
%endif

%description devel
This package contains the header files and development libraries
for %{name}. If you like to develop programs using %{name}, 
you will need to install %{name}-devel.

Documentation: https://awesomized.github.io/libmemcached


%package tools
Summary:    %{name} tools

Requires:   %{name}%{?_isa} = %{version}-%{release}
%if ! %{move_to_opt}
# package rename
Obsoletes:  %{libname}         < 1.1
Provides:   %{libname}         = %{version}-%{release}
Provides:   %{libname}%{?_isa} = %{version}-%{release}
%endif

%description tools
This package contains the %{projname} command line tools:

memaslap    Load testing and benchmarking a server
memcapable  Checking a Memcached server capibilities and compatibility
memcat      Copy the value of a key to standard output
memcp       Copy data to a server
memdump     Dumping your server
memerror    Translate an error code to a string
memexist    Check for the existance of a key
memflush    Flush the contents of your servers
memparse    Parse an option string
memping     Test to see if a server is available.
memrm       Remove a key(s) from the server
memslap     Generate testing loads on a memcached cluster
memstat     Dump the stats of your servers to standard output
memtouch    Touches a key


%if %{move_to_opt}
# Filter in the /opt installation
%{?filter_from_provides: %filter_from_provides /libhashkit/d;/libmemcached/d}
%{?filter_from_requires: %filter_from_requires /libhashkit/d;/libmemcached/d}
%{?filter_setup}
%endif


%prep
%setup -q -n %{gh_project}-%{gh_commit}

# drop test hanging in mock
# and requiring some memcached build options
if [ "$(id -un)" != "remi" ]; then
rm test/tests/memcached/sasl.cpp
rm test/tests/memcached/regression/lp_001-630-615.cpp
fi


%build
%{?dtsenable}

%if 0%{?rhel} == 7
%cmake3 \
%else
%cmake \
%endif
  -DBUILD_TESTING:BOOL=ON \
  -DBUILD_DOCS_MAN:BOOL=ON \
  -DBUILD_DOCS_MANGZ:BOOL=OFF \
  -DENABLE_SASL:BOOL=ON \
  -DENABLE_DTRACE:BOOL=ON \
  -DENABLE_OPENSSL_CRYPTO:BOOL=ON \
  -DENABLE_HASH_HSIEH:BOOL=ON \
  -DENABLE_HASH_FNV64:BOOL=ON \
  -DENABLE_HASH_MURMUR:BOOL=ON \
  -DENABLE_MEMASLAP:BOOL=ON \
  -S .

%if 0%{?cmake_build:1}
%cmake_build
%else
make %{?_smp_mflags}
%endif


%install
%{?dtsenable}

%if 0%{?cmake_install:1}
%cmake_install
%else
make install DESTDIR=%{buildroot}
%endif

mv %{buildroot}%{_datadir}/%{projname}/example.cnf support

rm -r %{buildroot}%{_datadir}/doc/%{projname}/


%check
%if %{with tests}
: Run test suite
%if 0%{?ctest:1}
%ctest
%else
make test
%endif
%else
: Skip test suite
%endif


%if 0%{?fedora} < 28 && 0%{?rhel} < 8
%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif


%files tools
%if %{move_to_opt}
%dir %{_bindir}
%dir %{_mandir}/man1
%endif
%{_bindir}/mem*
%{_mandir}/man1/mem*

%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
%if %{move_to_opt}
%dir %{_prefix}
%dir %{_datadir}
%dir %{_mandir}
%dir %{_libdir}
%endif
%{_libdir}/libhashkit.so.2*
%{_libdir}/libmemcached.so.11*
%{_libdir}/libmemcachedprotocol.so.0*
%{_libdir}/libmemcachedutil.so.2*

%files devel
%doc example
%doc *.md
%doc AUTHORS
%doc support/example.cnf
%if %{move_to_opt}
%dir %{_includedir}
%dir %{_datadir}/aclocal
%dir %{_mandir}/man3
%dir %{_libdir}/pkgconfig
%dir %{_libdir}/cmake
%endif
%{_includedir}/libmemcached
%{_includedir}/libmemcached-1.0
%{_includedir}/libhashkit
%{_includedir}/libhashkit-1.0
%{_includedir}/libmemcachedprotocol-0.0
%{_includedir}/libmemcachedutil-1.0
%{_libdir}/libhashkit.so
%{_libdir}/libmemcached.so
%{_libdir}/libmemcachedprotocol.so
%{_libdir}/libmemcachedutil.so
%{_libdir}/pkgconfig/libmemcached.pc
%{_libdir}/cmake/%{projname}
%{_datadir}/aclocal/ax_libmemcached.m4
%{_mandir}/man3/libmemcached*
%{_mandir}/man3/libhashkit*
%{_mandir}/man3/memcached*
%{_mandir}/man3/hashkit*


%changelog
* Wed Nov  9 2022 Remi Collet <remi@remirepo.net> - 1.1.3-1
- update to 1.1.3

* Wed Aug 10 2022 Remi Collet <remi@remirepo.net> - 1.1.2-1
- update to 1.1.2

* Fri Nov  5 2021 Remi Collet <remi@remirepo.net> - 1.1.1-2
- EL-9 build

* Mon Sep 20 2021 Remi Collet <remi@remirepo.net> - 1.1.1-1
- update to 1.1.1

* Tue Jul 27 2021 Remi Collet <remi@remirepo.net> - 1.1.0-6
- add LIBMEMCACHED_AWESOME macro from
  https://github.com/awesomized/libmemcached/pull/115

* Mon Jul 26 2021 Remi Collet <remi@remirepo.net> - 1.1.0-5
- fix missing HAVE_SSIZE_T macro using patch from
  https://github.com/awesomized/libmemcached/pull/117

* Tue Jul 13 2021 Remi Collet <remi@remirepo.net> - 1.1.0-4
- rename to remi-libmemcached-awesome when relocated in /opt/remi (EL7, EL8)

* Tue Jul 13 2021 Remi Collet <remi@remirepo.net> - 1.1.0-3
- use upstream patch for libcrypto

* Fri Jun 25 2021 Remi Collet <remi@remirepo.net> - 1.1.0-2
- remove internal AES implementation and use libcrypto
  https://github.com/awesomized/libmemcached/pull/114
- fix build ussing upstream patch to update catch version

* Thu Jun 24 2021 Remi Collet <remi@remirepo.net> - 1.1.0-1
- update to 1.1.0
- rename libmemcached       to libmemcached-awesome-tools
- rename libmemcached-libs  to libmemcached-awesome
- rename libmemcached-devel to libmemcached-awesome-devel

* Thu Apr 15 2021 Remi Collet <remi@remirepo.net> - 1.1.0~beta3-1
- update to 1.1.0-beta3

* Tue Dec 29 2020 Remi Collet <remi@remirepo.net> - 1.1.0~beta2-1
- update to 1.1.0-beta2

* Sat Dec 26 2020 Remi Collet <remi@remirepo.net> - 1.1.0~beta1-3
- refresh from upstream with all patches merged

* Wed Dec 23 2020 Remi Collet <remi@remirepo.net> - 1.1.0~beta1-2
- add patches from upstream and from
  https://github.com/m6w6/libmemcached/pull/101 fix so version
  https://github.com/m6w6/libmemcached/pull/102 fix for old sphinx
  https://github.com/m6w6/libmemcached/pull/104 fix 32-bit
- enable test suite

* Tue Dec 22 2020 Remi Collet <remi@remirepo.net> - 1.1.0~beta1-1
- update to 1.1.0-beta1
- sources from https://github.com/m6w6/libmemcached
- open https://github.com/m6w6/libmemcached/issues/97 cmake files path
- open https://github.com/m6w6/libmemcached/issues/98 soname
- open https://github.com/m6w6/libmemcached/issues/99 build warning
- open https://github.com/m6w6/libmemcached/issues/100 headers path

* Fri Jan 11 2019 Remi Collet <remi@remirepo.net> - 1.0.18-2
- improve dependency filtering

* Tue Nov 20 2018 Remi Collet <remi@remirepo.net> - 1.0.18-1
- rename to libmemcached-opt and install in /opt/libmemcached

* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 1.0.18-13
- missing BR on C/C++ compilers
- drop ldconfig scriptlets (F28+)

* Sun Feb 28 2016 Remi Collet <remi@fedoraproject.org> - 1.0.18-6
- obsolete libmemcached10

* Tue Jun 23 2015 Remi Collet <remi@fedoraproject.org> - 1.0.18-5
- allow build against rh-php56 (as more-php56)

* Tue Mar 25 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-4
- improve SCL build

* Sun Mar 23 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-3
- allow SCL build

* Wed Feb 19 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-2
- cleanups

* Wed Feb 19 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-1
- update to 1.0.18
- disable test suite (too much broken tests)

* Sat Dec 14 2013 Remi Collet <remi@fedoraproject.org> - 1.0.16-2
- move libraries in new libs sub packages
- add provides for bundled(bobjenkins-hash) #1041351
- apply libpthread workaround #1037707
- spec cleanups

* Tue Dec 03 2013 Ruben Kerkhof <ruben@rubenkerkhof.com> 1.0.16-2
- Fix linking against libpthread as a workaround for libtool bug #661333

* Fri Nov 15 2013 Remi Collet <remi@fedoraproject.org> - 1.0.17-1
- rename to libmemcached-last
- add -libs subpackage to be installed beside standard libmemcached

* Mon Aug  5 2013 Remi Collet <remi@fedoraproject.org> - 1.0.16-1
- revert to 1.0.16 for fedora 20

* Mon Aug  5 2013 Remi Collet <remi@fedoraproject.org> - 1.0.17-2
- fix BR, libasan don't exist on all arch
- disable all sanitize options (only for dev)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Apr  4 2013 Remi Collet <remi@fedoraproject.org> - 1.0.17-1
- update to 1.0.17
- fix option --with-memcached and report regression
  https://bugs.launchpad.net/libmemcached/+bug/1164440
- broken build when -fsanitize=thread available
  https://bugs.launchpad.net/libmemcached/+bug/1164442

* Mon Feb  4 2013 Remi Collet <remi@fedoraproject.org> - 1.0.16-1
- update to 1.0.16
- ignore test result for memaslap (XFAIL but PASS)
  https://bugs.launchpad.net/libmemcached/+bug/1115357

* Sat Dec 29 2012 Remi Collet <remi@fedoraproject.org> - 1.0.15-1
- update to 1.0.15
- libmemcachedprotocol is back
- add memaslap command line tool
- report various issues to upstream
  https://bugs.launchpad.net/libmemcached/+bug/1094413 (libevent)
  https://bugs.launchpad.net/libmemcached/+bug/1094414 (c99 MODE)

* Sat Nov 17 2012 Remi Collet <remi@fedoraproject.org> - 1.0.14-1
- update to 1.0.14
- libmemcachedprotocol removed
- sasl support is back
- run test during build
- report various issues to upstream
  https://bugs.launchpad.net/libmemcached/+bug/1079994 (bigendian)
  https://bugs.launchpad.net/libmemcached/+bug/1079995 (config.h)
  https://bugs.launchpad.net/libmemcached/+bug/1079996 (dtrace)
  https://bugs.launchpad.net/libmemcached/+bug/1079997 (-ldl)
  https://bugs.launchpad.net/libmemcached/+bug/1080000 (touch)

* Sat Oct 20 2012 Remi Collet <remi@fedoraproject.org> - 1.0.13-1
- update to 1.0.13

* Fri Oct 19 2012 Remi Collet <remi@fedoraproject.org> - 1.0.12-2
- temporary hack: fix LIBMEMCACHED_VERSION_HEX value

* Thu Oct 11 2012 Remi Collet <remi@fedoraproject.org> - 1.0.12-1
- update to 1.0.12
- add aclocal/ax_lib_libmemcached.m4
- abi-compliance-checker verdict : Compatible
- uggly hack for man pages

* Tue Sep 25 2012 Karsten Hopp <karsten@redhat.com> 1.0.11-2
- fix defined but not used variable error on bigendian machines

* Sat Sep 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.11-1
- update to 1.0.11, soname bump to libmemcached.so.11
- drop broken SASL support
- don't generate parser (bison 2.6 not supported)

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sun May 27 2012 Remi Collet <remi@fedoraproject.org> - 1.0.8-1
- update to 1.0.8

* Sun Apr 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.7-1
- update to 1.0.7
- regenerate parser using flex/bison (#816766)

* Sun Apr 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-2
- workaround for SASL detection

* Sat Apr 21 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-1
- update to 1.0.6
- soname bump to libmemcached.so.10 and libhashkit.so.2

* Sat Mar 03 2012 Remi Collet <remi@fedoraproject.org> - 1.0.4-1
- update to 1.0.4
- soname bump to libmemcached.so.9
- update description

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3
- Rebuilt for c++ ABI breakage

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Oct 27 2011 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
- update to 1.0.2

* Sun Oct 16 2011 Remi Collet <remi@fedoraproject.org> - 0.53-1
- update to 0.53

* Sat Sep 17 2011 Remi Collet <remi@fedoraproject.org> - 0.52-1
- update to 0.52

* Sun Jul 31 2011 Remi Collet <remi@fedoraproject.org> - 0.51-1
- update to 0.51 (soname bump libmemcached.so.8)

* Thu Jun 02 2011 Remi Collet <Fedora@famillecollet.com> - 0.49-1
- update to 0.49
- add build option : --with tests

* Mon Feb 28 2011 Remi Collet <Fedora@famillecollet.com> - 0.47-1
- update to 0.47
- remove patch merged upstream

* Sun Feb 20 2011 Remi Collet <Fedora@famillecollet.com> - 0.46-2
- patch Makefile.in instead of include.am (to avoid autoconf)
- donc requires pkgconfig with arch

* Fri Feb 18 2011 Remi Collet <Fedora@famillecollet.com> - 0.46-1
- update to 0.46

* Sat Feb 12 2011 Remi Collet <Fedora@famillecollet.com> - 0.44-6
- arch specific requires

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.44-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Nov 24 2010 Joe Orton <jorton@redhat.com> - 0.44-4
- repackage source tarball to remove non-free Hsieh hash code

* Sat Oct 02 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-3
- improves SASL patch

* Sat Oct 02 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-2
- enable SASL support

* Fri Oct 01 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-1
- update to 0.44
- add soname version in %%file to detect change

* Fri Jul 30 2010 Remi Collet <Fedora@famillecollet.com> - 0.43-1
- update to 0.43

* Wed Jul 07 2010 Remi Collet <Fedora@famillecollet.com> - 0.42-1
- update to 0.42

* Tue May 04 2010 Remi Collet <Fedora@famillecollet.com> - 0.40-1
- update to 0.40 (new soname for libmemcached.so.5)
- new URI (site + source)

* Sat Mar 13 2010 Remi Collet <Fedora@famillecollet.com> - 0.38-1
- update to 0.38

* Sat Feb 06 2010 Remi Collet <Fedora@famillecollet.com> - 0.37-1
- update to 0.37 (soname bump)
- new libhashkit (should be a separated project in the futur)

* Sun Sep 13 2009 Remi Collet <Fedora@famillecollet.com> - 0.31-1
- update to 0.31

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.30-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Jun 14 2009 Remi Collet <Fedora@famillecollet.com> - 0.30-1
- update to 0.30

* Tue May 19 2009 Remi Collet <Fedora@famillecollet.com> - 0.29-1
- update to 0.29

* Fri May 01 2009 Remi Collet <Fedora@famillecollet.com> - 0.28-2
- add upstream patch to disable nonfree hsieh hash method

* Sat Apr 25 2009 Remi Collet <Fedora@famillecollet.com> - 0.28-1
- Initial RPM from Brian Aker spec
- create -devel subpackage
- add %%post %%postun %%check section