]> git.pld-linux.org Git - packages/mysql-udf-preg.git/blob - mysql-udf-preg.spec
36654c7bdee6c8d0add966d598ab2a390ed03738
[packages/mysql-udf-preg.git] / mysql-udf-preg.spec
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
8 Version:        1.2
9 Release:        0.rc2.1
10 License:        GPL v3
11 Group:          Applications/Databases
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
15 BuildRequires:  mysql-devel
16 BuildRequires:  pcre-devel
17 Requires:       mysql
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 # bug in configure makes it check for CXX if CXX is passed
21 %undefine       __cxx
22
23 %description
24 MySQL UDF interface to the PCRE (Perl Compatible Regular Expressions)
25 library for pattern matching.
26
27 The PCRE library is a set of functions that implement regular
28 expression pattern matching using the same syntax and semantics as
29 Perl 5. This syntax can often handle more complex expressions and
30 capturing than standard regular expression implementations.
31
32 lib_mysqludf_preg is a useful performance optimization for those
33 applications that are already performing these regular expression
34 matches in a high level language (i. e. PHP) on the client side. It is
35 also helpful when there is a need to capture a parenthesized
36 subexpression from a regular expression, or simply as a slight
37 performance boost over the builtin RLIKE/REGEXP functions.
38
39 %prep
40 %setup -q -n lib_mysqludf_preg-lib_mysqludf_preg-%{version}-rc2
41
42 %build
43 %configure \
44         --disable-static
45 %{__make}
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 %{__make} install \
50         DESTDIR=$RPM_BUILD_ROOT
51
52 rm $RPM_BUILD_ROOT%{_libdir}/lib_mysqludf_preg.la
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %post
58 if [ "$1" = 1 ]; then
59         %banner -e %{name} <<-'EOF'
60         To actually use the functions execute on your MySQL instances:
61
62         zcat %{_docdir}/%{name}-%{version}/installdb.sql.gz | mysql
63
64         To remove the functions:
65         zcat %{_docdir}/%{name}-%{version}/uninstalldb.sql.gz | mysql
66
67         EOF
68 fi
69
70 %files
71 %defattr(644,root,root,755)
72 %doc README.md AUTHORS ChangeLog INSTALL
73 %doc installdb.sql uninstalldb.sql
74 %attr(755,root,root) %{_libdir}/lib_mysqludf_preg.so
This page took 0.102023 seconds and 2 git commands to generate.