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