]>
Commit | Line | Data |
---|---|---|
4c430311 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
4c430311 | 5 | %define pdir PathTools |
61beee4e | 6 | Summary: Get pathname of current working directory |
d5fea3c0 | 7 | Summary(pl.UTF-8): Pobieranie ścieżki bieżącego katalogu |
4c430311 | 8 | Name: perl-PathTools |
f5badb40 JB |
9 | Version: 3.62 |
10 | Release: 0.1 | |
d433ca12 | 11 | Epoch: 1 |
e58ea473 | 12 | License: GPL v1+ or Artistic |
4c430311 | 13 | Group: Development/Languages/Perl |
f5badb40 JB |
14 | Source0: http://www.cpan.org/modules/by-authors/id/R/RJ/RJBS/%{pdir}-%{version}.tar.gz |
15 | # Source0-md5: bfe148a89064078cf162504c30a4c41a | |
ef4bdb63 | 16 | URL: http://search.cpan.org/dist/PathTools/ |
4c430311 | 17 | BuildRequires: perl-devel >= 1:5.8.0 |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
4c430311 | 19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | PathTools merges Cwd and File::Spec into a single distribution. | |
9bb46b15 JB |
23 | This was done because the two modules use each other fairly |
24 | extensively, and extracting the common stuff into another distribution | |
25 | was deemed nigh-impossible. | |
4c430311 | 26 | |
27 | Cwd provides functions for determining the pathname of the current | |
28 | working directory. It is recommended that getcwd (or another *cwd() | |
29 | function) be used in _all_ code to ensure portability. | |
30 | ||
9bb46b15 JB |
31 | File::Spec is designed to support operations commonly performed on |
32 | file specifications (usually called "file names", but not to be | |
33 | confused with the contents of a file, or Perl's file handles), such as | |
34 | concatenating several directory and file names into a single path, or | |
35 | determining whether a path is rooted. | |
4c430311 | 36 | |
ee7f189f JR |
37 | %description -l pl.UTF-8 |
38 | PathTools łączy Cwd i File::Spec w jeden pakiet. Został zrobiony | |
39 | ponieważ te dwa moduły używają intensywnie siebie nawzajem i | |
40 | wyciągnięcie wspólnego kodu do oddzielnego pakietu zostało uznane za | |
41 | prawie niemożliwe. | |
61beee4e | 42 | |
ee7f189f JR |
43 | Cwd dostarcza funkcje do określania ścieżki bieżącego katalogu. |
44 | Zalecane jest używanie getcwd (lub innej funkcji *cwd()) w _całym_ | |
45 | kodzie dla zapewnienia przenośności. | |
61beee4e | 46 | |
ee7f189f JR |
47 | File::Spec jest zaprojektowany do obsługi operacji zwykle |
48 | przeprowadzanych na określeniach plików (zwykle nazywanych "nazwami | |
49 | plików", których nie należy mylić z zawartością plików czy perlowymi | |
50 | uchwytami plików), takich jak łączenie kilku katalogów i nazw plików w | |
51 | pojedynczą ścieżkę albo określanie czy ścieżka jest podana względem | |
52 | głównego katalogu. | |
4c430311 | 53 | |
54 | %prep | |
55 | %setup -q -n %{pdir}-%{version} | |
56 | ||
57 | %build | |
58 | %{__perl} Makefile.PL \ | |
59 | INSTALLDIRS=vendor | |
60 | %{__make} \ | |
d424feaa | 61 | CC="%{__cc}" \ |
4c430311 | 62 | OPTIMIZE="%{rpmcflags}" |
63 | ||
64 | %{?with_tests:%{__make} test} | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %{__make} install \ | |
70 | DESTDIR=$RPM_BUILD_ROOT | |
71 | ||
9bb46b15 | 72 | %{__rm} $RPM_BUILD_ROOT{%{perl_vendorarch}/File/Spec/,%{_mandir}/man3/File::Spec::}{Cygwin,Epoc,Mac,OS2,VMS,Win32}* |
e58ea473 | 73 | |
4c430311 | 74 | %clean |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
9bb46b15 JB |
79 | %doc Changes README |
80 | %{perl_vendorarch}/Cwd.pm | |
81 | %{perl_vendorarch}/File/Spec.pm | |
82 | %{perl_vendorarch}/File/Spec | |
4c430311 | 83 | %dir %{perl_vendorarch}/auto/Cwd |
9bb46b15 JB |
84 | %attr(755,root,root) %{perl_vendorarch}/auto/Cwd/Cwd.so |
85 | %{_mandir}/man3/Cwd.3pm* | |
86 | %{_mandir}/man3/File::Spec*.3pm* |