]> git.pld-linux.org Git - packages/perl-File-ShareDir.git/blob - perl-File-ShareDir.spec
- new
[packages/perl-File-ShareDir.git] / perl-File-ShareDir.spec
1 #
2 # Conditional build:
3 %bcond_without  autodeps        # don't BR packages needed only for resolving deps
4 %bcond_without  tests           # do not perform "make test"
5 #
6 %include        /usr/lib/rpm/macros.perl
7 %define pdir    File
8 %define pnam    ShareDir
9 Summary:        File::ShareDir - Locate per-dist and per-module shared files
10 Name:           perl-File-ShareDir
11 Version:        0.05
12 Release:        1
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-module/File/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5:  f15b8ee973bc304732e41f89e7d5b71a
18 URL:            http://search.cpan.org/dist/File-ShareDir/
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.1-13
21 %if %{with autodeps} || %{with tests}
22 BuildRequires:  perl(Class::Inspector) >= 1.12
23 BuildRequires:  perl(Params::Util) >= 0.07
24 %endif
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 The intent of File::ShareDir is to provide a companion to
30 Class::Inspector and File::HomeDir, modules that take a process that
31 is well-known by advanced Perl developers but gets a little tricky,
32 and make it more available to the larger Perl community.
33
34 Quite often you want or need your Perl module (CPAN or otherwise) to
35 have access to a large amount of read-only data that is stored on the
36 file-system at run-time.
37
38 On a linux-like system, this would be in a place such as /usr/share,
39 however Perl runs on a wide variety of different systems, and so the
40 use of any one location is unreliable.
41
42 Perl provides a little-known method for doing this, but almost nobody
43 is aware that it exists. As a result, module authors often go through
44 some very strange ways to make the data available to their code.
45
46 The most common of these is to dump the data out to an enormous Perl
47 data structure and save it into the module itself. The result are
48 enormous multi-megabyte .pm files that chew up a lot of memory
49 needlessly.
50
51 %prep
52 %setup -q -n %{pdir}-%{pnam}-%{version}
53
54 %build
55 %{__perl} Makefile.PL \
56         INSTALLDIRS=vendor
57 %{__make}
58
59 %{?with_tests:%{__make} test}
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63
64 %{__make} pure_install \
65         DESTDIR=$RPM_BUILD_ROOT
66
67 rm $RPM_BUILD_ROOT%{perl_vendorlib}/auto/File/ShareDir/sample.txt
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
73 %defattr(644,root,root,755)
74 %doc Changes README
75 %{perl_vendorlib}/File/*.pm
76 %{_mandir}/man3/*
This page took 0.520803 seconds and 4 git commands to generate.