]> git.pld-linux.org Git - packages/satis.git/blob - satis.spec
e4a241b6ffd79fbed88e7fa546a05e8ae6859bea
[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 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _appdir         %{_datadir}/%{name}
30
31 %description
32 Simple static Composer repository generator.
33
34 It uses any composer.json file as input and dumps all the required
35 (according to their version constraints) packages to a Composer
36 Repository file.
37
38 %prep
39 %setup -qc -n %{name}-%{version}%{?subver}
40 mv %{name}-*/* .
41
42 %{__sed} -i -e '1s,^#!.*env php,#!%{__php},' bin/*
43 %{__rm} composer.lock
44
45 %build
46 COMPOSER_HOME=${PWD:-$(pwd)} \
47 composer install --prefer-dist --no-dev -v
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}}
52 cp -a bin src vendor views $RPM_BUILD_ROOT%{_appdir}
53 ln -s %{_appdir}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
54
55 %{__rm} -r $RPM_BUILD_ROOT%{_appdir}/vendor/twig/twig/test
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %files
61 %defattr(644,root,root,755)
62 %doc README.md LICENSE
63 %attr(755,root,root) %{_bindir}/satis
64 %dir %{_appdir}
65 %dir %{_appdir}/bin
66 %attr(755,root,root) %{_appdir}/bin/*
67 %{_appdir}/src
68 %{_appdir}/vendor
69 %{_appdir}/views
This page took 0.054541 seconds and 2 git commands to generate.