[Groonga-commit] groonga/groonga at de1e961 [master] package rpm: untabify and use 2 spaces for indent

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Apr 4 09:46:18 JST 2018


Kouhei Sutou	2018-04-04 09:46:18 +0900 (Wed, 04 Apr 2018)

  New Revision: de1e96187aaaf92e41b23b1103b48e046df5715b
  https://github.com/groonga/groonga/commit/de1e96187aaaf92e41b23b1103b48e046df5715b

  Message:
    package rpm: untabify and use 2 spaces for indent

  Modified files:
    packages/yum/build-release-rpm.sh

  Modified: packages/yum/build-release-rpm.sh (+51 -51)
===================================================================
--- packages/yum/build-release-rpm.sh    2018-04-04 09:35:44 +0900 (4840039d3)
+++ packages/yum/build-release-rpm.sh    2018-04-04 09:46:18 +0900 (74d98ea46)
@@ -3,9 +3,9 @@
 script_base_dir=`dirname $0`
 
 if [ $# != 6 ]; then
-    echo "Usage: $0 PACKAGE PACKAGE_LABEL BASE_URL_PREFIX DESTINATION DISTRIBUTIONS HAVE_DEVELOPMENT_BRANCH"
-    echo " e.g.: $0 milter-manager 'milter manager' http://downloads.sourceforge.net/milter-manager' repositories/ 'fedora centos' yes"
-    exit 1
+  echo "Usage: $0 PACKAGE PACKAGE_LABEL BASE_URL_PREFIX DESTINATION DISTRIBUTIONS HAVE_DEVELOPMENT_BRANCH"
+  echo " e.g.: $0 milter-manager 'milter manager' http://downloads.sourceforge.net/milter-manager' repositories/ 'fedora centos' yes"
+  exit 1
 fi
 
 PACKAGE=$1
@@ -17,17 +17,17 @@ HAVE_DEVELOPMENT_BRANCH=$6
 
 run()
 {
-    "$@"
-    if test $? -ne 0; then
-	echo "Failed $@"
-	exit 1
-    fi
+  "$@"
+  if test $? -ne 0; then
+    echo "Failed $@"
+    exit 1
+  fi
 }
 
 rpm_base_dir=$HOME/rpm
 
 if [ ! -f ~/.rpmmacros ]; then
-    run cat <<EOM > ~/.rpmmacros
+  run cat <<EOM > ~/.rpmmacros
 %_topdir $rpm_base_dir
 EOM
 fi
@@ -39,19 +39,19 @@ run mkdir -p $rpm_base_dir/RPMS
 run mkdir -p $rpm_base_dir/SRPMS
 
 for distribution in ${DISTRIBUTIONS}; do
-    case $distribution in
-	fedora)
-	    distribution_label=Fedora
-	    distribution_versions="20"
-	    ;;
-	centos)
-	    distribution_label=CentOS
-	    distribution_versions="6 7"
-	    ;;
-    esac
-    repo=${PACKAGE}.repo
-    if test "$HAVE_DEVELOPMENT_BRANCH" = "yes"; then
-	run cat <<EOR > $repo
+  case $distribution in
+    fedora)
+      distribution_label=Fedora
+      distribution_versions="20"
+      ;;
+    centos)
+      distribution_label=CentOS
+      distribution_versions="6 7"
+      ;;
+  esac
+  repo=${PACKAGE}.repo
+  if test "$HAVE_DEVELOPMENT_BRANCH" = "yes"; then
+    run cat <<EOR > $repo
 [$PACKAGE]
 name=$PACKAGE_LABEL for $distribution_label \$releasever - \$basearch
 baseurl=$BASE_URL_PREFIX/$distribution/\$releasever/stable/\$basearch/
@@ -66,8 +66,8 @@ gpgcheck=1
 enabled=0
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-$PACKAGE
 EOR
-    else
-	run cat <<EOR > $repo
+  else
+    run cat <<EOR > $repo
 [$PACKAGE]
 name=$PACKAGE_LABEL for $distribution_label \$releasever - \$basearch
 baseurl=$BASE_URL_PREFIX/$distribution/\$releasever/\$basearch/
@@ -76,36 +76,36 @@ enabled=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-$PACKAGE
        file:///etc/pki/rpm-gpg/RPM-GPG-KEY-$PACKAGE-RSA4096
 EOR
-    fi
-    run tar cfz $rpm_base_dir/SOURCES/${PACKAGE}-release.tar.gz \
-	-C ${script_base_dir} ${repo} RPM-GPG-KEY-${PACKAGE} RPM-GPG-KEY-${PACKAGE}-RSA4096
-    run cp ${script_base_dir}/${PACKAGE}-release.spec $rpm_base_dir/SPECS/
+  fi
+  run tar cfz $rpm_base_dir/SOURCES/${PACKAGE}-release.tar.gz \
+      -C ${script_base_dir} ${repo} RPM-GPG-KEY-${PACKAGE} RPM-GPG-KEY-${PACKAGE}-RSA4096
+  run cp ${script_base_dir}/${PACKAGE}-release.spec $rpm_base_dir/SPECS/
 
-    run rpmbuild -ba $rpm_base_dir/SPECS/${PACKAGE}-release.spec
+  run rpmbuild -ba $rpm_base_dir/SPECS/${PACKAGE}-release.spec
 
-    top_dir=${DESTINATION}${distribution}
+  top_dir=${DESTINATION}${distribution}
 
-    run mkdir -p $top_dir
-    run cp -p \
-	$rpm_base_dir/RPMS/noarch/${PACKAGE}-release-* \
-	$rpm_base_dir/SRPMS/${PACKAGE}-release-* \
-	${script_base_dir}/RPM-GPG-KEY-${PACKAGE} \
-	$top_dir
+  run mkdir -p $top_dir
+  run cp -p \
+      $rpm_base_dir/RPMS/noarch/${PACKAGE}-release-* \
+      $rpm_base_dir/SRPMS/${PACKAGE}-release-* \
+      ${script_base_dir}/RPM-GPG-KEY-${PACKAGE} \
+      $top_dir
 
-    release_spec=$rpm_base_dir/SPECS/${PACKAGE}-release.spec
-    release_version=$(grep '^Version: ' ${release_spec} | \
-			sed -e 's/^Version: //')
-    run cd $top_dir
-    run ln -fs \
-	${PACKAGE}-release-${release_version}.noarch.rpm \
-	${PACKAGE}-release-latest.noarch.rpm
-    run cd -
+  release_spec=$rpm_base_dir/SPECS/${PACKAGE}-release.spec
+  release_version=$(grep '^Version: ' ${release_spec} | \
+                      sed -e 's/^Version: //')
+  run cd $top_dir
+  run ln -fs \
+      ${PACKAGE}-release-${release_version}.noarch.rpm \
+      ${PACKAGE}-release-latest.noarch.rpm
+  run cd -
 
-    for distribution_version in $distribution_versions; do
-	cp $top_dir/*.src.rpm $top_dir/$distribution_version/source/SRPMS/
-	if [ -d "$top_dir/$distribution_version/i386/Packages" ]; then
-	    cp $top_dir/*.noarch.rpm $top_dir/$distribution_version/i386/Packages/
-	fi
-	cp $top_dir/*.noarch.rpm $top_dir/$distribution_version/x86_64/Packages/
-    done
+  for distribution_version in $distribution_versions; do
+    cp $top_dir/*.src.rpm $top_dir/$distribution_version/source/SRPMS/
+    if [ -d "$top_dir/$distribution_version/i386/Packages" ]; then
+      cp $top_dir/*.noarch.rpm $top_dir/$distribution_version/i386/Packages/
+    fi
+    cp $top_dir/*.noarch.rpm $top_dir/$distribution_version/x86_64/Packages/
+  done
 done
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180404/3291fb52/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index