summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-sabre-event5.spec14
2 files changed, 37 insertions, 5 deletions
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..87d223d
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1,28 @@
+#!/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-sabre-event5.spec b/php-sabre-event5.spec
index 303816b..d63beb3 100644
--- a/php-sabre-event5.spec
+++ b/php-sabre-event5.spec
@@ -1,13 +1,13 @@
# remirepo/fedora spec file for php-sabre-event5
#
-# Copyright (c) 2013-2017 Remi Collet
+# Copyright (c) 2013-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
# Github
-%global gh_commit 3cb619803d5e3e38ed7c309250da5589676aedc8
+%global gh_commit f5cf802d240df1257866d8813282b98aee3bc548
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sabre-io
%global gh_project event
@@ -23,13 +23,13 @@
Name: php-%{pk_vendor}-%{pk_project}%{major}
Summary: Lightweight library for event-based programming
-Version: 5.0.2
+Version: 5.0.3
Release: 1%{?dist}
URL: http://sabre.io/event
License: BSD
-Group: Development/Libraries
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
+Source0: %{name}-%{version}-%{gh_short}.tgz
+Source1: makesrc.sh
BuildArch: noarch
%if %{with_tests}
@@ -117,6 +117,10 @@ exit $ret
%changelog
+* Mon Mar 5 2018 Remi Collet <remi@remirepo.net> - 5.0.3-1
+- Update to 5.0.3
+- sources from git snapshot
+
* Sat Oct 21 2017 Remi Collet <remi@remirepo.net> - 5.0.2-1
- rename to php-sabre-event5
- update to 5.0.2