]> git.pld-linux.org Git - packages/satis.git/blob - satis.spec
rel 1
[packages/satis.git] / satis.spec
1
2 %define         rel             1
3 %define         githash 48191ff
4 # $ git rev-list 1.0.0-alpha1..%{githash} --count
5 %define         commits 152
6 %define         subver  alpha1
7 %define         php_min_version 5.3.4
8 %include        /usr/lib/rpm/macros.php
9 Summary:        Package Repository Generator
10 Name:           satis
11 Version:        1.0.0
12 Release:        1.%{subver}%{?commits:.%{commits}}%{?githash:.g%{githash}}.%{rel}
13 License:        MIT
14 Group:          Development/Languages/PHP
15 #Source0:       https://github.com/composer/satis/archive/%{version}-%{subver}/%{name}-%{version}%{subver}.tar.gz
16 Source0:        https://github.com/composer/satis/archive/%{githash}/%{name}-%{version}-%{subver}-%{commits}-g%{githash}.tar.gz
17 # Source0-md5:  adee07882bc8c526b6bd3489812bc194
18 Source1:        autoload.php
19 Patch0:         autoload.patch
20 Patch1:         https://github.com/composer/satis/pull/292.patch
21 # Patch1-md5:   28bbf057c6771e7ddda8ce1be14d22e5
22 URL:            https://github.com/composer/satis
23 BuildRequires:  composer
24 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
25 BuildRequires:  rpmbuild(macros) >= 1.461
26 BuildRequires:  sed >= 4.0
27 Requires:       composer >= 1.0.0-16.alpha11
28 Requires:       php(core) >= %{php_min_version}
29 Requires:       php(hash)
30 Requires:       php(json)
31 Requires:       php(pcre)
32 Requires:       php-composer-semver >= 1.2.0-2
33 Requires:       php-twig-Twig >= 1.7
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _appdir         %{_datadir}/%{name}
38
39 %description
40 Simple static Composer repository generator.
41
42 It uses any composer.json file as input and dumps all the required
43 (according to their version constraints) packages to a Composer
44 Repository file.
45
46 %prep
47 %setup -qc -n %{name}-%{version}-%{release}
48 mv %{name}-*/* .
49 %patch0 -p1
50 %patch1 -p1
51
52 %{__sed} -i -e '1s,^#!.*env php,#!/usr/bin/php,' bin/*
53
54 cp -p %{SOURCE1} src/Composer/Satis/autoload.php
55
56 # move to Source dir, eases packaging
57 mv res views src/Composer/Satis
58
59 # not needed runtime
60 mv bin/compile .
61 mv src/Composer/Satis/Compiler.php .
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT{%{_bindir},%{php_data_dir}/Composer}
66 cp -a src/Composer $RPM_BUILD_ROOT%{php_data_dir}
67 install -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
73 %defattr(644,root,root,755)
74 %doc README.md LICENSE
75 %attr(755,root,root) %{_bindir}/satis
76 %{php_data_dir}/Composer/Satis
This page took 0.054489 seconds and 3 git commands to generate.