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