3 %bcond_without tests # do not perform "make test"
7 Summary: File::ShareDir - Locate per-dist and per-module shared files
8 Summary(pl.UTF-8): File::ShareDir - położenie plików współdzielonych w dystrybucji i module
9 Name: perl-File-ShareDir
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/File/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: f2a0eee9f04c93753dd56437175e5bda
17 URL: https://metacpan.org/release/File-ShareDir
18 BuildRequires: perl-devel >= 1:5.8.1
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl(File::Path) >= 2.08
22 BuildRequires: perl(File::Spec) >= 0.80
23 BuildRequires: perl-Class-Inspector >= 1.12
24 BuildRequires: perl-File-ShareDir-Install >= 0.13
25 BuildRequires: perl-Params-Util >= 0.07
26 BuildRequires: perl-Test-Simple >= 0.90
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 The intent of File::ShareDir is to provide a companion to
33 Class::Inspector and File::HomeDir, modules that take a process that
34 is well-known by advanced Perl developers but gets a little tricky,
35 and make it more available to the larger Perl community.
37 Quite often you want or need your Perl module (CPAN or otherwise) to
38 have access to a large amount of read-only data that is stored on the
39 file-system at run-time.
41 On a Linux-like system, this would be in a place such as /usr/share,
42 however Perl runs on a wide variety of different systems, and so the
43 use of any one location is unreliable.
45 Perl provides a little-known method for doing this, but almost nobody
46 is aware that it exists. As a result, module authors often go through
47 some very strange ways to make the data available to their code.
49 %description -l pl.UTF-8
50 Celem File::ShareDir jest zapewnienie modułu towarzyszącego modułom
51 Class::Inspector oraz File::HomeDir (wykonujących zadania dobrze znane
52 zaawansowanym programistom Perla, ale wymagających sztuczek), będącego
53 bardziej przystępnym dla społeczności Perla.
55 Często istnieje potrzeba, aby moduł Perla (z CPAN lub innego źródła)
56 miał dostęp do dużych ilości danych tylko do odczytu, przechowywanych
59 Na systemach linuksowych takie dane zwykle znajdują się miejscu typu
60 /usr/share, ale Perla działa na wielu różnych systemach i użycie
61 jednego miejsca nie jest wiarygodne.
63 Perl udostępnia w takim celu mało znaną metodę, ale mało kto o niej
64 wie. W efekcie autorzy modułów w różny dziwny sposób sprawiają, by ich
65 dane były dostępne dla kodu.
68 %setup -q -n %{pdir}-%{pnam}-%{version}
71 %{__perl} Makefile.PL \
75 %{?with_tests:%{__make} test}
78 rm -rf $RPM_BUILD_ROOT
80 %{__make} pure_install \
81 DESTDIR=$RPM_BUILD_ROOT
83 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/auto/share/{dist/File-ShareDir/{sample.txt,subdir/sample.txt},module/File-ShareDir/test_file.txt}
86 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %doc Changes README.md
91 %{perl_vendorlib}/File/ShareDir.pm
92 %dir %{perl_vendorlib}/auto/share/module
93 %{_mandir}/man3/File::ShareDir.3pm*