Updates, rpm now tests the install locations.
[awesomized/libmemcached] / support / libmemcached.spec.in
1 Name: libmemcached
2 Summary: memcached C library and command line tools
3 Version: @VERSION@
4 Release: 1
5 License: BSD
6 Group: System Environment/Libraries
7 URL: http://launchpad.net/libmemcached
8 Source0: http://download.tangent.org/libmemcached-%{version}.tar.gz
9
10 # For test suite
11 BuildRequires: memcached
12
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
15
16 %description
17 libmemcached is a C client library to the memcached server
18 (http://danga.com/memcached). It has been designed to be light on memory
19 usage, and provide full access to server side methods.
20
21 It also implements several command line tools:
22
23 memcat - Copy the value of a key to standard output.
24 memflush - Flush the contents of your servers.
25 memrm - Remove a key(s) from the serrver.
26 memstat - Dump the stats of your servers to standard output.
27 memslap - Generate testing loads on a memcached cluster.
28 memcp - Copy files to memcached servers.
29 memerror - Creates human readable messages from libmemecached error codes.
30 memcapable - Verify a memcached server for protocol behavior.
31
32
33 %package devel
34 Summary: Header files and development libraries for %{name}
35 Group: Development/Libraries
36 Requires: %{name} = %{version}-%{release}
37
38 %description devel
39 This package contains the header files and development libraries
40 for %{name}. If you like to develop programs using %{name},
41 you will need to install %{name}-devel.
42
43
44 %prep
45 %setup -q
46
47 %{__mkdir} examples
48 %{__cp} tests/*.{c,cpp,h} examples/
49
50
51 %build
52 %configure
53 %{__make} %{_smp_mflags}
54
55
56 %install
57 %{__rm} -rf %{buildroot}
58 %{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
59
60
61 %check
62 # test suite cannot run in mock (same port use for memcache server on all arch)
63 # 1 test seems to fail..
64 #%{__make} test
65
66
67 %clean
68 %{__rm} -rf %{buildroot}
69
70
71 %post -p /sbin/ldconfig
72
73
74 %postun -p /sbin/ldconfig
75
76
77 %files
78 %defattr (-,root,root,-)
79 %doc AUTHORS COPYING NEWS README THANKS TODO
80 %{_bindir}/mem*
81 %exclude %{_libdir}/libmemcached.la
82 %exclude %{_libdir}/libhashkit.la
83 %exclude %{_libdir}/libmemcachedutil.la
84 %exclude %{_libdir}/libmemcachedprotocol.la
85 %{_libdir}/libhashkit.so.*
86 %{_libdir}/libmemcached.so.*
87 %{_libdir}/libmemcachedutil.so.*
88 %{_libdir}/libmemcachedprotocol.so.*
89 %{_mandir}/man1/mem*
90
91
92 %files devel
93 %defattr (-,root,root,-)
94 %doc examples
95 %{_includedir}/libhashkit/algorithm.h
96 %{_includedir}/libhashkit/behavior.h
97 %{_includedir}/libhashkit/hashkit.h
98 %{_includedir}/libhashkit/strerror.h
99 %{_includedir}/libhashkit/types.h
100 %{_includedir}/libhashkit/visibility.h
101 %{_includedir}/libmemcached/analyze.h
102 %{_includedir}/libmemcached/auto.h
103 %{_includedir}/libmemcached/behavior.h
104 %{_includedir}/libmemcached/callback.h
105 %{_includedir}/libmemcached/configure.h
106 %{_includedir}/libmemcached/constants.h
107 %{_includedir}/libmemcached/dump.h
108 %{_includedir}/libmemcached/exception.hpp
109 %{_includedir}/libmemcached/get.h
110 %{_includedir}/libmemcached/memcached.h
111 %{_includedir}/libmemcached/memcached.hpp
112 %{_includedir}/libmemcached/memcached_util.h
113 %{_includedir}/libmemcached/protocol
114 %{_includedir}/libmemcached/protocol/cache.h
115 %{_includedir}/libmemcached/protocol/callback.h
116 %{_includedir}/libmemcached/protocol_handler.h
117 %{_includedir}/libmemcached/result.h
118 %{_includedir}/libmemcached/server.h
119 %{_includedir}/libmemcached/stats.h
120 %{_includedir}/libmemcached/storage.h
121 %{_includedir}/libmemcached/string.h
122 %{_includedir}/libmemcached/types.h
123 %{_includedir}/libmemcached/util/pool.h
124 %{_includedir}/libmemcached/visibility.h
125 %{_includedir}/libmemcached/watchpoint.h
126 %{_libdir}/libhashkit.so
127 %{_libdir}/libmemcached.so
128 %{_libdir}/libmemcachedprotocol.so
129 %{_libdir}/libmemcachedutil.so
130 %{_libdir}/pkgconfig/libmemcached.pc
131 %{_mandir}/man3/hashkit*.3.gz
132 %{_mandir}/man3/libmemcached*.3.gz
133 %{_mandir}/man3/memcached_*.3.gz
134
135
136 %changelog
137 * Fri Jan 8 2010
138 - Modified to be explicit in install include files.
139
140 * Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28-1
141 - Initial RPM from Brian Aker spec
142 - create -devel subpackage
143 - add %%post %%postun %%check section
144