]>
Commit | Line | Data |
---|---|---|
16fdc018 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
f2aef37e | 4 | # |
96a90fc7 | 5 | %define pdir ExtUtils |
6 | %define pnam XSBuilder | |
a836cd62 | 7 | Summary: ExtUtils::XSBuilder - automatic XS glue code generation |
3ad77958 | 8 | Summary(pl.UTF-8): ExtUtils::XSBuilder - automatyczne generowanie kodu łączącego XS |
16fdc018 | 9 | Name: perl-ExtUtils-XSBuilder |
12f59be8 | 10 | Version: 0.28 |
11 | Release: 1 | |
16fdc018 | 12 | License: GPL or Artistic |
13 | Group: Development/Languages/Perl | |
26e78e43 | 14 | Source0: http://www.cpan.org/modules/by-module/ExtUtils/%{pdir}-%{pnam}-%{version}.tar.gz |
12f59be8 | 15 | # Source0-md5: 1d33ddeacc01426a02e23c71c2e4cd04 |
8a7dbcd0 | 16 | URL: https://metacpan.org/dist/ExtUtils-XSBuilder |
16fdc018 | 17 | BuildRequires: perl-devel >= 1:5.8.0 |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
383add4e | 19 | BuildRequires: rpmbuild(macros) >= 1.745 |
26e78e43 JB |
20 | %if %{with tests} |
21 | BuildRequires: perl-Tie-IxHash | |
22 | %endif | |
1884f209 | 23 | Requires: perl-Tie-IxHash |
16fdc018 | 24 | BuildArch: noarch |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
f2aef37e JB |
28 | ExtUtils::XSBuilder is a set modules to parse C header files and |
29 | create XS glue code and documentation out of it. Idealy this allows to | |
30 | "write" an interface to a C library without coding a line. Since no | |
31 | C-API is ideal, some adjuments are necessary most of the time. So to | |
32 | use this module you must still be familar with C and XS programming, | |
33 | but it removes a lot of stupid work and copy&paste from you. Also when | |
34 | the C API changes, most of the time you only have to rerun XSBuilder | |
35 | to get your new Perl API. | |
36 | ||
756b8908 JR |
37 | %description -l pl.UTF-8 |
38 | ExtUtils::XSBuilder to zbiór modułów do analizy plików nagłówkowych C | |
39 | i tworzenia z nich kodu łączącego XS oraz dokumentacji. W idealnej | |
f2aef37e | 40 | sytuacji pozwala to na "napisanie" interfejsu do biblioteki C bez |
756b8908 JR |
41 | kodowania ani jednej linii. Ale jako że żadne API w C nie jest |
42 | idealne, w większości przypadków potrzebne są pewne poprawki - tak | |
43 | więc aby używać tego modułu nadal trzeba znać się na programowaniu w C | |
44 | oraz XS, ale zapobiega on dużej ilości głupiej pracy i copy-paste. | |
45 | Także kiedy API w C się zmienia, większość roboty to ponowne | |
f2aef37e | 46 | uruchomienie XSBuildera dla uzyskania nowego perlowego API. |
16fdc018 | 47 | |
48 | %prep | |
49 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
50 | ||
51 | %build | |
52 | %{__perl} Makefile.PL \ | |
53 | INSTALLDIRS=vendor | |
54 | ||
55 | %{__make} | |
56 | ||
57 | %{?with_tests:%{__make} test} | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %{__make} install \ | |
63 | DESTDIR=$RPM_BUILD_ROOT | |
64 | ||
26e78e43 JB |
65 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/ExtUtils/*.pod |
66 | ||
16fdc018 | 67 | %clean |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc Changes README | |
73 | %{perl_vendorlib}/ExtUtils/XSBuilder.pm | |
f2aef37e | 74 | %{perl_vendorlib}/ExtUtils/XSBuilder |
26e78e43 JB |
75 | %{_mandir}/man3/ExtUtils::XSBuilder*.3pm* |
76 | %{_mandir}/man3/ExtUtils::xsbuilder.osc2002.3pm* |