[12374] | 1 | %bcond_with systemd |
---|
[3293] | 2 | |
---|
[521] | 3 | Summary: a high-performance, distributed memory object caching system |
---|
| 4 | Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム |
---|
| 5 | Name: memcached |
---|
[12374] | 6 | Version: 1.6.5 |
---|
| 7 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
| 8 | Group: Applications/Databases |
---|
| 9 | Vendor: Project Vine |
---|
| 10 | Distribution: Vine Linux |
---|
| 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[2689] | 12 | |
---|
[12374] | 13 | License: modified BSD style License |
---|
| 14 | Url: https://memcached.org/ |
---|
| 15 | Source0: http://www.memcached.org/files/memcached-%{version}.tar.gz |
---|
| 16 | Source1: memcached.sysconfig |
---|
[9790] | 17 | # Patches |
---|
[12374] | 18 | Patch1: memcached-unit.patch |
---|
[9790] | 19 | |
---|
[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 プロトコルを使用した開発に必要なファイル |
---|
| 42 | Group: Development/Libraries |
---|
| 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 | |
---|
[521] | 50 | %prep |
---|
[8144] | 51 | %setup -q |
---|
[12374] | 52 | %patch1 -p1 -b .unit |
---|
[521] | 53 | |
---|
[12374] | 54 | %if !%{with systemd} |
---|
[8144] | 55 | perl -pi -e 's|/var/run/memcached\.pid|/var/run/memcached/memcached.pid|' scripts/memcached.sysv |
---|
[12374] | 56 | %endif |
---|
[6075] | 57 | |
---|
[12374] | 58 | |
---|
[521] | 59 | %build |
---|
[12374] | 60 | %configure --enable-tls |
---|
[6075] | 61 | %__make %{?_smp_mflags} |
---|
| 62 | |
---|
[12374] | 63 | |
---|
[521] | 64 | %install |
---|
| 65 | rm -rf %{buildroot} |
---|
| 66 | mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
---|
| 67 | mkdir -p %{buildroot}%{_localstatedir}/run/memcached |
---|
[6075] | 68 | |
---|
[12374] | 69 | make install DESTDIR=%{buildroot} INSTALL="%{__install} -p" |
---|
| 70 | # remove memcached-debug |
---|
| 71 | rm -f %{buildroot}/%{_bindir}/memcached-debug |
---|
[521] | 72 | |
---|
[12374] | 73 | # Perl script for monitoring memcached |
---|
| 74 | install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool |
---|
| 75 | install -Dp -m0644 scripts/memcached-tool.1 \ |
---|
| 76 | %{buildroot}%{_mandir}/man1/memcached-tool.1 |
---|
[521] | 77 | |
---|
[12374] | 78 | %if %{with systemd} |
---|
| 79 | # Unit file |
---|
| 80 | install -Dp -m0644 scripts/memcached.service \ |
---|
| 81 | %{buildroot}%{_unitdir}/memcached.service |
---|
| 82 | %else |
---|
| 83 | mkdir -p %{buildroot}%{_initdir} |
---|
[521] | 84 | install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached |
---|
[12374] | 85 | %endif |
---|
| 86 | # Default configs |
---|
| 87 | install -Dp -m0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} |
---|
[521] | 88 | |
---|
| 89 | |
---|
| 90 | %clean |
---|
| 91 | rm -rf %{buildroot} |
---|
| 92 | |
---|
[12374] | 93 | |
---|
[11861] | 94 | %triggerprein -- memcached < 1.5.0 |
---|
| 95 | /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached ||: |
---|
| 96 | /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached ||: |
---|
| 97 | rm -f %{_bindir}/memcached |
---|
| 98 | |
---|
[12374] | 99 | %pre |
---|
| 100 | getent group memcached >/dev/null || groupadd -r memcached |
---|
| 101 | getent passwd memcached >/dev/null || \ |
---|
| 102 | useradd -r -g memcached -d %{_sysconfdir}/memcached -s /sbin/nologin \ |
---|
| 103 | -c "memcached service" memcached |
---|
| 104 | exit 0 |
---|
| 105 | |
---|
[6075] | 106 | %post |
---|
[12374] | 107 | %if %{with systemd} |
---|
| 108 | %systemd_post memcached.service |
---|
| 109 | %else |
---|
| 110 | /sbin/chkconfig --add %{name} |
---|
| 111 | %endif |
---|
[6075] | 112 | |
---|
[12374] | 113 | %preun |
---|
| 114 | %if %{with systemd} |
---|
| 115 | %systemd_preun memcached.service |
---|
| 116 | %else |
---|
| 117 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
| 118 | /sbin/service %{name} stop >/dev/null 2>&1 |
---|
| 119 | /sbin/chkconfig --del %{name} |
---|
| 120 | fi |
---|
| 121 | %endif |
---|
| 122 | |
---|
| 123 | %postun |
---|
| 124 | %if %{with systemd} |
---|
| 125 | %systemd_postun_with_restart memcached.service |
---|
| 126 | %else |
---|
| 127 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
| 128 | /sbin/service %{name} condrestart ||: |
---|
| 129 | fi |
---|
| 130 | %endif |
---|
| 131 | |
---|
| 132 | |
---|
[521] | 133 | %files |
---|
| 134 | %defattr(-,root,root) |
---|
[12374] | 135 | %license COPYING |
---|
| 136 | %doc AUTHORS* ChangeLog ChangeLog* NEWS README* |
---|
[3293] | 137 | %doc doc/CONTRIBUTORS doc/*.txt |
---|
[521] | 138 | %config(noreplace) %{_sysconfdir}/sysconfig/memcached |
---|
[11861] | 139 | %{_bindir}/memcached |
---|
[521] | 140 | %{_bindir}/memcached-tool |
---|
| 141 | %{_mandir}/man1/memcached.1* |
---|
[12374] | 142 | %{_mandir}/man1/memcached-tool.1* |
---|
| 143 | %if %{with systemd} |
---|
| 144 | %{_unitdir}/memcached.service |
---|
| 145 | %else |
---|
| 146 | %{_initdir}/memcached |
---|
[521] | 147 | %dir %{_localstatedir}/run/memcached |
---|
[12374] | 148 | %endif |
---|
[521] | 149 | |
---|
[2689] | 150 | %files devel |
---|
| 151 | %defattr(-,root,root,0755) |
---|
| 152 | %{_includedir}/memcached/* |
---|
| 153 | |
---|
[521] | 154 | %changelog |
---|
[12374] | 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 | |
---|
[11861] | 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 | |
---|
[9826] | 165 | * Mon Nov 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.25-1 |
---|
| 166 | - new upstream release. |
---|
| 167 | |
---|
[9790] | 168 | * Mon Jul 27 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.24-1 |
---|
| 169 | - new upstream release. |
---|
| 170 | |
---|
[8144] | 171 | * Fri Jan 10 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.17-1 |
---|
| 172 | - new upstream release. |
---|
| 173 | |
---|
[7856] | 174 | * Fri May 11 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-2 |
---|
| 175 | - fixed missing symlink. |
---|
| 176 | |
---|
[6075] | 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 | |
---|
[3293] | 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. |
---|
| 190 | 3-1 |
---|
| 191 | - applied the repcached patch. |
---|
| 192 | |
---|
[2689] | 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 | |
---|
[521] | 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 | |
---|