]> git.pld-linux.org Git - packages/satis.git/blob - satis.spec
zlib ext to decompress archives
[packages/satis.git] / satis.spec
1 %define         subver  alpha1
2 %define         rel             0.1
3 %define         php_min_version 5.3.4
4 %include        /usr/lib/rpm/macros.php
5 Summary:        Package Repository Generator
6 Name:           satis
7 Version:        1.0.0
8 Release:        1.%{subver}.%{rel}
9 License:        MIT
10 Group:          Development/Languages/PHP
11 Source0:        https://github.com/composer/satis/archive/%{version}-%{subver}/%{name}-%{version}%{subver}.tar.gz
12 # Source0-md5:  708ebffa7b7053ed19f65c470d8c1966
13 URL:            https://github.com/composer/satis
14 BuildRequires:  composer
15 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
16 BuildRequires:  rpmbuild(macros) >= 1.461
17 BuildRequires:  sed >= 4.0
18 Requires:       php(core) >= %{php_min_version}
19 Requires:       php(ctype)
20 Requires:       php(filter)
21 Requires:       php(hash)
22 Requires:       php(json)
23 Requires:       php(phar)
24 Requires:       php(spl)
25 Suggests:       php(openssl)
26 Suggests:       php(zlib)
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _appdir         %{_datadir}/%{name}
31
32 %description
33 Simple static Composer repository generator.
34
35 It uses any composer.json file as input and dumps all the required
36 (according to their version constraints) packages to a Composer
37 Repository file.
38
39 %prep
40 %setup -qc -n %{name}-%{version}%{?subver}
41 mv %{name}-*/* .
42
43 %{__sed} -i -e '1s,^#!.*env php,#!%{__php},' bin/*
44 %{__rm} composer.lock
45
46 %build
47 COMPOSER_HOME=${PWD:-$(pwd)} \
48 composer install --prefer-dist --no-dev -v
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}}
53 cp -a bin src vendor views $RPM_BUILD_ROOT%{_appdir}
54 ln -s %{_appdir}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
55
56 %{__rm} -r $RPM_BUILD_ROOT%{_appdir}/vendor/twig/twig/test
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %doc README.md LICENSE
64 %attr(755,root,root) %{_bindir}/satis
65 %dir %{_appdir}
66 %dir %{_appdir}/bin
67 %attr(755,root,root) %{_appdir}/bin/*
68 %{_appdir}/src
69 %{_appdir}/vendor
70 %{_appdir}/views
This page took 0.033429 seconds and 3 git commands to generate.