From 11b501fac16be9fe9ee687d3f19be73fe675f3bb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 23 Jan 2017 13:52:44 +0100 Subject: php-phpmyadmin-motranslator: 3.0 --- makesrc.sh | 28 ---------------------------- php-phpmyadmin-motranslator.spec | 26 +++++++++++++++----------- 2 files changed, 15 insertions(+), 39 deletions(-) delete mode 100755 makesrc.sh diff --git a/makesrc.sh b/makesrc.sh deleted file mode 100755 index 87d223d..0000000 --- a/makesrc.sh +++ /dev/null @@ -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." diff --git a/php-phpmyadmin-motranslator.spec b/php-phpmyadmin-motranslator.spec index cb69f32..52dc1f1 100644 --- a/php-phpmyadmin-motranslator.spec +++ b/php-phpmyadmin-motranslator.spec @@ -9,23 +9,23 @@ ##TODO next version will have tests back -%global gh_commit 7d31d1de8167f0824dcff046d2eb2abb3d8364dd +%global gh_commit b5d5f9a0c1f6ed1127e7b766b3b506766becbb89 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpmyadmin %global gh_project motranslator %global with_tests 0%{!?_without_tests:1} -%global psr0 MoTranslator +%global ns_vendor PhpMyAdmin +%global ns_project MoTranslator Name: php-%{gh_owner}-%{gh_project} -Version: 2.2 +Version: 3.0 Release: 1%{?dist} Summary: Translation API for PHP using Gettext MO files Group: Development/Libraries License: GPLv2+ URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: %{name}-%{version}-%{gh_short}.tgz -Source1: makesrc.sh +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz BuildArch: noarch %if %{with_tests} @@ -71,7 +71,7 @@ Limitations * Not suitable for huge MO files which you don't want to store in memory * Input and output encoding has to match (preferably UTF-8) -Autoloader: %{_datadir}/php/%{psr0}/autoload.php +Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php %prep @@ -85,7 +85,7 @@ cat <<'AUTOLOAD' | tee src/autoload.php /* Autoloader for %{name} and its dependencies */ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('%{psr0}\\', __DIR__); +\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__); \Fedora\Autoloader\Dependencies::required(array( '%{_datadir}/php/Symfony/Component/ExpressionLanguage/autoload.php' )); @@ -94,8 +94,8 @@ AUTOLOAD %install : Library -mkdir -p %{buildroot}%{_datadir}/php -cp -pr src %{buildroot}%{_datadir}/php/%{psr0} +mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} +cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} %check @@ -103,7 +103,7 @@ cp -pr src %{buildroot}%{_datadir}/php/%{psr0} mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 3.0-1 +- update to 3.0 with vendor namespace + * Sat Jan 21 2017 Remi Collet - 2.2-1 - initial package -- cgit