"Fossies" - the Fresh Open Source Software Archive 
Member "memcached-1.6.9/memcached.spec" (21 Nov 2020, 5798 Bytes) of package /linux/www/memcached-1.6.9.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) RPM Spec source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "memcached.spec":
1.6.8_vs_1.6.9.
1 %bcond_with extstore
2 %bcond_with seccomp
3 %bcond_with sasl
4 %bcond_with sasl_pwdb
5 %bcond_with dtrace
6 %bcond_with 64bit
7 %bcond_without option_checking
8 %bcond_without coverage
9 %bcond_without docs
10
11 # Set with_systemd on distros that use it, so we can install the service
12 # file, otherwise the sysvinit script will be installed
13 %if 0%{?fedora} >= 14 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
14 %global with_systemd 1
15 BuildRequires: systemd-units
16
17 # Disable some systemd safety features on OSes without a new enough systemd
18 # (new enough is systemd >= 233)
19 %if 0%{?fedora} < 26 || 0%{?rhel} > 0
20 %global safer_systemd 0
21 %else
22 %global safer_systemd 1
23 %endif
24
25 %else
26 %global with_systemd 0
27 %endif
28
29 Name: memcached
30 Version: 1.6.9
31 Release: 1%{?dist}
32 Summary: High Performance, Distributed Memory Object Cache
33
34 Group: System Environment/Daemons
35 License: BSD
36 URL: https://memcached.org
37 Source0: https://memcached.org/files/%{name}-%{version}.tar.gz
38 Source1: memcached.sysconfig
39 Source2: memcached.service
40 Source3: memcached@.service
41 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
42
43 BuildRequires: libevent-devel
44 BuildRequires: perl(Test::More)
45 BuildRequires: /usr/bin/prove
46 Requires: initscripts
47 %if %{with_systemd}
48 Requires(post): systemd-units
49 Requires(preun): systemd-units
50 Requires(postun): systemd-units
51 %else
52 Requires(post): /sbin/chkconfig
53 Requires(preun): /sbin/chkconfig, /sbin/service
54 Requires(postun): /sbin/service
55 %endif
56
57 %description
58 memcached is a high-performance, distributed memory object caching
59 system, generic in nature, but intended for use in speeding up dynamic
60 web applications by alleviating database load.
61
62 %prep
63 %setup -q -n %{name}-%{version}
64
65
66 %build
67 %configure \
68 %{?with_extstore:--enable-extstore} \
69 %{?with_seccomp:--enable-seccomp} \
70 %{?with_sasl:--enable-sasl} \
71 %{?with_sasl_pwdb:--enable-pwdb} \
72 %{?with_dtrace:--enable-dtrace} \
73 %{?with_64bit:--enable-64bit} \
74 %{!?with_option_checking:--disable-option-checking}
75 %{!?with_coverage:--disable-coverage} \
76 %{!?with_docs:--disable-docs}
77
78 make %{?_smp_mflags}
79
80
81 %check
82 make test
83
84
85 %install
86 rm -rf %{buildroot}
87 make install DESTDIR=%{buildroot}
88
89 # remove memcached-debug
90 rm -f %{buildroot}/%{_bindir}/%{name}-debug
91
92 # Perl script for monitoring memcached
93 install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/%{name}-tool
94
95 # Init script
96 %if %{with_systemd}
97 install -Dp -m0755 scripts/memcached.service %{buildroot}%{_unitdir}/%{name}.service
98 install -Dp -m0755 scripts/memcached@.service %{buildroot}%{_unitdir}/%{name}@.service
99
100 if [ %{safer_systemd} -gt 0 ]; then
101 sed -e 's/^##safer##//g' -i %{buildroot}%{_unitdir}/%{name}.service %{buildroot}%{_unitdir}/%{name}@.service
102 else
103 sed -e 's/^##safer##/#/g' -i %{buildroot}%{_unitdir}/%{name}.service %{buildroot}%{_unitdir}/%{name}@.service
104 fi
105 %else
106 install -Dp -m0755 scripts/memcached.sysv %{buildroot}%{_initrddir}/%{name}
107 %endif
108
109 # Default configs
110 install -Dp -m0644 scripts/memcached.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
111
112 # pid directory
113 mkdir -p %{buildroot}/%{_localstatedir}/run/%{name}
114
115
116 %clean
117 rm -rf %{buildroot}
118
119
120 %post
121 if [ $1 -eq 1 ]; then
122 # Initial install
123 %if %{with_systemd}
124 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
125 %else
126 /sbin/chkconfig --add %{name}
127 %endif
128 fi
129
130
131 %preun
132 if [ "$1" = 0 ] ; then
133 # Removal, not upgrade
134 %if %{with_systemd}
135 /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
136 /bin/systemctl --no-reload disable %{name}@\*.service > /dev/null 2>&1 || :
137 /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
138 /bin/systemctl stop %{name}@\*.service > /dev/null 2>&1 || :
139 %else
140 /sbin/service %{name} stop > /dev/null 2&>1 || :
141 /sbin/chkconfig --del %{name}
142 %endif
143 fi
144
145 exit 0
146
147
148 %postun
149 %if %{with_systemd}
150 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
151 %endif
152
153 # Don't auto-restart memcached on upgrade -- let user control when cache flushes
154 # if [ "$1" -ge 1 ]; then
155 # # upgrade, not install
156 # %if %{with_systemd}
157 # /bin/systemctl try-restart %{name}.service
158 # /bin/systemctl try-restart %{name}@\*.service
159 # %else
160 # /sbin/service %named condrestart 2>/dev/null || :
161 # %endif
162 #fi
163
164 exit 0
165
166
167 %files
168 %defattr(-,root,root,-)
169 %doc AUTHORS ChangeLog COPYING NEWS README.md doc/CONTRIBUTORS doc/*.txt
170 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
171
172 %dir %attr(750,nobody,nobody) %{_localstatedir}/run/%{name}
173 %{_bindir}/%{name}-tool
174 %{_bindir}/%{name}
175 %{_mandir}/man1/%{name}.1*
176 %{_includedir}/%{name}
177
178 %if %{with_systemd}
179 %{_unitdir}/%{name}.service
180 %{_unitdir}/%{name}@.service
181 %else
182 %{_initrddir}/%{name}
183 %endif
184
185 %changelog
186 * Wed Jul 5 2017 J. Grizzard <jg-github@lupine.org> - 1.4.39
187 - Add systemd-aware build
188 - Add both static and instanced versions of memcached unit files
189
190 * Mon Nov 2 2009 Dormando <dormando@rydia.net> - 1.4.3-1
191 - Fix autogen more.
192
193 * Sat Aug 29 2009 Dustin Sallings <dustin@spy.net> - 1.4.1-1
194 - Autogenerate the version number from tags.
195
196 * Wed Jul 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
197 - Use /var/run/memcached/ directory to hold PID file
198
199 * Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
200 - Remove tabs from spec file, rpmlint reports no more errors
201
202 * Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
203 - Enable build-time regression tests
204 - add dependency on initscripts
205 - remove memcached-debug (not needed in dist)
206 - above suggestions from Bernard Johnson
207
208 * Mon May 7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
209 - Tidiness improvements suggested by Ruben Kerkhof in bugzilla #238994
210
211 * Fri May 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
212 - Initial spec file created via rpmdev-newspec