]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - php-package.spec
- LICENSE in base (+few other common doc files), dune post-install cleanup example
[projects/template-specs.git] / php-package.spec
index 6b4becfd893103b4e8649aa438c42a0fcb7f4c98..66a7bb3c12bbd2c2bb19f794fb1f976ee239bff6 100644 (file)
@@ -1,10 +1,5 @@
-%if %{with phpdeps}
-%include       /usr/lib/rpm/macros.php
-%endif
-# new php based depsolver will look into this macro, however it works in static
-# manner too.
-%define                php_min_version 5.0.0
 %define                pkgname PACKAGE_NAME
+%define                php_min_version 5.0.0
 Summary:       -
 Name:          php-%{pkgname}
 Version:       _
@@ -18,42 +13,22 @@ URL:                -
 BuildRequires: /usr/bin/php
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
 %endif
-BuildRequires: rpmbuild(macros) >= 1.461
-Requires:      php-common >= 4:%{php_min_version}
+BuildRequires: rpmbuild(macros) >= 1.745
+Requires:      php(core) >= %{php_min_version}
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# exclude PEAR deps
+%define                _noautoreq_pear Excluded.php PEAR/Something.php
+
 %define                _appdir                 %{php_data_dir}/%{pkgname}
 
 # _phpdocdir / php_docdir / phpdoc_dir ?
 %define                _phpdocdir              %{_docdir}/phpdoc
 
-# bad depsolver
-%define                _noautopear     pear(class.template.php) pear(/etc/webapps/template/config.php)
-
-# exclude optional php dependencies
-%define                _noautophp      php-bzip2 php-bcmath php-zip php-date php-ftp php-hash php-ldap php-mbstring php-mysql php-pgsql php-tokenizer
-
-# put it together for rpmbuild
-%define                _noautoreq      %{?_noautophp} %{?_noautopear}
-
 %description
 ...
 
-%package tests
-Summary:       Tests for ...
-Summary(pl.UTF-8):     Testy dla ...
-Group:         Development/Languages/PHP
-Requires:      %{name} = %{version}-%{release}
-AutoProv:      no
-AutoReq:       no
-
-%description tests
-Tests for ...
-
-%description tests -l pl.UTF-8
-Testy dla ...
-
 %package phpdoc
 Summary:       Online manual for %{name}
 Summary(pl.UTF-8):     Dokumentacja online do %{name}
@@ -70,9 +45,12 @@ Dokumentacja do %{name}.
 %setup -q
 %setup -q -n %{pkgname}-%{version}
 
+%{__sed} -i -e '1 s,#!.*php,#!/usr/bin/php,' bin/*
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_appdir}
+install -d $RPM_BUILD_ROOT%{php_data_dir}
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
@@ -88,9 +66,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %{_examplesdir}/%{name}-%{version}
 
-%files tests
-%defattr(644,root,root,755)
-
 %files phpdoc
 %defattr(644,root,root,755)
-%{_phpdocdir}/%{name}
+%{_phpdocdir}/%{pkgname}
This page took 0.132508 seconds and 4 git commands to generate.