/[packages]/cauldron/gearmand/current/SPECS/gearmand.spec
ViewVC logotype

Contents of /cauldron/gearmand/current/SPECS/gearmand.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 404859 - (show annotations) (download)
Sun Mar 24 15:20:47 2013 UTC (11 years ago) by colin
File size: 3800 byte(s)
Add systemd requires and general post/pre fixes (mga#9302)
1 %define enable_tests 0
2
3 %define major 7
4 %define libname %mklibname gearman %{major}
5 %define develname %mklibname gearman -d
6
7 Summary: Gearman Server and C Library
8 Name: gearmand
9 Version: 0.38
10 Release: %mkrel 5
11 License: BSD
12 Group: System/Servers
13 URL: http://www.gearman.org/
14 Source0: http://launchpad.net/gearmand/1.0/%{version}/+download/gearmand-%{version}.tar.gz
15 Source1: gearmand.service
16 Source2: gearmand.sysconfig
17 Source3: gearmand.logrotate
18 Patch0: gearmand-0.38-disable-Werror.patch
19 Requires(post): systemd >= %{systemd_required_version}
20 Requires(post): rpm-helper
21 Requires(preun): rpm-helper
22 Requires(pre): rpm-helper
23 Requires(postun): rpm-helper
24 BuildRequires: boost-devel
25 BuildRequires: doxygen
26 BuildRequires: pkgconfig(libdrizzle)
27 BuildRequires: e2fsprogs-devel
28 BuildRequires: libevent-devel
29 BuildRequires: libmemcached-devel >= 1.0
30 BuildRequires: sqlite3-devel
31 BuildRequires: curl-devel
32 BuildRequires: libuuid-devel
33 BuildRequires: lzmalib-devel
34 BuildRequires: memcached
35 BuildRequires: openssl-devel
36 BuildRequires: postgresql-libs-devel
37 BuildRequires: tokyocabinet-devel
38
39 %description
40 Gearman provides a generic framework to farm out work to other machines,
41 dispatching function calls to machines that are better suited to do work, to do
42 work in parallel, to load balance processing, or to call functions between
43 languages.
44
45
46 %package -n %{libname}
47 Summary: Shared Gearman Client Library
48 Group: System/Libraries
49
50 %description -n %{libname}
51 Gearman provides a generic framework to farm out work to other machines,
52 dispatching function calls to machines that are better suited to do work, to do
53 work in parallel, to load balance processing, or to call functions between
54 languages.
55
56 This package contains the Client Library.
57
58
59 %package -n %{develname}
60 Summary: Development files for the Gearman Server and C Library
61 Group: Development/C
62 Requires: %{libname} = %{version}-%{release}
63 Provides: gearman-devel = %{version}-%{release}
64
65 %description -n %{develname}
66 Development files for the Gearman Server and C Library.
67
68
69 %prep
70 %setup -q
71 %patch0 -p0
72
73 %build
74 autoreconf -fi
75 %configure2_5x \
76 --disable-static
77 %make
78
79 %install
80 %makeinstall_std
81
82 # don't fiddle with the initscript!
83 export DONT_GPRINTIFY=1
84
85 install -d %{buildroot}%{_unitdir}
86 install -d %{buildroot}%{_sysconfdir}/sysconfig
87 install -d %{buildroot}%{_sysconfdir}/logrotate.d
88 install -d %{buildroot}/var/log/%{name}
89
90 install -m0755 %{SOURCE1} %{buildroot}%{_unitdir}
91 install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
92 install -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
93
94 touch %{buildroot}/var/log/%{name}/gearmand.log
95
96 #we don't want these
97 find %{buildroot} -name "*.la" -delete
98
99 mkdir -p %{buildroot}%{_tmpfilesdir}
100 cat <<EOF > %{buildroot}%{_tmpfilesdir}/%{name}.conf
101 d /run/gearmand 0711 gearmand gearmand
102 EOF
103
104 %if %{enable_tests}
105 %check
106 make check
107 %endif
108
109 %pre
110 %_pre_useradd %{name} /dev/null /bin/false
111
112 %postun
113 %_postun_userdel %{name}
114
115 %post
116 %_tmpfilescreate %{name}
117 %create_ghostfile /var/log/%{name}/gearmand.log %{name} %{name} 0640
118 %_post_service %{name}
119
120 %preun
121 %_preun_service %{name}
122
123 %files
124 %{_unitdir}/%{name}.service
125 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
126 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
127 %{_tmpfilesdir}/%{name}.conf
128 %{_bindir}/gearadmin
129 %{_bindir}/gearman
130 %{_sbindir}/gearmand
131 %{_mandir}/man1/gear*
132 %{_mandir}/man8/gear*
133 %attr(0711,%{name},%{name}) %dir /var/log/%{name}
134 %ghost %attr(0640,%{name},%{name}) /var/log/%{name}/gearmand.log
135
136 %files -n %{libname}
137 %doc AUTHORS ChangeLog COPYING README
138 %{_libdir}/lib*.so.%{major}*
139
140 %files -n %{develname}
141 %{_includedir}/libgearman/
142 %{_includedir}/libgearman-1.0/
143 %{_libdir}/lib*.so
144 %{_libdir}/pkgconfig/gearmand.pc
145 %{_mandir}/man3/gear*
146 %{_mandir}/man3/libgearman.3*

  ViewVC Help
Powered by ViewVC 1.1.30