1 | %define memcached_version 1.4.25 |
---|
2 | |
---|
3 | Summary: a high-performance, distributed memory object caching system |
---|
4 | Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム |
---|
5 | Name: memcached |
---|
6 | Version: %{memcached_version} |
---|
7 | Release: 1%{?_dist_release} |
---|
8 | Source0: http://www.danga.com/memcached/dist/%{name}-%{memcached_version}.tar.gz |
---|
9 | |
---|
10 | # repcached patch |
---|
11 | Patch0: repcached-%{memcached_version}.patch |
---|
12 | |
---|
13 | # Patches |
---|
14 | |
---|
15 | |
---|
16 | License: modified BSD style License |
---|
17 | Url: http://www.danga.com/memcached/ |
---|
18 | Group: Applications/Databases |
---|
19 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
20 | BuildRequires: libevent-devel |
---|
21 | |
---|
22 | Vendor: Project Vine |
---|
23 | Distribution: Vine Linux |
---|
24 | Packager: tomop |
---|
25 | |
---|
26 | %description |
---|
27 | memcached is a high-performance, distributed memory object caching system, |
---|
28 | generic in nature, but intended for use in speeding up dynamic web |
---|
29 | applications by alleviating database load. |
---|
30 | |
---|
31 | %package devel |
---|
32 | Summary: Files needed for development using memcached protocol |
---|
33 | Summary(ja): memcached プロトコルを使用した開発に必要なファイル |
---|
34 | Group: Development/Libraries |
---|
35 | Requires: %{name} = %{version}-%{release} |
---|
36 | |
---|
37 | %description devel |
---|
38 | Install memcached-devel if you are developing C/C++ applications that require access to the |
---|
39 | memcached binary include files. |
---|
40 | |
---|
41 | %prep |
---|
42 | %setup -q |
---|
43 | |
---|
44 | perl -pi -e 's|/var/run/memcached\.pid|/var/run/memcached/memcached.pid|' scripts/memcached.sysv |
---|
45 | |
---|
46 | %setup -q -D -T -a 0 -n memcached-%{memcached_version} |
---|
47 | pushd memcached-%{memcached_version} |
---|
48 | %patch0 -p1 -b .replicate |
---|
49 | popd |
---|
50 | |
---|
51 | %build |
---|
52 | ./autogen.sh |
---|
53 | %configure |
---|
54 | %__make %{?_smp_mflags} |
---|
55 | |
---|
56 | pushd memcached-%{memcached_version} |
---|
57 | ./autogen.sh |
---|
58 | %configure --enable-replication |
---|
59 | %__make %{?_smp_mflags} |
---|
60 | popd |
---|
61 | |
---|
62 | %install |
---|
63 | rm -rf %{buildroot} |
---|
64 | mkdir -p %{buildroot}%{_initdir} |
---|
65 | mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
---|
66 | mkdir -p %{buildroot}%{_localstatedir}/run/memcached |
---|
67 | |
---|
68 | %makeinstall |
---|
69 | |
---|
70 | rm -f %{buildroot}%{_bindir}/memcached-debug |
---|
71 | |
---|
72 | install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached |
---|
73 | install -m755 scripts/memcached-tool %{buildroot}%{_bindir}/ |
---|
74 | |
---|
75 | pushd memcached-%{memcached_version} |
---|
76 | cp -f *.repcached ../ |
---|
77 | popd |
---|
78 | |
---|
79 | mv -f %{buildroot}%{_bindir}/memcached %{buildroot}%{_bindir}/memcached.memcached |
---|
80 | install -m755 memcached-%{memcached_version}/memcached %{buildroot}%{_bindir}/memcached.repcached |
---|
81 | |
---|
82 | cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/memcached |
---|
83 | PORT=11211 |
---|
84 | USER=nobody |
---|
85 | MAXCONN=1024 |
---|
86 | CACHESIZE=64 |
---|
87 | OPTIONS="" |
---|
88 | #OPTIONS="-x peer_to_replicate" |
---|
89 | EOF |
---|
90 | |
---|
91 | %clean |
---|
92 | rm -rf %{buildroot} |
---|
93 | |
---|
94 | %post |
---|
95 | /sbin/update-alternatives --install %{_bindir}/memcached \ |
---|
96 | memcached %{_bindir}/memcached.memcached 20 |
---|
97 | /sbin/update-alternatives --install %{_bindir}/memcached \ |
---|
98 | memcached %{_bindir}/memcached.repcached 10 |
---|
99 | |
---|
100 | %preun |
---|
101 | if [ "$1" = 0 ]; then |
---|
102 | /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached |
---|
103 | /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached |
---|
104 | /sbin/update-alternatives --auto memcached ||: |
---|
105 | fi |
---|
106 | |
---|
107 | %triggerpostun -- memcached < 1.4.13 |
---|
108 | /sbin/update-alternatives --auto memcached ||: |
---|
109 | |
---|
110 | %files |
---|
111 | %defattr(-,root,root) |
---|
112 | %doc AUTHORS* COPYING ChangeLog ChangeLog* NEWS README* |
---|
113 | %doc doc/CONTRIBUTORS doc/*.txt |
---|
114 | %config(noreplace) %{_sysconfdir}/sysconfig/memcached |
---|
115 | %{_initdir}/memcached |
---|
116 | %{_bindir}/memcached.memcached |
---|
117 | %{_bindir}/memcached.repcached |
---|
118 | %{_bindir}/memcached-tool |
---|
119 | %{_mandir}/man1/memcached.1* |
---|
120 | %dir %{_localstatedir}/run/memcached |
---|
121 | |
---|
122 | %files devel |
---|
123 | %defattr(-,root,root,0755) |
---|
124 | %{_includedir}/memcached/* |
---|
125 | |
---|
126 | %changelog |
---|
127 | * Mon Nov 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.25-1 |
---|
128 | - new upstream release. |
---|
129 | |
---|
130 | * Mon Jul 27 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.24-1 |
---|
131 | - new upstream release. |
---|
132 | |
---|
133 | * Fri Jan 10 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.17-1 |
---|
134 | - new upstream release. |
---|
135 | |
---|
136 | * Fri May 11 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-2 |
---|
137 | - fixed missing symlink. |
---|
138 | |
---|
139 | * Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-1 |
---|
140 | - new upstream release. |
---|
141 | - made be able to choose between memcached and repcached by alternatives. |
---|
142 | |
---|
143 | * Sat Aug 20 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.7.repcached2.3.1-1 |
---|
144 | - new upstream release. |
---|
145 | - updated repcached patch. |
---|
146 | - removed %%Patch0. (fixed in upstream) |
---|
147 | |
---|
148 | * Tue Feb 15 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.3.1-1 |
---|
149 | - updated repcached patch. |
---|
150 | |
---|
151 | * Mon Feb 14 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2. |
---|
152 | 3-1 |
---|
153 | - applied the repcached patch. |
---|
154 | |
---|
155 | * Thu Feb 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.4.5-1 |
---|
156 | - new upstream release |
---|
157 | - added Patch0 from Fedora |
---|
158 | - rebuilt with libevent-2.0.10 |
---|
159 | - fixed &&files |
---|
160 | - splitted -devel package |
---|
161 | |
---|
162 | * Mon Jun 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.8-1 |
---|
163 | - new upstream release. |
---|
164 | - wrote spec in UTF-8. |
---|
165 | |
---|
166 | * Mon May 19 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.2.5-1 |
---|
167 | - new upstream release. |
---|
168 | - added some scripts. |
---|
169 | |
---|
170 | * Mon Jul 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.12-0vl2 |
---|
171 | - rebuilt with libevent-1.3b |
---|
172 | |
---|
173 | * Sun Aug 13 2006 IWAI, Masaharu <iwai@alib.jp> 1.1.12-0vl1 |
---|
174 | - new package |
---|
175 | |
---|