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

Revision 12374, 5.7 KB checked in by tomop, 4 years ago (diff)

updated 9 packages

libevent-2.1.11-1

memcached-1.6.5-1

netatalk-3.1.12-2

nfs-utils-2.4.3-1

nsd-4.3.0-3

perl-Event-Lib-1.03-5

tmux-3.0a-1

unbound-1.10.0-2

zabbix-4.0.19-2

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