]> git.pld-linux.org Git - packages/perl-File-ShareDir.git/blob - perl-File-ShareDir.spec
3fa4665f6d47dde3698a9f5b8e07ca4d18b01145
[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 BuildRequires:  rpmbuild(macros) >= 1.745
21 %if %{with tests}
22 BuildRequires:  perl(File::Path) >= 2.08
23 BuildRequires:  perl(File::Spec) >= 0.80
24 BuildRequires:  perl-Class-Inspector >= 1.12
25 BuildRequires:  perl-File-ShareDir-Install >= 0.13
26 BuildRequires:  perl-Params-Util >= 0.07
27 BuildRequires:  perl-Test-Simple >= 0.90
28 %endif
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 The intent of File::ShareDir is to provide a companion to
34 Class::Inspector and File::HomeDir, modules that take a process that
35 is well-known by advanced Perl developers but gets a little tricky,
36 and make it more available to the larger Perl community.
37
38 Quite often you want or need your Perl module (CPAN or otherwise) to
39 have access to a large amount of read-only data that is stored on the
40 file-system at run-time.
41
42 On a Linux-like system, this would be in a place such as /usr/share,
43 however Perl runs on a wide variety of different systems, and so the
44 use of any one location is unreliable.
45
46 Perl provides a little-known method for doing this, but almost nobody
47 is aware that it exists. As a result, module authors often go through
48 some very strange ways to make the data available to their code.
49
50 %description -l pl.UTF-8
51 Celem File::ShareDir jest zapewnienie modułu towarzyszącego modułom
52 Class::Inspector oraz File::HomeDir (wykonujących zadania dobrze znane
53 zaawansowanym programistom Perla, ale wymagających sztuczek), będącego
54 bardziej przystępnym dla społeczności Perla.
55
56 Często istnieje potrzeba, aby moduł Perla (z CPAN lub innego źródła)
57 miał dostęp do dużych ilości danych tylko do odczytu, przechowywanych
58 w systemie plików.
59
60 Na systemach linuksowych takie dane zwykle znajdują się miejscu typu
61 /usr/share, ale Perla działa na wielu różnych systemach i użycie
62 jednego miejsca nie jest wiarygodne.
63
64 Perl udostępnia w takim celu mało znaną metodę, ale mało kto o niej
65 wie. W efekcie autorzy modułów w różny dziwny sposób sprawiają, by ich
66 dane były dostępne dla kodu.
67
68 %prep
69 %setup -q -n %{pdir}-%{pnam}-%{version}
70
71 %build
72 %{__perl} Makefile.PL \
73         INSTALLDIRS=vendor
74 %{__make}
75
76 %{?with_tests:%{__make} test}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %{__make} pure_install \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/auto/share/{dist/File-ShareDir/{sample.txt,subdir/sample.txt},module/File-ShareDir/test_file.txt}
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc Changes README.md
92 %{perl_vendorlib}/File/ShareDir.pm
93 %dir %{perl_vendorlib}/auto/share/module
94 %{_mandir}/man3/File::ShareDir.3pm*
This page took 0.051465 seconds and 2 git commands to generate.