]>
Commit | Line | Data |
---|---|---|
6a2699c3 AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
6a2699c3 AM |
5 | %define pdir File |
6 | %define pnam chdir | |
7 | Summary: File::chdir - a more sensible way to change directories | |
ad95a959 | 8 | Summary(pl.UTF-8): File::chdir - rozsądniejszy sposób zmiany katalogów |
6a2699c3 | 9 | Name: perl-File-chdir |
5e9d73fd | 10 | Version: 0.1010 |
6a2699c3 AM |
11 | Release: 1 |
12 | License: GPL v1+ or Artistic | |
13 | Group: Development/Languages/Perl | |
e94e89bd | 14 | Source0: http://www.cpan.org/modules/by-module/File/%{pdir}-%{pnam}-%{version}.tar.gz |
5e9d73fd | 15 | # Source0-md5: aacfafa4a8f13d45be67451e0f9b483e |
f5224c25 | 16 | URL: https://metacpan.org/release/File-chdir |
6a2699c3 | 17 | BuildRequires: perl-devel >= 1:5.8.0 |
b3ea2bb3 JB |
18 | BuildRequires: rpm-perlprov >= 4.1-13 |
19 | BuildRequires: rpmbuild(macros) >= 1.745 | |
6a2699c3 AM |
20 | BuildArch: noarch |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | File::chdir module - a more sensible way to change directories. | |
25 | ||
bca3fdbe JB |
26 | Perl's chdir() has the unfortunate problem of being very, very, very |
27 | global. If any part of your program calls chdir() or if any library | |
28 | you use calls chdir(), it changes the current working directory for | |
29 | the whole program. | |
6a2699c3 | 30 | |
bca3fdbe JB |
31 | File::chdir gives you an alternative, $CWD and @CWD. These two |
32 | variables combine all the power of chdir(), File::Spec and Cwd. | |
33 | ||
2c110498 JR |
34 | %description -l pl.UTF-8 |
35 | Moduł File::chdir - rozsądniejszy sposób zmiany katalogów. | |
bca3fdbe | 36 | |
2c110498 JR |
37 | Perlowa funkcja chdir() jest problematyczna, ponieważ działa bardzo, |
38 | bardzo, bardzo globalnie. Jeśli dowolna część programu lub dowolna | |
39 | używana biblioteka wywoła chdir(), zmienia się bieżący katalog dla | |
40 | całego programu. | |
bca3fdbe | 41 | |
2c110498 JR |
42 | File::chdir daje alternatywę - $CWD i @CWD. Te dwie zmienne łączą całą |
43 | potęgę chdir(), File::Spec i Cwd. | |
6a2699c3 AM |
44 | |
45 | %prep | |
46 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
47 | ||
48 | %build | |
49 | %{__perl} Makefile.PL \ | |
50 | INSTALLDIRS=vendor | |
51 | %{__make} | |
52 | ||
53 | %{?with_tests:%{__make} test} | |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %{__make} install \ | |
59 | DESTDIR=$RPM_BUILD_ROOT | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc Changes | |
67 | %{perl_vendorlib}/File/chdir.pm | |
f5224c25 | 68 | %{_mandir}/man3/File::chdir.3pm* |