[Groonga-commit] groonga/groonga [master] yum: move created repositories to packages/yum/repositories/

Back to archive index

null+****@clear***** null+****@clear*****
2012年 5月 25日 (金) 12:41:07 JST


Kouhei Sutou	2012-05-25 12:41:07 +0900 (Fri, 25 May 2012)

  New Revision: 3c4a05972f8c6e176c8613c9350c357cdc8b26a0

  Log:
    yum: move created repositories to packages/yum/repositories/

  Modified files:
    .gitignore
    packages/yum/Makefile.am
    packages/yum/build-in-chroot.sh
    packages/yum/build-release-rpm.sh

  Modified: .gitignore (+1 -2)
===================================================================
--- .gitignore    2012-05-25 11:22:34 +0900 (f96bbdd)
+++ .gitignore    2012-05-25 12:41:07 +0900 (f355ee6)
@@ -99,8 +99,7 @@ cmake_install.cmake
 /packages/rpm/*/*.spec
 /packages/yum/groonga.repo
 /packages/yum/RPM-GPG-KEY-groonga
-/packages/yum/fedora/
-/packages/yum/centos/
+/packages/yum/repositories/
 /packages/source/files/
 /packages/windows/tmp/
 /packages/windows/dist-x86/

  Modified: packages/yum/Makefile.am (+10 -4)
===================================================================
--- packages/yum/Makefile.am    2012-05-25 11:22:34 +0900 (680c8a6)
+++ packages/yum/Makefile.am    2012-05-25 12:41:07 +0900 (78fe475)
@@ -1,4 +1,5 @@
 SERVER_PATH = $(RSYNC_PATH)
+REPOSITORIES_PATH = repositories
 DISTRIBUTIONS = fedora centos
 ARCHITECTURES = i386 x86_64
 CHROOT_BASE = /var/lib/chroot
@@ -24,13 +25,16 @@ update:
 upload: ensure-rsync-path
 	for distribution in $(DISTRIBUTIONS); do		\
 	  rsync -avz --progress --delete --exclude .gitignore	\
-	    $${distribution}/ $(SERVER_PATH)/$${distribution};	\
+	    $(REPOSITORIES_PATH)/$${distribution}/		\
+	      $(SERVER_PATH)/$${distribution};			\
 	done
 
 download: ensure-rsync-path
-	for distribution in $(DISTRIBUTIONS); do		\
-	   rsync -avz --progress --delete			\
-	     $(SERVER_PATH)/$${distribution}/ $${distribution};	\
+	mkdir -p $(REPOSITORIES_PATH)
+	for distribution in $(DISTRIBUTIONS); do	\
+	   rsync -avz --progress --delete		\
+	     $(SERVER_PATH)/$${distribution}/		\
+	     $(REPOSITORIES_PATH)/$${distribution};	\
 	done
 
 build: build-in-chroot build-release-rpm
@@ -41,6 +45,7 @@ build-in-chroot: source
 	  $(VERSION)				\
 	  $(top_builddir)/$(PACKAGE)		\
 	  ../rpm				\
+	  $(REPOSITORIES_PATH)/			\
 	  $(CHROOT_BASE)			\
 	  '$(ARCHITECTURES)'			\
 	  '$(DISTRIBUTIONS)'			\
@@ -53,6 +58,7 @@ build-release-rpm: RPM-GPG-KEY-$(PACKAGE)
 	  $(PACKAGE)				\
 	  '$(PACKAGE_TITLE)'			\
 	  $(BASE_URL_PREFIX)			\
+	  $(REPOSITORIES_PATH)/			\
 	  '$(DISTRIBUTIONS)'			\
 	  $(HAVE_DEVELOPMENT_BRANCH)
 

  Modified: packages/yum/build-in-chroot.sh (+11 -10)
===================================================================
--- packages/yum/build-in-chroot.sh    2012-05-25 11:22:34 +0900 (ebfb770)
+++ packages/yum/build-in-chroot.sh    2012-05-25 12:41:07 +0900 (b2bf279)
@@ -1,8 +1,8 @@
 #!/bin/sh
 
-if [ $# != 10 ]; then
-    echo "Usage: $0 PACKAGE VERSION SOURCE_BASE_NAME SPEC_DIR CHROOT_BASE ARCHITECTURES DISTRIBUTIONS HAVE_DEVELOPMENT_BRANCH USE_RPMFORGE USE_ATRPMS"
-    echo " e.g.: $0 milter-manager 1.1.1 ../milter-manager ../rpm /var/lib/chroot 'i386 x86_64' 'fedora centos' yes no no"
+if [ $# != 11 ]; then
+    echo "Usage: $0 PACKAGE VERSION SOURCE_BASE_NAME SPEC_DIR DESTINATION CHROOT_BASE ARCHITECTURES DISTRIBUTIONS HAVE_DEVELOPMENT_BRANCH USE_RPMFORGE USE_ATRPMS"
+    echo " e.g.: $0 milter-manager 1.1.1 ../milter-manager ../rpm repositories/ /var/lib/chroot 'i386 x86_64' 'fedora centos' yes no no"
     exit 1
 fi
 
@@ -10,12 +10,13 @@ PACKAGE=$1
 VERSION=$2
 SOURCE_BASE_NAME=$3
 SPEC_DIR=$4
-CHROOT_BASE=$5
-ARCHITECTURES=$6
-DISTRIBUTIONS=$7
-HAVE_DEVELOPMENT_BRANCH=$8
-USE_RPMFORGE=$9
-USE_ATRPMS=$10
+DESTINATION=$5
+CHROOT_BASE=$6
+ARCHITECTURES=$7
+DISTRIBUTIONS=$8
+HAVE_DEVELOPMENT_BRANCH=$9
+USE_RPMFORGE=$10
+USE_ATRPMS=$11
 
 PATH=/usr/local/sbin:/usr/sbin:$PATH
 
@@ -101,7 +102,7 @@ build()
     rpm_base_dir=${build_user_dir}/rpm
     rpm_dir=${rpm_base_dir}/RPMS/${architecture}
     srpm_dir=${rpm_base_dir}/SRPMS
-    pool_base_dir=${distribution}/${distribution_version}
+    pool_base_dir=${DESTINATION}${distribution}/${distribution_version}
     if test "${HAVE_DEVELOPMENT_BRANCH}" = "yes"; then
 	minor_version=$(echo $VERSION | ruby -pe '$_.gsub!(/\A\d+\.(\d+)\..*/, "\\1")')
 	if test $(expr ${minor_version} % 2) -eq 0; then

  Modified: packages/yum/build-release-rpm.sh (+7 -6)
===================================================================
--- packages/yum/build-release-rpm.sh    2012-05-25 11:22:34 +0900 (06f5dc0)
+++ packages/yum/build-release-rpm.sh    2012-05-25 12:41:07 +0900 (752ea82)
@@ -2,17 +2,18 @@
 
 script_base_dir=`dirname $0`
 
-if [ $# != 5 ]; then
-    echo "Usage: $0 PACKAGE PACKAGE_TITLE BASE_URL_PREFIX DISTRIBUTIONS HAVE_DEVELOPMENT_BRANCH"
-    echo " e.g.: $0 milter-manager 'milter manager' http://downloads.sourceforge.net/milter-manager' 'fedora centos' yes"
+if [ $# != 6 ]; then
+    echo "Usage: $0 PACKAGE PACKAGE_TITLE 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
 PACKAGE_TITLE=$2
 BASE_URL_PREFIX=$3
-DISTRIBUTIONS=$4
-HAVE_DEVELOPMENT_BRANCH=$5
+DESTINATION=$4
+DISTRIBUTIONS=$5
+HAVE_DEVELOPMENT_BRANCH=$6
 
 run()
 {
@@ -81,7 +82,7 @@ EOR
 
     run rpmbuild -ba $rpm_base_dir/SPECS/${PACKAGE}-release.spec
 
-    top_dir=$script_base_dir/$distribution
+    top_dir=${DESTINATION}${distribution}
 
     run mkdir -p $top_dir
     run cp -p \




Groonga-commit メーリングリストの案内
Back to archive index