]>
Commit | Line | Data |
---|---|---|
22a2493a | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir File | |
7 | %define pnam MimeInfo | |
8 | Summary: File-MimeInfo - use the freedesktop mimeinfo spec | |
9 | Name: perl-File-MimeInfo | |
10 | Version: 0.10 | |
11 | Release: 1 | |
12 | License: Artistic | |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://search.cpan.org/dist/P/PA/PARDUS/File-MimeInfo/File-MimeInfo-%{version}.tar.gz | |
15 | # Source0-md5: 79c8d21705ce9d86a415275b8b2e6c52 | |
16 | Requires: shared-mime-info | |
17 | BuildRequires: perl-devel >= 1:5.8.0 | |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | BuildArch: noarch | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | This module can be used to determine the mime type of a file; it's a | |
24 | replacement for File::MMagic trying to implement the freedesktop | |
25 | specification for using the shared mime-info database. The package | |
26 | comes with a script called 'mimetype' that can be used as a file(1) | |
27 | work-alike. | |
28 | ||
29 | %prep | |
30 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
31 | ||
32 | %build | |
33 | %{__perl} Makefile.PL \ | |
34 | INSTALLDIRS=vendor | |
35 | %{__make} | |
36 | ||
37 | %{?with_tests:%{__make} test} | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
42 | %{__make} install \ | |
43 | DESTDIR=$RPM_BUILD_ROOT | |
44 | ||
45 | %clean | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %files | |
49 | %defattr(644,root,root,755) | |
50 | %{perl_vendorlib}/%{pdir}/*.pm | |
51 | %{perl_vendorlib}/%{pdir}/%{pnam}/*.pm | |
52 | %{_mandir}/man1/* | |
53 | %{_mandir}/man3/* | |
54 | %attr(755,root,root) %{_bindir}/mimetype |