[12374] | 1 | %bcond_with systemd |
---|
[3293] | 2 | |
---|
[521] | 3 | Summary: a high-performance, distributed memory object caching system |
---|
| 4 | Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム |
---|
| 5 | Name: memcached |
---|
[12515] | 6 | Version: 1.6.9 |
---|
[12374] | 7 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
[12515] | 8 | Group: servers |
---|
[12374] | 9 | Vendor: Project Vine |
---|
| 10 | Distribution: Vine Linux |
---|
[2689] | 11 | |
---|
[12374] | 12 | License: modified BSD style License |
---|
| 13 | Url: https://memcached.org/ |
---|
| 14 | Source0: http://www.memcached.org/files/memcached-%{version}.tar.gz |
---|
| 15 | Source1: memcached.sysconfig |
---|
[9790] | 16 | # Patches |
---|
[12374] | 17 | Patch1: memcached-unit.patch |
---|
[9790] | 18 | |
---|
[12515] | 19 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[521] | 20 | BuildRequires: libevent-devel |
---|
[12374] | 21 | BuildRequires: openssl-devel |
---|
| 22 | Requires(pre): shadow-utils |
---|
| 23 | %if %{with systemd} |
---|
| 24 | BuildRequires: systemd |
---|
| 25 | %{?systemd_requires} |
---|
| 26 | %else |
---|
| 27 | Requires(post): chkconfig |
---|
| 28 | Requires(preun): chkconfig |
---|
| 29 | Requires(preun): initscripts |
---|
| 30 | Requires(postun): initscripts |
---|
| 31 | %endif |
---|
[521] | 32 | |
---|
| 33 | %description |
---|
| 34 | memcached is a high-performance, distributed memory object caching system, |
---|
| 35 | generic in nature, but intended for use in speeding up dynamic web |
---|
| 36 | applications by alleviating database load. |
---|
| 37 | |
---|
[12374] | 38 | |
---|
[2689] | 39 | %package devel |
---|
| 40 | Summary: Files needed for development using memcached protocol |
---|
| 41 | Summary(ja): memcached プロトコルを使用した開発に必要なファイル |
---|
[12515] | 42 | Group: programming |
---|
[2689] | 43 | Requires: %{name} = %{version}-%{release} |
---|
| 44 | |
---|
| 45 | %description devel |
---|
| 46 | Install memcached-devel if you are developing C/C++ applications that require access to the |
---|
| 47 | memcached binary include files. |
---|
| 48 | |
---|
[12374] | 49 | |
---|
[12515] | 50 | %debug_package |
---|
| 51 | |
---|
| 52 | |
---|
[521] | 53 | %prep |
---|
[8144] | 54 | %setup -q |
---|
[12374] | 55 | %patch1 -p1 -b .unit |
---|
[521] | 56 | |
---|
[12374] | 57 | %if !%{with systemd} |
---|
[8144] | 58 | perl -pi -e 's|/var/run/memcached\.pid|/var/run/memcached/memcached.pid|' scripts/memcached.sysv |
---|
[12374] | 59 | %endif |
---|
[6075] | 60 | |
---|
[12374] | 61 | |
---|
[521] | 62 | %build |
---|
[12374] | 63 | %configure --enable-tls |
---|
[6075] | 64 | %__make %{?_smp_mflags} |
---|
| 65 | |
---|
[12374] | 66 | |
---|
[521] | 67 | %install |
---|
| 68 | rm -rf %{buildroot} |
---|
| 69 | mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
---|
| 70 | mkdir -p %{buildroot}%{_localstatedir}/run/memcached |
---|
[6075] | 71 | |
---|
[12374] | 72 | make install DESTDIR=%{buildroot} INSTALL="%{__install} -p" |
---|
| 73 | # remove memcached-debug |
---|
| 74 | rm -f %{buildroot}/%{_bindir}/memcached-debug |
---|
[521] | 75 | |
---|
[12374] | 76 | # Perl script for monitoring memcached |
---|
| 77 | install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool |
---|
| 78 | install -Dp -m0644 scripts/memcached-tool.1 \ |
---|
| 79 | %{buildroot}%{_mandir}/man1/memcached-tool.1 |
---|
[521] | 80 | |
---|
[12374] | 81 | %if %{with systemd} |
---|
| 82 | # Unit file |
---|
| 83 | install -Dp -m0644 scripts/memcached.service \ |
---|
| 84 | %{buildroot}%{_unitdir}/memcached.service |
---|
| 85 | %else |
---|
| 86 | mkdir -p %{buildroot}%{_initdir} |
---|
[521] | 87 | install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached |
---|
[12374] | 88 | %endif |
---|
| 89 | # Default configs |
---|
| 90 | install -Dp -m0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} |
---|
[521] | 91 | |
---|
| 92 | |
---|
| 93 | %clean |
---|
| 94 | rm -rf %{buildroot} |
---|
| 95 | |
---|
[12374] | 96 | |
---|
[11861] | 97 | %triggerprein -- memcached < 1.5.0 |
---|
| 98 | /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached ||: |
---|
| 99 | /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached ||: |
---|
| 100 | rm -f %{_bindir}/memcached |
---|
| 101 | |
---|
[12374] | 102 | %pre |
---|
| 103 | getent group memcached >/dev/null || groupadd -r memcached |
---|
| 104 | getent passwd memcached >/dev/null || \ |
---|
| 105 | useradd -r -g memcached -d %{_sysconfdir}/memcached -s /sbin/nologin \ |
---|
| 106 | -c "memcached service" memcached |
---|
| 107 | exit 0 |
---|
| 108 | |
---|
[6075] | 109 | %post |
---|
[12374] | 110 | %if %{with systemd} |
---|
| 111 | %systemd_post memcached.service |
---|
| 112 | %else |
---|
| 113 | /sbin/chkconfig --add %{name} |
---|
| 114 | %endif |
---|
[6075] | 115 | |
---|
[12374] | 116 | %preun |
---|
| 117 | %if %{with systemd} |
---|
| 118 | %systemd_preun memcached.service |
---|
| 119 | %else |
---|
| 120 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
| 121 | /sbin/service %{name} stop >/dev/null 2>&1 |
---|
| 122 | /sbin/chkconfig --del %{name} |
---|
| 123 | fi |
---|
| 124 | %endif |
---|
| 125 | |
---|
| 126 | %postun |
---|
| 127 | %if %{with systemd} |
---|
| 128 | %systemd_postun_with_restart memcached.service |
---|
| 129 | %else |
---|
| 130 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
| 131 | /sbin/service %{name} condrestart ||: |
---|
| 132 | fi |
---|
| 133 | %endif |
---|
| 134 | |
---|
| 135 | |
---|
[521] | 136 | %files |
---|
| 137 | %defattr(-,root,root) |
---|
[12374] | 138 | %license COPYING |
---|
| 139 | %doc AUTHORS* ChangeLog ChangeLog* NEWS README* |
---|
[3293] | 140 | %doc doc/CONTRIBUTORS doc/*.txt |
---|
[521] | 141 | %config(noreplace) %{_sysconfdir}/sysconfig/memcached |
---|
[11861] | 142 | %{_bindir}/memcached |
---|
[521] | 143 | %{_bindir}/memcached-tool |
---|
| 144 | %{_mandir}/man1/memcached.1* |
---|
[12374] | 145 | %{_mandir}/man1/memcached-tool.1* |
---|
| 146 | %if %{with systemd} |
---|
| 147 | %{_unitdir}/memcached.service |
---|
| 148 | %else |
---|
| 149 | %{_initdir}/memcached |
---|
[521] | 150 | %dir %{_localstatedir}/run/memcached |
---|
[12374] | 151 | %endif |
---|
[521] | 152 | |
---|
[2689] | 153 | %files devel |
---|
| 154 | %defattr(-,root,root,0755) |
---|
| 155 | %{_includedir}/memcached/* |
---|
| 156 | |
---|
[521] | 157 | %changelog |
---|
[12515] | 158 | * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.6.9-1 |
---|
| 159 | - new upstream release. |
---|
| 160 | |
---|
[12374] | 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 | |
---|
[11861] | 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 | |
---|
[9826] | 171 | * Mon Nov 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.25-1 |
---|
| 172 | - new upstream release. |
---|
| 173 | |
---|
[9790] | 174 | * Mon Jul 27 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.24-1 |
---|
| 175 | - new upstream release. |
---|
| 176 | |
---|
[8144] | 177 | * Fri Jan 10 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.17-1 |
---|
| 178 | - new upstream release. |
---|
| 179 | |
---|
[7856] | 180 | * Fri May 11 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-2 |
---|
| 181 | - fixed missing symlink. |
---|
| 182 | |
---|
[6075] | 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 | |
---|
[3293] | 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. |
---|
| 196 | 3-1 |
---|
| 197 | - applied the repcached patch. |
---|
| 198 | |
---|
[2689] | 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 | |
---|
[521] | 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 | |
---|