blob: c42564aac2943c649f92cc973059b488d58383d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# remirepo spec file for php-openpsa-universalfeedcreator, from:
#
# Fedora spec file for php-openpsa-universalfeedcreator
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
%global composer_vendor openpsa
%global composer_project universalfeedcreator
Name: php-%{composer_vendor}-%{composer_project}
Version: 1.8.3.2
Release: 3%{?dist}
Summary: RSS and Atom feed generator
License: LGPLv2+
%global repo_owner flack
%global repo_name UniversalFeedCreator
URL: https://github.com/%{repo_owner}/%{repo_name}
Source0: %{URL}/archive/v%{version}/%{repo_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: php-date
BuildRequires: php-pcre
BuildRequires: php-simplexml
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-fedora-autoloader-devel
Requires: php-date
Requires: php-pcre
Requires: php-simplexml
Requires: php-composer(fedora/autoloader)
# Composer
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
%{!?phpdir: %global phpdir %{_datadir}/php}
%global pkgdir %{phpdir}/%{composer_vendor}-%{composer_project}
%description
RSS and Atom feed generator. Supported formats: RSS0.91, RSS1.0, RSS2.0,
PIE0.1 (deprecated), MBOX, OPML, ATOM, ATOM0.3, HTML, JS, PHP.
Autoloader: %{pkgdir}/autoload.php
%prep
%setup -q -n %{repo_name}-%{version}
%build
# Create autoloader
phpab \
--template fedora \
--output autoload.php \
--basedir lib/ \
./composer.json
echo 'require_once __DIR__ . "/constants.php";' >> autoload.php
cat autoload.php
%install
install -d -m 755 %{buildroot}%{phpdir}
cp -a lib %{buildroot}%{pkgdir}
cp autoload.php %{buildroot}%{pkgdir}/autoload.php
%check
phpunit --verbose --bootstrap %{buildroot}%{pkgdir}/autoload.php
%files
# Upstream repo does not contain a LICENSE file
%doc *.md
%doc composer.json
%{pkgdir}/
%changelog
* Wed Aug 26 2020 Artur Iwicki <fedora@svgames.pl> - 1.8.3.2-3
- Simplify autoloader generation
* Fri Aug 21 2020 Artur Iwicki <fedora@svgames.pl> - 1.8.3.2-2
- Add Requires: for PHP extensions needed by the package
- Put files inside pkgdir/ instead of pkgdir/lib/
* Wed Jul 29 2020 Artur Iwicki <fedora@svgames.pl> - 1.8.3.2-1
- Initial packaging
|