]>
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 |
d433ca12 | 10 | Version: 3.30 |
11 | Release: 1 | |
12 | Epoch: 1 | |
e58ea473 | 13 | License: GPL v1+ or Artistic |
4c430311 | 14 | Group: Development/Languages/Perl |
d433ca12 | 15 | Source0: http://www.cpan.org/modules/by-authors/id/S/SM/SMUELLER/%{pdir}-%{version}.tar.gz |
16 | # Source0-md5: 18a72d6a66bb62ce9bbb422dfa41181a | |
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. | |
24 | This was done because the two modules use each other fairly extensively, | |
25 | and extracting the common stuff into another distribution was deemed | |
26 | nigh-impossible. | |
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 | ||
32 | File::Spec is designed to support operations commonly performed on file | |
33 | specifications (usually called "file names", but not to be confused with | |
34 | the contents of a file, or Perl's file handles), such as concatenating | |
35 | several directory and file names into a single path, or determining | |
36 | whether a path is rooted. | |
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 | ||
e58ea473 | 73 | rm -f $RPM_BUILD_ROOT{%{perl_vendorarch}/File/Spec/,%{_mandir}/man3/File::Spec::}{Cygwin,Epoc,Mac,OS2,VMS,Win32}* |
74 | ||
4c430311 | 75 | %clean |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc Changes | |
81 | %{perl_vendorarch}/*.pm | |
82 | %{perl_vendorarch}/File/Spec* | |
83 | %dir %{perl_vendorarch}/auto/Cwd | |
84 | %{perl_vendorarch}/auto/Cwd/*.bs | |
85 | %attr(755,root,root) %{perl_vendorarch}/auto/Cwd/*.so | |
86 | %{_mandir}/man3/* |