Compare commits

..

No commits in common. "rawhide" and "f21" have entirely different histories.

4 changed files with 29 additions and 229 deletions

1
.gitignore vendored
View file

@ -1,3 +1,2 @@
/jsqueeze-70a8167daf0e2d5522d5d77a11e3a7d6753683ce.tar.gz
/jsqueeze-2e581762884cfd035d9b148794ef2a4ab2c3b893.tar.gz
/php-patchwork-jsqueeze-2.0.5-693d64850eab2ce6a7c8f7cf547e1ab46e69d542.tar.gz

View file

@ -1,69 +0,0 @@
#/bin/sh
GIT=`which git`
RPM=`which rpm`
if [ -z "$GIT" ]
then
echo "ERROR: 'git' command not found" 1>&2
exit 1
elif [ -z "$RPM" ]
then
echo "ERROR: 'rpm' command not found" 1>&2
exit 1
fi
function print {
echo -e "\e[0;33m>>>>> ${1}\e[0m"
}
if [ -x "$1" ]
then
SPEC=$1
else
SPEC=`ls *.spec | head -1`
fi
NAME=`echo $SPEC | sed 's#\.spec##'`
VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
print "SPEC = $SPEC"
print "NAME = $NAME"
GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'`
GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'`
GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'`
GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
print "GIT_OWNER = $GIT_OWNER"
print "GIT_NAME = $GIT_NAME"
print "GIT_COMMIT = $GIT_COMMIT"
print "GIT_REPO = $GIT_REPO"
print "GIT_DIR = $GIT_DIR"
TEMP_DIR=$(mktemp --dir)
pushd $TEMP_DIR
print "Cloning git repo..."
$GIT clone $GIT_REPO
pushd $GIT_DIR
print "Checking out commit..."
$GIT checkout $GIT_COMMIT
popd
TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
print "TAR_DIR = $TAR_DIR"
mv $GIT_DIR $TAR_DIR
TAR_FILE=`$RPM --eval='%{_sourcedir}'`/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
print "TAR_FILE = $TAR_FILE"
[ -e $TAR_FILE ] && rm -f $TAR_FILE
tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
chmod 0644 $TAR_FILE
popd
rm -rf $TEMP_DIR

View file

@ -1,70 +1,38 @@
#
# Fedora spec file for php-patchwork-jsqueeze
#
# Copyright (c) 2016-2021 Adam Williamson <awilliam@redhat.com>
# Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
%global github_owner tchwork
%global github_name jsqueeze
%global github_version 2.0.2
%global github_commit 2e581762884cfd035d9b148794ef2a4ab2c3b893
%global packagist_owner patchwork
%global packagist_name jsqueeze
%global psr4_namespace Patchwork
%global github_owner tchwork
%global github_name jsqueeze
%global github_version 2.0.5
%global github_commit 693d64850eab2ce6a7c8f7cf547e1ab46e69d542
# phpci (uses namespacing)
%global php_min_ver 5.3.0
%global composer_vendor patchwork
%global composer_project jsqueeze
# "php": ">=5.3.0"
%global php_min_ver 5.3.0
%if 0%{?fedora}
%bcond_without tests
%else
%bcond_with tests
%endif
%{!?phpdir: %global phpdir %{_datadir}/php}
Name: php-%{composer_vendor}-%{composer_project}
Name: php-%{packagist_owner}-%{packagist_name}
Version: %{github_version}
Release: 22%{?dist}
Release: 1%{?dist}
Summary: Efficient JavaScript minification
# Automatically converted from old format: ASL 2.0 or GPLv2 - review is highly recommended.
License: Apache-2.0 OR GPL-2.0-only
Group: Development/Libraries
License: ASL 2.0 or GPLv2
URL: https://github.com/%{github_owner}/%{github_name}
# GitHub export does not include tests.
# Run php-patchwork-jsqueeze-get-source.sh to create full source.
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
Source1: %{name}-get-source.sh
# Must use commit-based not tag-based github tarball:
# https://fedoraproject.org/wiki/Packaging:SourceURL#Github
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz
BuildArch: noarch
# Autoloader
BuildRequires: %{_bindir}/phpab
# Tests
%if %{with tests}
## composer.json
# For tests
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: phpunit9
## phpcompatinfo (computed from version 2.0.5)
BuildRequires: php-pcre
%endif
BuildRequires: %{_bindir}/phpunit
Requires: php(language) >= %{php_min_ver}
# phpcompatinfo (computed from version 2.0.5)
Requires: php-pcre
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
Provides: php-composer(%{packagist_owner}/%{packagist_name}) = %{version}
%description
JSqueeze shrinks / compresses / minifies / mangles Javascript code.
It's a single PHP class that is developed, maintained and thoroughly
tested since 2003 on major JavaScript frameworks (e.g. jQuery).
@ -74,131 +42,33 @@ semi-colons are missing.
In term of compression ratio, it compares to YUI Compressor and
UglifyJS.
Autoloader: %{phpdir}/Patchwork/autoload-jsqueeze.php
%prep
%setup -qn %{github_name}-%{github_commit}
%build
: Generate autoloader
%{_bindir}/phpab --output src/autoload-jsqueeze.php src/
cat src/autoload-jsqueeze.php
# Empty build section, nothing required
%install
mkdir -p %{buildroot}%{phpdir}/Patchwork
cp -pr src/* %{buildroot}%{phpdir}/Patchwork/
# use PSR-0 layout relative to _datadir/php
mkdir -p %{buildroot}%{_datadir}/php/%{psr4_namespace}
cp -pr src/* %{buildroot}%{_datadir}/php/%{psr4_namespace}
%check
%if %{with tests}
: Create tests autoloader
cat << 'EOF' | tee tests/bootstrap.php
<?php
require "%{buildroot}%{phpdir}/Patchwork/autoload-jsqueeze.php";
class_alias("PHPUnit\\Framework\\TestCase", "PHPUnit_Framework_TestCase");
EOF
: Run upstream test suite
ret=0
for cmd in php php74 php80 php81
do
if which $cmd; then
$cmd %{_bindir}/phpunit9 --verbose || ret=1
fi
done
exit $ret
%else
: Tests skipped
%endif
%{_bindir}/phpunit
%files
%license LICENSE.*
%doc *.md
%doc composer.json
%dir %{phpdir}/Patchwork
%{phpdir}/Patchwork/autoload-jsqueeze.php
%{phpdir}/Patchwork/JSqueeze.php
%{!?_licensedir:%global license %%doc}
%license LICENSE.ASL20 LICENSE.GPLv2
%doc README.md composer.json
%{_datadir}/php/%{psr4_namespace}
%changelog
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Aug 7 2024 Miroslav Suchý <msuchy@redhat.com> - 2.0.5-20
- convert license to SPDX
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Dec 8 2021 Remi Collet <remi@fedoraproject.org> - 2.0.5-12
- disable test suite on EL
- switch to phpunit9
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Oct 10 2016 Shawn Iwinski <shawn@iwin.ski> - 2.0.5-1
- Update to 2.0.5 (RHBZ #1383300, #1383302)
- Add spec license
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Apr 25 2015 Adam Williamson <awilliam@redhat.com> - 2.0.2-1
- new release 2.0.2

View file

@ -1 +1 @@
a2dd061e258734851f5fc20832bd096e php-patchwork-jsqueeze-2.0.5-693d64850eab2ce6a7c8f7cf547e1ab46e69d542.tar.gz
1c8e4c7782b91338a14a4e7512871521 jsqueeze-2e581762884cfd035d9b148794ef2a4ab2c3b893.tar.gz