]> git.pld-linux.org Git - packages/satis.git/blob - satis.spec
0efe3e6a5696ce73a4bbecfa2a131f4fd1c26287
[packages/satis.git] / satis.spec
1
2 %define         rel             1
3 %define         githash 6a8e47e
4 # $ git rev-list 1.0.0-alpha1..%{githash} --count
5 %define         commits 193
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:  ec71a1da6009bf5198a6a8c736c10aab
18 Source1:        autoload.php
19 Patch0:         autoload.patch
20 URL:            https://github.com/composer/satis
21 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
22 BuildRequires:  rpmbuild(macros) >= 1.461
23 BuildRequires:  sed >= 4.0
24 Requires:       composer >= 1.0.0-18
25 Requires:       php(core) >= %{php_min_version}
26 Requires:       php(hash)
27 Requires:       php(json)
28 Requires:       php(pcre)
29 Requires:       php-composer-semver >= 1.2.0-2
30 Requires:       php-twig-Twig >= 1.7
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _appdir         %{_datadir}/%{name}
35
36 %description
37 Simple static Composer repository generator.
38
39 It uses any composer.json file as input and dumps all the required
40 (according to their version constraints) packages to a Composer
41 Repository file.
42
43 %prep
44 %setup -qc -n %{name}-%{version}-%{release}
45 mv %{name}-*/* .
46 %patch0 -p1
47
48 %{__sed} -i -e '1s,^#!.*env php,#!/usr/bin/php,' bin/*
49
50 cp -p %{SOURCE1} src/Composer/Satis/autoload.php
51
52 # move to Source dir, eases packaging
53 mv res views src/Composer/Satis
54
55 # not needed runtime
56 mv bin/compile .
57 mv src/Composer/Satis/Compiler.php .
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_bindir},%{php_data_dir}/Composer}
62 cp -a src/Composer $RPM_BUILD_ROOT%{php_data_dir}
63 install -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc README.md LICENSE
71 %attr(755,root,root) %{_bindir}/satis
72 %{php_data_dir}/Composer/Satis
This page took 0.024173 seconds and 2 git commands to generate.