]> git.pld-linux.org Git - packages/mysql-udf-preg.git/blame - mysql-udf-preg.spec
install to mysql plugin dir where mysql expects them
[packages/mysql-udf-preg.git] / mysql-udf-preg.spec
CommitLineData
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?)
6Summary: MySQL UDF interface to PCRE
7Name: mysql-udf-preg
fac0e290
ER
8Version: 1.2
9Release: 0.rc2.1
7cab5b5a
ER
10License: GPL v3
11Group: Applications/Databases
fac0e290
ER
12Source0: https://github.com/mysqludf/lib_mysqludf_preg/archive/lib_mysqludf_preg-%{version}-rc2.tar.gz
13# Source0-md5: 19641dc644573c4863937444fcc09f62
14URL: https://github.com/mysqludf/lib_mysqludf_preg
7cab5b5a
ER
15BuildRequires: mysql-devel
16BuildRequires: pcre-devel
17Requires: mysql
18BuildRoot: %{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
26MySQL UDF interface to the PCRE (Perl Compatible Regular Expressions)
27library for pattern matching.
28
29The PCRE library is a set of functions that implement regular
30expression pattern matching using the same syntax and semantics as
31Perl 5. This syntax can often handle more complex expressions and
32capturing than standard regular expression implementations.
33
34lib_mysqludf_preg is a useful performance optimization for those
35applications that are already performing these regular expression
36matches in a high level language (i. e. PHP) on the client side. It is
37also helpful when there is a need to capture a parenthesized
38subexpression from a regular expression, or simply as a slight
39performance 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
50rm -rf $RPM_BUILD_ROOT
51%{__make} install \
72f1a226 52 libdir=%{plugindir} \
7cab5b5a
ER
53 DESTDIR=$RPM_BUILD_ROOT
54
72f1a226 55rm $RPM_BUILD_ROOT%{plugindir}/lib_mysqludf_preg.la
7cab5b5a
ER
56
57%clean
58rm -rf $RPM_BUILD_ROOT
59
3c1a4111
ER
60%post
61if [ "$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
71fi
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
This page took 0.10149 seconds and 4 git commands to generate.