]>
Commit | Line | Data |
---|---|---|
11ead930 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
082218ff | 4 | |
11ead930 | 5 | %define pdir DBIx |
6 | %define pnam MyServer | |
082218ff | 7 | %include /usr/lib/rpm/macros.perl |
11ead930 | 8 | Summary: DBIx::MyServer - Server-side implementation of the MySQL network protocol |
11ead930 | 9 | Name: perl-DBIx-MyServer |
62c4aae6 | 10 | Version: 0.42 |
11ead930 | 11 | Release: 1 |
12 | License: GPL v2 | |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/DBIx/%{pdir}-%{pnam}-%{version}.tar.gz | |
62c4aae6 | 15 | # Source0-md5: 5ee5f09c206aae6af3f10c467c847a63 |
082218ff | 16 | URL: http://search.cpan.org/dist/DBIx-MyServer/ |
11ead930 | 17 | BuildRequires: perl-devel >= 1:5.8.0 |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
11ead930 | 19 | %if %{with tests} |
62c4aae6 | 20 | BuildRequires: perl-DBD-mysql |
21 | BuildRequires: perl-DBI | |
22 | BuildRequires: perl-Digest-SHA1 | |
11ead930 | 23 | %endif |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | This module emulates the server side of the MySQL protocol. This | |
29 | allows you to run your own faux-MySQL servers which can accept | |
30 | commands and queries and reply accordingly. | |
31 | ||
32 | Please see examples/myserver.pl for a system that allows building | |
33 | functional mysql servers that rewrite queries or return arbitary data. | |
34 | ||
11ead930 | 35 | %prep |
36 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
37 | ||
38 | %build | |
39 | %{__perl} Makefile.PL \ | |
40 | INSTALLDIRS=vendor | |
41 | %{__make} | |
42 | ||
43 | %{?with_tests:%{__make} test} | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
11ead930 | 47 | %{__make} pure_install \ |
48 | DESTDIR=$RPM_BUILD_ROOT | |
49 | ||
50 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
082218ff | 51 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
11ead930 | 52 | |
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %files | |
57 | %defattr(644,root,root,755) | |
58 | %doc Changes README | |
59 | %attr(755,root,root) %{_bindir}/myserver.pl | |
60 | %{perl_vendorlib}/DBIx/*.pm | |
61 | %{perl_vendorlib}/DBIx/MyServer | |
62 | %{_mandir}/man1/* | |
63 | %{_mandir}/man3/* | |
64 | %{_examplesdir}/%{name}-%{version} |