remi pushed to php-andrewsville-php-token-reflection (f21). "cleanup"
notifications at fedoraproject.org
notifications at fedoraproject.org
Fri May 22 05:36:34 UTC 2015
From 039e1822e2fa44d4a27e01550036959a6047eb67 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi at fedoraproject.org>
Date: Fri, 22 May 2015 07:26:12 +0200
Subject: cleanup
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..05a6054
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+NAME=$(sed -n '/^Name:/{s/.* //;p}' *.spec)
+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..."
+git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
+
+echo "Getting commit..."
+pushd $PROJECT-$COMMIT
+git checkout $COMMIT
+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-andrewsville-php-token-reflection.spec b/php-andrewsville-php-token-reflection.spec
index 7c7ce9c..96eaa30 100644
--- a/php-andrewsville-php-token-reflection.spec
+++ b/php-andrewsville-php-token-reflection.spec
@@ -25,7 +25,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.3
%if %{with_tests}
@@ -59,7 +58,6 @@ This library emulates the PHP reflection model using the tokenized PHP source.
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{_datadir}/php
cp -pr TokenReflection %{buildroot}%{_datadir}/php/TokenReflection
@@ -75,12 +73,7 @@ cp -pr TokenReflection %{buildroot}%{_datadir}/php/TokenReflection
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc README.md composer.json
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/php-andrewsville-php-token-reflection.git/commit/?h=f21&id=039e1822e2fa44d4a27e01550036959a6047eb67
More information about the scm-commits
mailing list