source: projects/specs/trunk/m/memcached/memcached-vl.spec @ 12515

Revision 12515, 5.8 KB checked in by tomop, 3 years ago (diff)

updated 5 packages

glib2-2.66.4-1

initscripts-8.91.16-5

memcached-1.6.9-1

p11-kit-0.23.22-1

redis-6.0.9-1

Line 
1%bcond_with systemd
2
3Summary: a high-performance, distributed memory object caching system
4Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム
5Name: memcached
6Version: 1.6.9
7Release: 1%{?_dist_release}%{?with_systemd:.systemd}
8Group: servers
9Vendor: Project Vine
10Distribution: Vine Linux
11
12License: modified BSD style License
13Url: https://memcached.org/
14Source0: http://www.memcached.org/files/memcached-%{version}.tar.gz
15Source1: memcached.sysconfig
16# Patches
17Patch1: memcached-unit.patch
18
19BuildRoot: %{_tmppath}/%{name}-%{version}-root
20BuildRequires: libevent-devel
21BuildRequires: openssl-devel
22Requires(pre): shadow-utils
23%if %{with systemd}
24BuildRequires: systemd
25%{?systemd_requires}
26%else
27Requires(post): chkconfig
28Requires(preun): chkconfig
29Requires(preun): initscripts
30Requires(postun): initscripts
31%endif
32
33%description
34memcached is a high-performance, distributed memory object caching system,
35generic in nature, but intended for use in speeding up dynamic web
36applications by alleviating database load.
37
38
39%package devel
40Summary:        Files needed for development using memcached protocol
41Summary(ja):    memcached プロトコルを使用した開発に必要なファイル
42Group:          programming
43Requires:       %{name} = %{version}-%{release}
44
45%description devel
46Install memcached-devel if you are developing C/C++ applications that require access to the
47memcached binary include files.
48
49
50%debug_package
51
52
53%prep
54%setup -q
55%patch1 -p1 -b .unit
56
57%if !%{with systemd}
58perl -pi -e 's|/var/run/memcached\.pid|/var/run/memcached/memcached.pid|' scripts/memcached.sysv
59%endif
60
61
62%build
63%configure --enable-tls
64%__make %{?_smp_mflags}
65
66
67%install
68rm -rf %{buildroot}
69mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
70mkdir -p %{buildroot}%{_localstatedir}/run/memcached
71
72make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
73# remove memcached-debug
74rm -f %{buildroot}/%{_bindir}/memcached-debug
75
76# Perl script for monitoring memcached
77install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
78install -Dp -m0644 scripts/memcached-tool.1 \
79        %{buildroot}%{_mandir}/man1/memcached-tool.1
80
81%if %{with systemd}
82# Unit file
83install -Dp -m0644 scripts/memcached.service \
84        %{buildroot}%{_unitdir}/memcached.service
85%else
86mkdir -p %{buildroot}%{_initdir}
87install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached
88%endif
89# Default configs
90install -Dp -m0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
91
92
93%clean
94rm -rf %{buildroot}
95
96
97%triggerprein -- memcached < 1.5.0
98  /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached ||:
99  /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached ||:
100rm -f %{_bindir}/memcached
101
102%pre
103getent group memcached >/dev/null || groupadd -r memcached
104getent passwd memcached >/dev/null || \
105useradd -r -g memcached -d %{_sysconfdir}/memcached -s /sbin/nologin \
106-c "memcached service" memcached
107exit 0
108
109%post
110%if %{with systemd}
111%systemd_post memcached.service
112%else
113/sbin/chkconfig --add %{name}
114%endif
115
116%preun
117%if %{with systemd}
118%systemd_preun memcached.service
119%else
120if [ "$1" -eq 0 -o -x /bin/systemctl ]; then
121  /sbin/service %{name} stop >/dev/null 2>&1
122  /sbin/chkconfig --del %{name}
123fi
124%endif
125
126%postun
127%if %{with systemd}
128%systemd_postun_with_restart memcached.service
129%else
130if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then
131  /sbin/service %{name} condrestart ||:
132fi
133%endif
134
135
136%files
137%defattr(-,root,root)
138%license COPYING
139%doc AUTHORS* ChangeLog ChangeLog* NEWS README*
140%doc doc/CONTRIBUTORS doc/*.txt
141%config(noreplace) %{_sysconfdir}/sysconfig/memcached
142%{_bindir}/memcached
143%{_bindir}/memcached-tool
144%{_mandir}/man1/memcached.1*
145%{_mandir}/man1/memcached-tool.1*
146%if %{with systemd}
147%{_unitdir}/memcached.service
148%else
149%{_initdir}/memcached
150%dir %{_localstatedir}/run/memcached
151%endif
152
153%files devel
154%defattr(-,root,root,0755)
155%{_includedir}/memcached/*
156
157%changelog
158* Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.6.9-1
159- new upstream release.
160
161* Tue Apr 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.6.5-1
162- new upstream release.
163- built with libevent-2.1.11.
164- added systemd support (disabled as default).
165
166* Sun Nov 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.12-1
167- new upstream release.
168- built with libevent-2.1.8.
169- dropped repcached.
170
171* Mon Nov 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.25-1
172- new upstream release.
173
174* Mon Jul 27 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.24-1
175- new upstream release.
176
177* Fri Jan 10 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.17-1
178- new upstream release.
179
180* Fri May 11 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-2
181- fixed missing symlink.
182
183* Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-1
184- new upstream release.
185- made be able to choose between memcached and repcached by alternatives.
186
187* Sat Aug 20 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.7.repcached2.3.1-1
188- new upstream release.
189- updated repcached patch.
190- removed %%Patch0. (fixed in upstream)
191
192* Tue Feb 15 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.3.1-1
193- updated repcached patch.
194
195* Mon Feb 14 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.
1963-1
197- applied the repcached patch.
198
199* Thu Feb 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.4.5-1
200- new upstream release
201- added Patch0 from Fedora
202- rebuilt with libevent-2.0.10
203- fixed &&files
204- splitted -devel package
205
206* Mon Jun 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.8-1
207- new upstream release.
208- wrote spec in UTF-8.
209
210* Mon May 19 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.2.5-1
211- new upstream release.
212- added some scripts.
213
214* Mon Jul 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.12-0vl2
215- rebuilt with libevent-1.3b
216
217* Sun Aug 13 2006 IWAI, Masaharu <iwai@alib.jp> 1.1.12-0vl1
218- new package
219
Note: See TracBrowser for help on using the repository browser.