-
Notifications
You must be signed in to change notification settings - Fork 6
/
json-api.spec
53 lines (37 loc) · 1.23 KB
/
json-api.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#############################
Name: perl-JSON-API
Version: %{_version}
Release: %{_release}
License: proprietary
Summary: Module to interact with a JSON API
Source: %{_dist}.tar.gz
BuildArch: noarch
BuildRequires: perl(JSON), perl-libwww-perl, perl(Test::Pod::Coverage), perl(Test::Fake::HTTPD), perl(IO::Capture), perl(Module::Build), perl(URI::Encode)
Requires: perl(JSON), perl-libwww-perl, perl(URI::Encode)
%description
JSON::API abstracts interactions with a remote API into simple methods for requesting
and sending data, returning native perl datastructures from decoded JSON responses.
#############################
%prep
%setup -q -n %{_dist}
%build
%{__perl} Build.PL INSTALLDIRS=vendor
./Build && ./Build test
%install
# recreate build root
[ %{buildroot} != '/' ] && rm -rf %{buildroot}
mkdir -p %{buildroot}
#install into build root
./Build destdir=%{buildroot}/ install
# remove silly files
find %{buildroot} -name 'perllocal.pod' -o -name '.packlist' | xargs -r rm
# force compression of man pages
/usr/lib/rpm/brp-compress
# generate files list
find %{buildroot} -type f | sed -e "s@%{buildroot}/@/@" > .rpm_files
%clean
./Build realclean
#############################
%files -f .rpm_files
%defattr(-, root, root)
# vim:ft=spec