]>
Commit | Line | Data |
---|---|---|
ef6cef90 ER |
1 | %define status alpha |
2 | %define pearname Date_HumanDiff | |
54b0414d | 3 | %define php_min_version 5.0.0 |
ef6cef90 ER |
4 | Summary: %{pearname} - Generate textual time differences that are easily understandable by humans |
5 | Name: php-pear-Date_HumanDiff | |
6ed58b6c | 6 | Version: 0.5.0 |
ef6cef90 ER |
7 | Release: 1 |
8 | License: LGPL | |
9 | Group: Development/Languages/PHP | |
10 | Source0: http://pear.php.net/get/%{pearname}-%{version}.tgz | |
6ed58b6c | 11 | # Source0-md5: a697cc97f7e3e9a4c155f99c08349fd3 |
ef6cef90 ER |
12 | URL: http://pear.php.net/package/Date_HumanDiff/ |
13 | BuildRequires: php-packagexml2cl | |
14 | BuildRequires: php-pear-PEAR | |
15 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
16 | BuildRequires: rpmbuild(macros) >= 1.610 | |
54b0414d ER |
17 | Requires: php(core) >= %{php_min_version} |
18 | Requires: php(date) | |
19 | Requires: php(pcre) | |
ef6cef90 ER |
20 | Requires: php-pear |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | Generate textual time differences that are easily understandable by | |
26 | humans ("5 minutes ago"). The package supports minutes, hours, days, | |
27 | weeks, months and years. A time difference of 65 seconds gets | |
28 | converted to "a minute ago". | |
29 | ||
30 | In PEAR status of this package is: %{status}. | |
31 | ||
32 | %prep | |
33 | %pear_package_setup | |
34 | ||
6ed58b6c ER |
35 | # wtf? |
36 | mv .%{php_pear_dir}/{src/,}Date/HumanDiff/Locale/ru.php | |
37 | ||
ef6cef90 ER |
38 | %build |
39 | packagexml2cl package.xml > ChangeLog | |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | install -d $RPM_BUILD_ROOT%{php_pear_dir} | |
44 | %pear_package_install | |
45 | ||
46 | %clean | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | ||
49 | %files | |
50 | %defattr(644,root,root,755) | |
51 | %doc ChangeLog install.log | |
52 | %doc docs/Date_HumanDiff/* | |
53 | %{php_pear_dir}/.registry/*.reg | |
54 | %{php_pear_dir}/Date/HumanDiff.php | |
55 | %dir %{php_pear_dir}/Date/HumanDiff | |
56 | %{php_pear_dir}/Date/HumanDiff/Locale.php | |
57 | %{php_pear_dir}/Date/HumanDiff/LocaleArray.php | |
58 | %dir %{php_pear_dir}/Date/HumanDiff/Locale | |
59 | %lang(de) %{php_pear_dir}/Date/HumanDiff/Locale/de.php | |
60 | %lang(el) %{php_pear_dir}/Date/HumanDiff/Locale/el.php | |
61 | %lang(fa) %{php_pear_dir}/Date/HumanDiff/Locale/fa.php | |
6ed58b6c | 62 | %lang(ru) %{php_pear_dir}/Date/HumanDiff/Locale/ru.php |