]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # don't perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Algorithm | |
7 | %define pnam SVM | |
8 | Summary: Perl bindings for the libsvm Support Vector Machine library | |
9 | Summary(pl.UTF-8): Dowiązania Perla do biblioteki libsvm (Support Vector Machine) | |
10 | Name: perl-Algorithm-SVM | |
11 | Version: 0.13 | |
12 | Release: 5 | |
13 | # same as perl | |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
16 | Source0: http://www.cpan.org/modules/by-module/Algorithm/%{pdir}-%{pnam}-%{version}.tar.gz | |
17 | # Source0-md5: 276ec1b341e05aa4c0353685f32ea4d5 | |
18 | URL: http://search.cpan.org/dist/Algorithm-SVM/ | |
19 | BuildRequires: libstdc++-devel | |
20 | BuildRequires: perl-devel >= 1:5.8.0 | |
21 | BuildRequires: rpm-perlprov >= 4.1-13 | |
22 | BuildRequires: sed >= 4.0 | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Algorithm::SVM implements a Support Vector Machine for Perl. Support | |
27 | Vector Machines provide a method for creating classification functions | |
28 | from a set of labeled training data, from which predictions can be | |
29 | made for subsequent data sets. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Moduł Algorithm::SVM jest implementacją Support Vector Machine dla | |
33 | Perla. Support Vector Machines udostępniają sposób tworzenia funkcji | |
34 | klasyfikujących ze zbioru oznaczonych danych treningowych, z których | |
35 | można dokonywać przewidywań co do kolejnych zbiorów danych. | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
39 | ||
40 | %{__sed} -i -e 's/#include <errno.h>/#include <errno.h>\n#include <stdlib.h>\n#include <string.h>/g' bindings.cpp | |
41 | ||
42 | %build | |
43 | %{__perl} Makefile.PL \ | |
44 | CCFLAGS="%{rpmcflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \ | |
45 | INSTALLDIRS=vendor | |
46 | ||
47 | # cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ | |
48 | %{__sed} -i -e 's/-Wdeclaration-after-statement//' Makefile | |
49 | ||
50 | %{__make} \ | |
51 | CC="%{__cxx}" \ | |
52 | OPTIMIZE="%{rpmcxxflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" | |
53 | ||
54 | %{?with_tests:%{__make} test} | |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %{__make} install \ | |
60 | DESTDIR=$RPM_BUILD_ROOT | |
61 | ||
62 | rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod | |
63 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Algorithm/SVM/.packlist | |
64 | ||
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %doc Changes README | |
71 | %{perl_vendorarch}/Algorithm/*.pm | |
72 | %{perl_vendorarch}/Algorithm/SVM | |
73 | %dir %{perl_vendorarch}/auto/Algorithm/SVM | |
74 | %{perl_vendorarch}/auto/Algorithm/SVM/*.bs | |
75 | %{perl_vendorarch}/auto/Algorithm/SVM/*.ix | |
76 | %attr(755,root,root) %{perl_vendorarch}/auto/Algorithm/SVM/*.so | |
77 | %{_mandir}/man3/* |