summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-01-23 13:52:44 +0100
committerRemi Collet <fedora@famillecollet.com>2017-01-23 13:52:44 +0100
commit11b501fac16be9fe9ee687d3f19be73fe675f3bb (patch)
treeba415cf8124772a98004001e43497b070e735e61
parentd80d24d85ce3f028c535936570987c29b4ac7d92 (diff)
php-phpmyadmin-motranslator: 3.0
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-phpmyadmin-motranslator.spec26
2 files changed, 15 insertions, 39 deletions
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
<?php
-require '%{buildroot}%{_datadir}/php/%{psr0}/autoload.php';
+require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php';
EOF
# remirepo:11
@@ -132,10 +132,14 @@ exit $ret
%license LICENSE
%doc composer.json
%doc *.md
-%{_datadir}/php/%{psr0}
+%dir %{_datadir}/php/%{ns_vendor}/
+ %{_datadir}/php/%{ns_vendor}/%{ns_project}
%changelog
+* Mon Jan 23 2017 Remi Collet <remi@remirepo.net> - 3.0-1
+- update to 3.0 with vendor namespace
+
* Sat Jan 21 2017 Remi Collet <remi@remirepo.net> - 2.2-1
- initial package