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