]>
Commit | Line | Data |
---|---|---|
7cab5b5a ER |
1 | # TODO |
2 | # - i've installed .so to %{_libdir} because straced mysqld searched | |
3 | # same path as dlopen() would do (/lib:/lib/tls:/usr/lib). perhaps | |
4 | # %{_libdir}/mysql would be more appropriate (but then need to | |
5 | # insert .so with full path? patch mysqld?) | |
6 | Summary: MySQL UDF interface to PCRE | |
7 | Name: mysql-udf-preg | |
fac0e290 ER |
8 | Version: 1.2 |
9 | Release: 0.rc2.1 | |
7cab5b5a ER |
10 | License: GPL v3 |
11 | Group: Applications/Databases | |
fac0e290 ER |
12 | Source0: https://github.com/mysqludf/lib_mysqludf_preg/archive/lib_mysqludf_preg-%{version}-rc2.tar.gz |
13 | # Source0-md5: 19641dc644573c4863937444fcc09f62 | |
14 | URL: https://github.com/mysqludf/lib_mysqludf_preg | |
7cab5b5a ER |
15 | BuildRequires: mysql-devel |
16 | BuildRequires: pcre-devel | |
17 | Requires: mysql | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
72f1a226 ER |
20 | %define plugindir %{_libdir}/mysql/plugin |
21 | ||
4a00667f | 22 | # bug in configure makes it check for CXX if CXX is passed |
23 | %undefine __cxx | |
24 | ||
7cab5b5a ER |
25 | %description |
26 | MySQL UDF interface to the PCRE (Perl Compatible Regular Expressions) | |
27 | library for pattern matching. | |
28 | ||
29 | The PCRE library is a set of functions that implement regular | |
30 | expression pattern matching using the same syntax and semantics as | |
31 | Perl 5. This syntax can often handle more complex expressions and | |
32 | capturing than standard regular expression implementations. | |
33 | ||
34 | lib_mysqludf_preg is a useful performance optimization for those | |
35 | applications that are already performing these regular expression | |
36 | matches in a high level language (i. e. PHP) on the client side. It is | |
37 | also helpful when there is a need to capture a parenthesized | |
38 | subexpression from a regular expression, or simply as a slight | |
39 | performance boost over the builtin RLIKE/REGEXP functions. | |
40 | ||
41 | %prep | |
fac0e290 | 42 | %setup -q -n lib_mysqludf_preg-lib_mysqludf_preg-%{version}-rc2 |
7cab5b5a ER |
43 | |
44 | %build | |
45 | %configure \ | |
46 | --disable-static | |
47 | %{__make} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | %{__make} install \ | |
72f1a226 | 52 | libdir=%{plugindir} \ |
7cab5b5a ER |
53 | DESTDIR=$RPM_BUILD_ROOT |
54 | ||
72f1a226 | 55 | rm $RPM_BUILD_ROOT%{plugindir}/lib_mysqludf_preg.la |
7cab5b5a ER |
56 | |
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
3c1a4111 ER |
60 | %post |
61 | if [ "$1" = 1 ]; then | |
62 | %banner -e %{name} <<-'EOF' | |
63 | To actually use the functions execute on your MySQL instances: | |
64 | ||
65 | zcat %{_docdir}/%{name}-%{version}/installdb.sql.gz | mysql | |
66 | ||
67 | To remove the functions: | |
68 | zcat %{_docdir}/%{name}-%{version}/uninstalldb.sql.gz | mysql | |
69 | ||
70 | EOF | |
71 | fi | |
72 | ||
7cab5b5a ER |
73 | %files |
74 | %defattr(644,root,root,755) | |
fac0e290 | 75 | %doc README.md AUTHORS ChangeLog INSTALL |
7cab5b5a | 76 | %doc installdb.sql uninstalldb.sql |
72f1a226 | 77 | %attr(755,root,root) %{plugindir}/lib_mysqludf_preg.so |