Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00af686938 |
5 changed files with 35 additions and 197 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -11,7 +11,3 @@ php-markdown-1.0.1n.zip
|
||||||
/php-markdown-lib-1.6.0.zip
|
/php-markdown-lib-1.6.0.zip
|
||||||
/php-markdown-lib-1.7.0.zip
|
/php-markdown-lib-1.7.0.zip
|
||||||
/php-markdown-lib-1.8.0.zip
|
/php-markdown-lib-1.8.0.zip
|
||||||
/php-markdown-1.8.0-01ab082.tgz
|
|
||||||
/php-markdown-1.9.0-c83178d.tgz
|
|
||||||
/php-markdown-1.9.1-5024d62.tgz
|
|
||||||
/php-markdown-2.0.0.tar.gz
|
|
||||||
|
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
"name": "michelf/php-markdown",
|
|
||||||
"type": "library",
|
|
||||||
"description": "PHP Markdown",
|
|
||||||
"homepage": "https://michelf.ca/projects/php-markdown/",
|
|
||||||
"keywords": ["markdown"],
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michel Fortin",
|
|
||||||
"email": "michel.fortin@michelf.ca",
|
|
||||||
"homepage": "https://michelf.ca/",
|
|
||||||
"role": "Developer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "John Gruber",
|
|
||||||
"homepage": "https://daringfireball.net/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.4"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": { "Michelf\\": "Michelf/" }
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"friendsofphp/php-cs-fixer": "^3.0",
|
|
||||||
"phpunit/phpunit": "^9.5",
|
|
||||||
"phpstan/phpstan": ">=1.0",
|
|
||||||
"phpstan/phpstan-phpunit": ">=1.0"
|
|
||||||
},
|
|
||||||
|
|
||||||
"scripts": {
|
|
||||||
"tests": "vendor/bin/phpunit test/",
|
|
||||||
"phpstan": [
|
|
||||||
"vendor/bin/phpstan analyse Michelf/ --level=5",
|
|
||||||
"vendor/bin/phpstan analyse -c test/phpstan.neon test/ --level=5"
|
|
||||||
],
|
|
||||||
"codestyle": "vendor/bin/php-cs-fixer fix Michelf --dry-run --verbose --show-progress=none",
|
|
||||||
"codestyle-fix": "vendor/bin/php-cs-fixer fix Michelf"
|
|
||||||
},
|
|
||||||
|
|
||||||
"archive": {
|
|
||||||
"exclude": [
|
|
||||||
"/.github/",
|
|
||||||
"/test/",
|
|
||||||
"/.editorconfig",
|
|
||||||
"/.gitignore",
|
|
||||||
"/.scrutinizer.yml",
|
|
||||||
"/.travis.yml",
|
|
||||||
"/phpunit.xml.dist"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
28
makesrc.sh
28
makesrc.sh
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
NAME=$(basename $PWD)
|
|
||||||
OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
|
|
||||||
PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
|
|
||||||
VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
|
|
||||||
COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
|
|
||||||
SHORT=${COMMIT:0:7}
|
|
||||||
|
|
||||||
echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
|
|
||||||
|
|
||||||
echo "Cloning..."
|
|
||||||
rm -rf $PROJECT-$COMMIT
|
|
||||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
|
||||||
|
|
||||||
echo "Getting commit..."
|
|
||||||
pushd $PROJECT-$COMMIT
|
|
||||||
git checkout $COMMIT
|
|
||||||
cp composer.json ../composer.json
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo "Archiving..."
|
|
||||||
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
|
||||||
|
|
||||||
echo "Cleaning..."
|
|
||||||
rm -rf $PROJECT-$COMMIT
|
|
||||||
|
|
||||||
echo "Done."
|
|
||||||
|
|
@ -5,29 +5,27 @@
|
||||||
#
|
#
|
||||||
# Please preserve changelog entries
|
# Please preserve changelog entries
|
||||||
#
|
#
|
||||||
%global gh_commit 5024d623c1a057dcd2d076d25b7d270a1d0d55f3
|
|
||||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
# We still provide the classic library, for now
|
||||||
%global gh_owner michelf
|
%global classic_version 1.0.2
|
||||||
%global gh_project php-markdown
|
|
||||||
|
|
||||||
Name: php-markdown
|
Name: php-markdown
|
||||||
Version: 2.0.0
|
Version: 1.8.0
|
||||||
Release: 7%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Markdown implementation in PHP
|
Summary: Markdown implementation in PHP
|
||||||
|
|
||||||
License: BSD-3-Clause
|
Group: Development/Languages
|
||||||
|
License: BSD
|
||||||
URL: https://michelf.ca/projects/php-markdown/
|
URL: https://michelf.ca/projects/php-markdown/
|
||||||
Source0: https://github.com/michelf/php-markdown/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: http://littoral.michelf.ca/code/php-markdown/%{name}-lib-%{version}.zip
|
||||||
Source1: makesrc.sh
|
Source1: http://littoral.michelf.ca/code/php-markdown/%{name}-%{classic_version}.zip
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: php-fedora-autoloader-devel
|
BuildRequires: php-fedora-autoloader-devel
|
||||||
# For tests
|
# For tests
|
||||||
# "require-dev": {
|
BuildRequires: php-cli
|
||||||
# "phpunit/phpunit": ">=4.3 <5.8"
|
|
||||||
BuildRequires: phpunit10
|
|
||||||
|
|
||||||
Requires: php(language) >= 7.4
|
Requires: php(language) >= 5.3
|
||||||
Requires: php-pcre
|
Requires: php-pcre
|
||||||
Requires: php-composer(fedora/autoloader)
|
Requires: php-composer(fedora/autoloader)
|
||||||
|
|
||||||
|
|
@ -38,16 +36,28 @@ Provides: php-composer(michelf/php-markdown) = %{version}
|
||||||
This is a PHP implementation of John Gruber's Markdown.
|
This is a PHP implementation of John Gruber's Markdown.
|
||||||
It is almost completely compliant with the reference implementation.
|
It is almost completely compliant with the reference implementation.
|
||||||
|
|
||||||
|
This packages provides the classic version %{classic_version} and the new
|
||||||
|
library version %{version}.
|
||||||
|
|
||||||
Autoloader: %{_datadir}/php/Michelf/markdown-autoload.php
|
Autoloader: %{_datadir}/php/Michelf/markdown-autoload.php
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n 'PHP Markdown Lib %{version}' -a 1
|
||||||
mv License.md LICENSE
|
|
||||||
|
# documentation and licenses
|
||||||
|
mkdir -p library lic/library
|
||||||
|
mv Readme.* composer.json library
|
||||||
|
mv License.* lic/library
|
||||||
|
|
||||||
|
mkdir -p classic lic/classic
|
||||||
|
cd "PHP Markdown %{classic_version}"
|
||||||
|
mv License.text ../lic/classic
|
||||||
|
mv "PHP Markdown Readme.text" ../classic/Readme.text
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
: Generate simple autoloader
|
# Generate simple autoloader
|
||||||
%{_bindir}/phpab \
|
%{_bindir}/phpab \
|
||||||
--template fedora \
|
--template fedora \
|
||||||
--output Michelf/markdown-autoload.php \
|
--output Michelf/markdown-autoload.php \
|
||||||
|
|
@ -61,6 +71,9 @@ install -d %{buildroot}%{_datadir}/php/
|
||||||
# PSR-0 library
|
# PSR-0 library
|
||||||
cp -pr Michelf %{buildroot}%{_datadir}/php/Michelf
|
cp -pr Michelf %{buildroot}%{_datadir}/php/Michelf
|
||||||
|
|
||||||
|
# Old classic
|
||||||
|
install -p -m 644 "PHP Markdown %{classic_version}/markdown.php" %{buildroot}%{_datadir}/php/
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
php -r '
|
php -r '
|
||||||
|
|
@ -69,112 +82,22 @@ require_once "%{buildroot}%{_datadir}/php/Michelf/markdown-autoload.php";
|
||||||
echo "Version=$ver, expected=%{version}\n";
|
echo "Version=$ver, expected=%{version}\n";
|
||||||
return (version_compare($ver, "%{version}", "=") ? 0 : 1);
|
return (version_compare($ver, "%{version}", "=") ? 0 : 1);
|
||||||
'
|
'
|
||||||
cat << 'EOF' | tee bs.php
|
|
||||||
<?php
|
|
||||||
require "%{buildroot}%{_datadir}/php/Michelf/markdown-autoload.php";
|
|
||||||
require "test/bootstrap.php";
|
|
||||||
EOF
|
|
||||||
|
|
||||||
ret=0
|
|
||||||
for php in php php74 php81 php82 php83
|
|
||||||
do
|
|
||||||
if which $php
|
|
||||||
then
|
|
||||||
$php %{_bindir}/phpunit10 --bootstrap bs.php || ret=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
exit $ret
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license LICENSE
|
%license lic/*
|
||||||
%doc composer.json
|
%doc library classic
|
||||||
%doc *.md
|
# Classic version
|
||||||
|
%{_datadir}/php/markdown.php
|
||||||
# Library version
|
# Library version
|
||||||
%{_datadir}/php/Michelf
|
%{_datadir}/php/Michelf
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-7
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Mar 23 2025 Tim Landscheidt <tim@tim-landscheidt.de> - 2.0.0-6
|
|
||||||
- Remove outdated information from package description
|
|
||||||
|
|
||||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Oct 04 2023 Sérgio Basto <sergio@serjux.com> - 2.0.0-1
|
|
||||||
- Update php-markdown to 2.0.0
|
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Mar 01 2023 Gwyn Ciesla <gwync@protonmail.com> - 1.9.1-5
|
|
||||||
- migrated to SPDX license
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Nov 24 2021 Remi Collet <remi@remirepo.net> - 1.9.1-1
|
|
||||||
- update to 1.9.1
|
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Dec 2 2019 Remi Collet <remi@remirepo.net> - 1.9.0-1
|
|
||||||
- update to 1.9.0
|
|
||||||
- run upstream test suite
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Remi Collet <remi@remirepo.net> - 1.8.0-6
|
|
||||||
- drop old classic version
|
|
||||||
- use git snapshot as next version will have test suite
|
|
||||||
- add patch for PHP 7.4, adapted for 1.8.0 from
|
|
||||||
https://github.com/michelf/php-markdown/pull/316
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jan 15 2018 Remi Collet <remi@remirepo.net> - 1.8.0-1
|
* Mon Jan 15 2018 Remi Collet <remi@remirepo.net> - 1.8.0-1
|
||||||
- Mardown PSR-0/PSR-4 library version 1.8.0
|
- Mardown PSR-0/PSR-4 library version 1.8.0
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
||||||
SHA512 (php-markdown-2.0.0.tar.gz) = a848bc7374f8392d21824acbc1fb11c37f961e1780fb2c735a4d4d09949fb51a6962d8d2f6df2dfca92d00a33da82062d5e2a8b8301cb476242e1fc17af673b5
|
SHA512 (php-markdown-1.0.2.zip) = b876cd3196a532f28f9a942ec04bcc0766bc804f9f2918291109943847117c5532dce0f06ad9ae535efa55de57d88a8a4a9537c3bb47ef104c3901c014604dfa
|
||||||
|
SHA512 (php-markdown-lib-1.8.0.zip) = 2b38d52f10cc74abfb787c1d01237fca6c4da9e4681e9c2999d70af7100a4759d45c73a5dff4b48f5d237d3e0c9aec4f918593e7dfb4517ca73c7ec12429b523
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue