]>
Commit | Line | Data |
---|---|---|
6d8a028d | 1 | # TODO |
eef7e2b5 ER |
2 | # - prefix bin-commands with drizzle |
3 | # - changing paths (non-user stuff to sbindir) | |
de742cda | 4 | # - logrotate |
c13dbbfa ER |
5 | Summary: A Lightweight SQL Database for Cloud and Web |
6 | Name: drizzle | |
cbf6f0e7 | 7 | Version: 7.0.0 |
8b77fe3b | 8 | Release: 0.11 |
c13dbbfa ER |
9 | License: GPL v2 |
10 | Group: Applications/Databases | |
11 | Source0: %{name}.tar.bz2 | |
8b77fe3b | 12 | # Source0-md5: 0749fa072ec090f228e940cd34bbee13 |
cbf6f0e7 ER |
13 | Source1: %{name}.init |
14 | Source2: %{name}d.conf | |
eef7e2b5 | 15 | Patch0: %{name}-bools.patch |
c13dbbfa ER |
16 | URL: https://launchpad.net/drizzle |
17 | BuildRequires: autoconf | |
18 | BuildRequires: automake | |
5fe7cb81 | 19 | BuildRequires: gettext-tools |
cbf6f0e7 | 20 | BuildRequires: libevent-devel |
c13dbbfa ER |
21 | BuildRequires: libstdc++-devel |
22 | BuildRequires: libtool | |
de742cda | 23 | BuildRequires: libuuid-devel |
cbf6f0e7 | 24 | BuildRequires: pcre-devel |
2edbb0d5 ER |
25 | BuildRequires: protobuf |
26 | BuildRequires: protobuf-devel | |
cbf6f0e7 ER |
27 | BuildRequires: readline-devel |
28 | BuildRequires: zlib-devel | |
29 | Requires(post,preun): /sbin/chkconfig | |
30 | Requires(postun): /usr/sbin/groupdel | |
31 | Requires(postun): /usr/sbin/userdel | |
32 | Requires(pre): /bin/id | |
33 | Requires(pre): /usr/bin/getgid | |
34 | Requires(pre): /usr/sbin/groupadd | |
35 | Requires(pre): /usr/sbin/useradd | |
de742cda | 36 | Requires: %{name}-libs = %{version}-%{release} |
cbf6f0e7 ER |
37 | Requires: rc-scripts |
38 | Provides: group(drizzle) | |
39 | Provides: user(drizzle) | |
c13dbbfa ER |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
43 | The Drizzle project is building a database optimized for Cloud and Net | |
44 | applications. It is being designed for massive concurrency on modern | |
45 | multi-cpu/core architecture. The code is originally derived from | |
46 | MySQL. | |
47 | ||
48 | The project is focused on making a database that is: | |
49 | - Reliable | |
50 | - Fast and scalable on modern architecture | |
51 | - Simply design for ease of installation and management | |
52 | ||
6d8a028d ER |
53 | %package client |
54 | Summary: Drizzle - Client | |
55 | Group: Applications/Databases | |
56 | Requires: %{name}-libs = %{version}-%{release} | |
57 | ||
58 | %description client | |
59 | This package contains the standard Drizzle clients. | |
60 | ||
61 | %package libs | |
62 | Summary: Shared libraries for Drizzle | |
63 | Group: Libraries | |
64 | ||
65 | %description libs | |
66 | Shared libraries for Drizzle. | |
67 | ||
68 | %package devel | |
69 | Summary: Drizzle - Development header files and libraries | |
70 | Group: Development/Libraries | |
71 | Requires: %{name}-libs = %{version}-%{release} | |
72 | ||
73 | %description devel | |
74 | This package contains the development header files and libraries | |
75 | necessary to develop Drizzle client applications. | |
76 | ||
c13dbbfa ER |
77 | %prep |
78 | %setup -q -n %{name} | |
6c00cc58 | 79 | %patch0 -p1 |
c13dbbfa ER |
80 | |
81 | %build | |
6c00cc58 ER |
82 | %{__gettextize} |
83 | %{__libtoolize} | |
2edbb0d5 ER |
84 | %{__aclocal} -I m4 |
85 | %{__autoheader} | |
86 | %{__automake} | |
87 | %{__autoconf} | |
6d8a028d ER |
88 | %configure \ |
89 | --disable-static | |
c13dbbfa ER |
90 | %{__make} |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
cbf6f0e7 ER |
94 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,drizzle} \ |
95 | $RPM_BUILD_ROOT/var/{log/{archive,}/drizzle,lib/drizzle} \ | |
c13dbbfa ER |
96 | |
97 | %{__make} install \ | |
98 | DESTDIR=$RPM_BUILD_ROOT | |
99 | ||
6d8a028d ER |
100 | %find_lang %{name} |
101 | ||
cbf6f0e7 ER |
102 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/drizzle |
103 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/drizzle/drizzled.conf | |
104 | ||
105 | # am offers no way to install without .la (other than hook to rm -f) | |
106 | rm -f $RPM_BUILD_ROOT%{_libdir}/drizzle/plugin/*.la | |
107 | ||
108 | # we have our own better ones | |
8b77fe3b ER |
109 | rm $RPM_BUILD_ROOT%{_datadir}/drizzle/{drizzle-log-rotate,drizzle.server} |
110 | rm $RPM_BUILD_ROOT%{_bindir}/drizzled_safe | |
111 | rm $RPM_BUILD_ROOT%{_bindir}/my_print_defaults | |
112 | rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid | |
de742cda | 113 | |
cbf6f0e7 | 114 | # not useful |
8b77fe3b | 115 | rm $RPM_BUILD_ROOT%{_libdir}/drizzle/plugin/libhello_world.so |
cbf6f0e7 | 116 | |
c13dbbfa ER |
117 | %clean |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
6d8a028d ER |
120 | %post libs -p /sbin/ldconfig |
121 | %postun libs -p /sbin/ldconfig | |
122 | ||
cbf6f0e7 ER |
123 | %pre |
124 | %groupadd -g 231 drizzle | |
125 | %useradd -u 231 -d /var/lib/drizzle -s /bin/sh -g drizzle -c "Drizzle Server" drizzle | |
126 | ||
127 | %post | |
128 | /sbin/chkconfig --add drizzle | |
129 | %service drizzle restart | |
130 | ||
131 | %preun | |
132 | if [ "$1" = "0" ]; then | |
133 | %service -q mysql drizzle | |
134 | /sbin/chkconfig --del drizzle | |
135 | fi | |
136 | ||
137 | %postun | |
138 | if [ "$1" = "0" ]; then | |
139 | %userremove drizzle | |
140 | %groupremove drizzle | |
141 | fi | |
142 | ||
c13dbbfa ER |
143 | %files |
144 | %defattr(644,root,root,755) | |
6d8a028d ER |
145 | %doc AUTHORS DRIZZLE.FAQ |
146 | %attr(755,root,root) %{_sbindir}/drizzled | |
cbf6f0e7 ER |
147 | %attr(754,root,root) /etc/rc.d/init.d/drizzle |
148 | ||
149 | %dir %{_sysconfdir}/drizzle | |
150 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drizzle/drizzled.conf | |
151 | ||
6d8a028d ER |
152 | %dir %{_libdir}/drizzle |
153 | %dir %{_libdir}/drizzle/plugin | |
154 | %attr(755,root,root) %{_libdir}/drizzle/plugin/ha_blackhole.so | |
6d8a028d | 155 | %attr(755,root,root) %{_libdir}/drizzle/plugin/libauth_pam.so |
6d8a028d | 156 | %attr(755,root,root) %{_libdir}/drizzle/plugin/liberrmsg_stderr.so |
6d8a028d | 157 | %attr(755,root,root) %{_libdir}/drizzle/plugin/liblogging_query.so |
6d8a028d | 158 | %attr(755,root,root) %{_libdir}/drizzle/plugin/libmd5udf.so |
6d8a028d | 159 | |
cbf6f0e7 ER |
160 | %attr(771,root,drizzle) /var/lib/drizzle |
161 | %attr(750,root,drizzle) %dir /var/log/drizzle | |
162 | %attr(750,root,root) %dir /var/log/archive/drizzle | |
6d8a028d ER |
163 | |
164 | %files libs | |
165 | %defattr(644,root,root,755) | |
166 | %attr(755,root,root) %ghost %{_libdir}/libdrizzle.so.1 | |
167 | %attr(755,root,root) %{_libdir}/libdrizzle.so.*.*.* | |
168 | ||
169 | %files client -f %{name}.lang | |
170 | %defattr(644,root,root,755) | |
6d8a028d ER |
171 | %attr(755,root,root) %{_bindir}/drizzle |
172 | %attr(755,root,root) %{_bindir}/drizzleadmin | |
173 | %attr(755,root,root) %{_bindir}/drizzlecheck | |
6d8a028d ER |
174 | %attr(755,root,root) %{_bindir}/drizzledump |
175 | %attr(755,root,root) %{_bindir}/drizzledumpslow | |
176 | %attr(755,root,root) %{_bindir}/drizzleimport | |
177 | %attr(755,root,root) %{_bindir}/drizzleslap | |
178 | %attr(755,root,root) %{_bindir}/drizzletest | |
6d8a028d | 179 | |
de742cda | 180 | # likely mysql pkg collisions |
6d8a028d | 181 | %attr(755,root,root) %{_bindir}/myisamchk |
de742cda | 182 | %attr(755,root,root) %{_bindir}/innochecksum |
6d8a028d ER |
183 | |
184 | %files devel | |
185 | %defattr(644,root,root,755) | |
186 | %{_includedir}/drizzled | |
187 | %{_includedir}/libdrizzle | |
6d8a028d ER |
188 | %{_pkgconfigdir}/libdrizzle.pc |
189 | %{_aclocaldir}/drizzle.m4 | |
6d8a028d ER |
190 | %{_libdir}/libdrizzle.la |
191 | %{_libdir}/libdrizzle.so | |
de742cda ER |
192 | |
193 | # likely mysql-devel collisions | |
194 | %{_includedir}/mystrings | |
195 | %{_includedir}/mysys |