]> git.pld-linux.org Git - packages/perl-File-ShareDir.git/blob - perl-File-ShareDir.spec
17b101b1545ffb59f17a0831c90730c4b5da314f
[packages/perl-File-ShareDir.git] / perl-File-ShareDir.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4
5 %define pdir    File
6 %define pnam    ShareDir
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
10 Version:        1.116
11 Release:        1
12 # same as perl
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
20 %if %{with tests}
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
27 %endif
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
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.
36
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.
40
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.
44
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.
48
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.
54
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
57 w systemie plików.
58
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.
62
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.
66
67 %prep
68 %setup -q -n %{pdir}-%{pnam}-%{version}
69
70 %build
71 %{__perl} Makefile.PL \
72         INSTALLDIRS=vendor
73 %{__make}
74
75 %{?with_tests:%{__make} test}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %{__make} pure_install \
81         DESTDIR=$RPM_BUILD_ROOT
82
83 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/auto/share/{dist/File-ShareDir/{sample.txt,subdir/sample.txt},module/File-ShareDir/test_file.txt}
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
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*
This page took 0.094924 seconds and 2 git commands to generate.