Permalink
Browse files

apt: packages -> repositories

  • Loading branch information...
1 parent 5f8e76b commit 9c74c44ea5d0eb604dea51668f71efbc853608dc @kou kou committed May 25, 2012
Showing with 59 additions and 54 deletions.
  1. +18 −18 .gitignore
  2. +25 −22 packages/apt/Makefile.am
  3. +8 −7 packages/apt/build-in-chroot.sh
  4. +8 −7 packages/apt/update-repository.sh
View
@@ -75,24 +75,24 @@ cmake_install.cmake
/test/benchmark/bench-geo-select
/test/benchmark/bench-normalize
/packages/apt/debian/groonga-keyring.postrm
-/packages/apt/packages/debian/pool/*/*/*/*/*.diff.gz
-/packages/apt/packages/debian/pool/*/*/*/*/*.tar.gz
-/packages/apt/packages/debian/pool/*/*/*/*/*.build
-/packages/apt/packages/debian/pool/*/*/*/*/*.changes
-/packages/apt/packages/debian/pool/*/*/*/*/*.deb
-/packages/apt/packages/debian/pool/*/*/*/*/*.dsc
-/packages/apt/packages/debian/dists/
-/packages/apt/packages/debian/*.db
-/packages/apt/packages/debian/*.conf
-/packages/apt/packages/ubuntu/pool/*/*/*/*/*.diff.gz
-/packages/apt/packages/ubuntu/pool/*/*/*/*/*.tar.gz
-/packages/apt/packages/ubuntu/pool/*/*/*/*/*.build
-/packages/apt/packages/ubuntu/pool/*/*/*/*/*.changes
-/packages/apt/packages/ubuntu/pool/*/*/*/*/*.deb
-/packages/apt/packages/ubuntu/pool/*/*/*/*/*.dsc
-/packages/apt/packages/ubuntu/dists/
-/packages/apt/packages/ubuntu/*.db
-/packages/apt/packages/ubuntu/*.conf
+/packages/apt/repositories/debian/pool/*/*/*/*/*.diff.gz
+/packages/apt/repositories/debian/pool/*/*/*/*/*.tar.gz
+/packages/apt/repositories/debian/pool/*/*/*/*/*.build
+/packages/apt/repositories/debian/pool/*/*/*/*/*.changes
+/packages/apt/repositories/debian/pool/*/*/*/*/*.deb
+/packages/apt/repositories/debian/pool/*/*/*/*/*.dsc
+/packages/apt/repositories/debian/dists/
+/packages/apt/repositories/debian/*.db
+/packages/apt/repositories/debian/*.conf
+/packages/apt/repositories/ubuntu/pool/*/*/*/*/*.diff.gz
+/packages/apt/repositories/ubuntu/pool/*/*/*/*/*.tar.gz
+/packages/apt/repositories/ubuntu/pool/*/*/*/*/*.build
+/packages/apt/repositories/ubuntu/pool/*/*/*/*/*.changes
+/packages/apt/repositories/ubuntu/pool/*/*/*/*/*.deb
+/packages/apt/repositories/ubuntu/pool/*/*/*/*/*.dsc
+/packages/apt/repositories/ubuntu/dists/
+/packages/apt/repositories/ubuntu/*.db
+/packages/apt/repositories/ubuntu/*.conf
/packages/apt/groonga-keyring-*/
/packages/apt/groonga-keyring-*.tar.gz
/configure.lineno
View
@@ -1,18 +1,20 @@
+REPOSITOIRES_PATH = repositories
DISTRIBUTIONS = debian ubuntu
CHROOT_BASE = /var/lib/chroot
ARCHITECTURES = i386 amd64
CODES = squeeze wheezy unstable lucid natty oneiric precise
-REPOSITORY_PACKAGE = groonga-keyring
-REPOSITORY_VERSION = 2012.05.29
-REPOSITORY_BASE_NAME = $(REPOSITORY_PACKAGE)-$(REPOSITORY_VERSION)
+KEYRING_PACKAGE = groonga-keyring
+KEYRING_VERSION = 2012.05.29
+KEYRING_BASE_NAME = $(KEYRING_PACKAGE)-$(KEYRING_VERSION)
all:
release: build sign-packages update-repository sign-repository upload
remove-existing-packages:
for distribution in $(DISTRIBUTIONS); do \
- find packages/$${distribution}/pool -type f -delete; \
+ find $(REPOSITORIES_PATH)/$${distribution}/pool \
+ -type f -delete; \
done
ensure-rsync-path:
@@ -22,9 +24,9 @@ ensure-rsync-path:
fi
download: ensure-rsync-path
- for distribution in $(DISTRIBUTIONS); do \
- rsync -avz --progress --delete \
- $(RSYNC_PATH)/$${distribution} packages/; \
+ for distribution in $(DISTRIBUTIONS); do \
+ rsync -avz --progress --delete \
+ $(RSYNC_PATH)/$${distribution} ${REPOSITORIES_PATH}/; \
done
sign-packages:
@@ -38,37 +40,38 @@ sign-repository:
upload: ensure-rsync-path
for distribution in $(DISTRIBUTIONS); do \
- (cd packages/$${distribution}; \
+ (cd $(REPOSITORIES_PATH)/$${distribution}; \
rsync -avz --progress --delete \
dists pool $(RSYNC_PATH)/$${distribution}); \
done
-build: build-package-deb build-repository-deb
+build: build-package-deb build-keyring-deb
build-package-deb: source
- ./build-in-chroot.sh \
- $(PACKAGE) $(VERSION) $(srcdir)/.. $(CHROOT_BASE) \
- '$(ARCHITECTURES)' '$(CODES)'
-
-build-repository-deb: repository-source
- ./build-in-chroot.sh \
- $(REPOSITORY_PACKAGE) $(REPOSITORY_VERSION) $(srcdir) $(CHROOT_BASE) \
+ ./build-in-chroot.sh \
+ $(PACKAGE) $(VERSION) $(srcdir)/.. $(REPOSITORIES_PATH)/ \
+ $(CHROOT_BASE) '$(ARCHITECTURES)' '$(CODES)'
+
+build-keyring-deb: keyring-source
+ ./build-in-chroot.sh \
+ $(KEYRING_PACKAGE) $(KEYRING_VERSION) $(srcdir) \
+ $(REPOSITORIES_PATH)/ $(CHROOT_BASE) \
'$(ARCHITECTURES)' '$(CODES)'
source: ../$(PACKAGE)-$(VERSION).tar.gz
../$(PACKAGE)-$(VERSION).tar.gz:
ln -s $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz ../
-repository-source: $(REPOSITORY_BASE_NAME).tar.gz
+keyring-source: $(KEYRING_BASE_NAME).tar.gz
ensure-public-key:
gpg --list-keys '$(GPG_UID)' > /dev/null || \
gpg --keyserver keyserver.ubuntu.com --recv-key '$(GPG_UID)'
-$(REPOSITORY_BASE_NAME).tar.gz: ensure-public-key
- rm -rf $(REPOSITORY_BASE_NAME)
- mkdir -p $(REPOSITORY_BASE_NAME)
+$(KEYRING_BASE_NAME).tar.gz: ensure-public-key
+ rm -rf $(KEYRING_BASE_NAME)
+ mkdir -p $(KEYRING_BASE_NAME)
gpg --armor --export '$(GPG_UID)' > \
- $(REPOSITORY_BASE_NAME)/groonga-keyring.gpg
- tar cvzf $(REPOSITORY_BASE_NAME).tar.gz $(REPOSITORY_BASE_NAME)
+ $(KEYRING_BASE_NAME)/groonga-keyring.gpg
+ tar cvzf $(KEYRING_BASE_NAME).tar.gz $(KEYRING_BASE_NAME)
@@ -1,17 +1,18 @@
#!/bin/sh
-if [ $# != 6 ]; then
- echo "Usage: $0 PACKAGE VERSION SOURCE_DIR CHROOT_BASE ARCHITECTURES CODES"
- echo " e.g.: $0 groonga 0.1.9 SOURCE_DIR /var/lib/chroot 'i386 amd64' 'lenny unstable hardy karmic'"
+if [ $# != 7 ]; then
+ echo "Usage: $0 PACKAGE VERSION SOURCE_DIR DESTINATION CHROOT_BASE ARCHITECTURES CODES"
+ echo " e.g.: $0 groonga 0.1.9 SOURCE_DIR repositories/ /var/lib/chroot 'i386 amd64' 'lenny unstable hardy karmic'"
exit 1
fi
PACKAGE=$1
VERSION=$2
SOURCE_DIR=$3
-CHROOT_BASE=$4
-ARCHITECTURES=$5
-CODES=$6
+DESTINATION=$4
+CHROOT_BASE=$5
+ARCHITECTURES=$6
+CODES=$7
PATH=/usr/local/sbin:/usr/sbin:$PATH
@@ -94,7 +95,7 @@ build()
build_user=${PACKAGE}-build
build_user_dir=${base_dir}/home/$build_user
build_dir=${build_user_dir}/build
- pool_base_dir=${script_base_dir}/packages/${distribution}/pool/${code_name}/${component}
+ pool_base_dir=${DESTINATION}${distribution}/pool/${code_name}/${component}
package_initial=$(echo ${PACKAGE} | sed -e 's/\(.\).*/\1/')
pool_dir=${pool_base_dir}/${package_initial}/${PACKAGE}
run cp $source_dir/${PACKAGE}-${VERSION}.tar.gz \
@@ -2,15 +2,16 @@
script_base_dir=`dirname $0`
-if [ $# != 3 ]; then
- echo "Usage: $0 PROJECT_NAME ARCHITECTURES CODES"
- echo " e.g.: $0 mroonga 'i386 amd64' 'lenny unstable hardy karmic'"
+if [ $# != 4 ]; then
+ echo "Usage: $0 PROJECT_NAME DESTINATION ARCHITECTURES CODES"
+ echo " e.g.: $0 mroonga repositories/ 'i386 amd64' 'lenny unstable hardy karmic'"
exit 1
fi
PROJECT_NAME=$1
-ARCHITECTURES=$2
-CODES=$3
+DESTINATION=$2
+ARCHITECTURES=$3
+CODES=$4
run()
{
@@ -118,8 +119,8 @@ for code_name in ${CODES}; do
;;
esac
- mkdir -p packages/${distribution}
- (cd packages/${distribution}
+ mkdir -p ${DESTINATION}${distribution}
+ (cd ${DESTINATION}${distribution}
update_repository $distribution $code_name $component) &
if [ "${PARALLEL}" != "yes" ]; then
wait

0 comments on commit 9c74c44

Please sign in to comment.