Better way of creating orig files (2017-08-17) master
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 22 Aug 2019 14:14:33 +0000 (16:14 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 22 Aug 2019 14:14:33 +0000 (16:14 +0200)
HOWTO-orig.sh

index a5bbe69..fbcfd35 100755 (executable)
@@ -1,8 +1,26 @@
 #! /bin/sh
 
-git clone https://github.com/google/protobuf protobuf-2.5.0 && cd protobuf-2.5.0
-git checkout v2.5.0
-curl http://googletest.googlecode.com/files/gtest-1.5.0.tar.bz2 | tar jx
-mv gtest-1.5.0 gtest
-dh_make --createorig
-cd ..
+#git clone https://github.com/google/protobuf protobuf-2.5.0 && cd protobuf-2.5.0
+#git checkout v2.5.0
+#curl http://googletest.googlecode.com/files/gtest-1.5.0.tar.bz2 | tar jx
+#mv gtest-1.5.0 gtest
+#dh_make --createorig
+#cd ..
+
+OWNER=google
+TAG=v2.5.0
+name=protobuf
+version=2.5.0
+protobuf_version=$version
+wget -nv "https://github.com/${OWNER}/${name}/archive/${TAG}/${name}-${version}.tar.gz"
+tar xzf "${name}-${version}.tar.gz"
+
+OWNER=google
+TAG=release-1.5.0
+name=googletest
+version=1.5.0
+wget -nv "https://github.com/${OWNER}/${name}/archive/${TAG}/${name}-${version}.tar.gz"
+tar xzf "${name}-${version}.tar.gz"
+
+mv -v "${name}-release-${version}/" "protobuf-${protobuf_version}/"
+tar -cf - | gzip > "protobuf_${protobuf_version}.orig.tar.gz" "protobuf-${protobuf_version}/gtest"