]>
Commit | Line | Data |
---|---|---|
08a5ce9c JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Env | |
6 | %define pnam C | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: Env::C - Get/Set/Unset Environment Variables on the C level | |
9 | #Summary(pl.UTF-8): | |
10 | Name: perl-Env-C | |
11 | Version: 0.08 | |
0acbb2f3 | 12 | Release: 7 |
08a5ce9c JR |
13 | License: Artistic |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/Env/%{pdir}-%{pnam}-%{version}.tar.gz | |
16 | # Source0-md5: 7ec92518ef99102ed276aaa92fedaaae | |
17 | URL: http://search.cpan.org/dist/Env-C/ | |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | This module provides a Perl API for getenv(3), setenv(3) and | |
24 | unsetenv(3). It also can return all the environ variables. | |
25 | ||
26 | Sometimes Perl invokes modules with underlaying C APIs which rely on | |
27 | certain environment variables to be set, if these variables are set in | |
28 | Perl and the glue code doesn't worry to set them on the C level, these | |
29 | variables might not be seen by the C level. This module shows what | |
30 | really the C level sees. | |
31 | ||
32 | # %description -l pl.UTF-8 | |
33 | # TODO | |
34 | ||
35 | %prep | |
36 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
37 | ||
38 | %build | |
39 | %{__perl} Makefile.PL \ | |
40 | INSTALLDIRS=vendor | |
41 | %{__make} \ | |
42 | CC="%{__cc}" \ | |
43 | OPTIMIZE="%{rpmcflags}" | |
44 | ||
45 | %{?with_tests:%{__make} test} | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %{__make} pure_install \ | |
51 | DESTDIR=$RPM_BUILD_ROOT | |
52 | ||
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %files | |
57 | %defattr(644,root,root,755) | |
58 | %doc Changes README | |
0faf1d23 | 59 | %dir %{perl_vendorarch}/Env |
08a5ce9c | 60 | %{perl_vendorarch}/Env/*.pm |
0faf1d23 | 61 | %dir %{perl_vendorarch}/auto/Env |
08a5ce9c | 62 | %dir %{perl_vendorarch}/auto/Env/C |
08a5ce9c JR |
63 | %attr(755,root,root) %{perl_vendorarch}/auto/Env/C/*.so |
64 | %{_mandir}/man3/* |