]>
Commit | Line | Data |
---|---|---|
e9d4915a | 1 | # |
2 | # Conditional build: | |
3 | # _with_tests - perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Device | |
7 | %define pnam SerialPort | |
8 | Summary: Device::SerialPort - Linux/POSIX emulation of Win32::SerialPort functions. | |
9 | #Summary(pl): | |
10 | Name: perl-Device-SerialPort | |
11 | Version: 0.12 | |
12 | Release: 1 | |
13 | License: GPL/Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz | |
16 | BuildRequires: perl >= 5.6.1-57 | |
17 | BuildRequires: rpm-perlprov >= 3.0.3-26 | |
18 | BuildArch: noarch | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
22 | This module provides an object-based user interface essentially identical | |
23 | to the one provided by the Win32::SerialPort module. | |
24 | ||
25 | # %description -l pl | |
26 | # TODO | |
27 | ||
28 | %prep | |
29 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
30 | ||
31 | %build | |
32 | perl Makefile.PL | |
33 | %{__make} | |
34 | ||
35 | %{?_with_tests:%{__make} test} | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | ||
40 | %{__make} install DESTDIR=$RPM_BUILD_ROOT | |
41 | ||
42 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
43 | cp -a eg/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
44 | ||
45 | %clean | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %files | |
49 | %defattr(644,root,root,755) | |
50 | %doc Change* README TODO | |
51 | %{perl_sitelib}/%{pdir}/*.pm | |
52 | %{_examplesdir}/%{name}-%{version} | |
53 | %{_mandir}/man3/* |