summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-25 23:17:23 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-25 23:17:23 -0300
commit8acc8217fe7e52619393eaccbf9128521f2e3252 (patch)
treeae8aca66c5938252aa88638eb050a20713b68e98
parentddf3094cc0d609901bc84a8b77885723dec707cb (diff)
rebuild createrepos and fix some variables
-rw-r--r--config2
-rw-r--r--config_abslibre_gnu+hurd6
-rw-r--r--config_abslibre_gnu+linux6
-rw-r--r--config_abslibre_gnu+linux_arm6
-rw-r--r--config_gnu+hurd6
-rw-r--r--config_gnu+linux6
-rwxr-xr-xcreate-repo3
-rwxr-xr-xcreaterepos34
8 files changed, 51 insertions, 18 deletions
diff --git a/config b/config
index 2c507cf..c1b9ffa 100644
--- a/config
+++ b/config
@@ -12,6 +12,8 @@ SRC_POOL_DIR='sources'
SRV_DIR='/srv'
TMP_DIR='/tmp'
+PKG_POOL_DIR='pools'
+SRC_POOL_DIR='sources'
GIT_BASE="${SRV_DIR}/git"
SYNC_ARGS='-mrtv --no-motd --delete-after --no-p --no-o --no-g --quiet'
diff --git a/config_abslibre_gnu+hurd b/config_abslibre_gnu+hurd
index cc6bf2a..95ad53d 100644
--- a/config_abslibre_gnu+hurd
+++ b/config_abslibre_gnu+hurd
@@ -32,15 +32,15 @@ COMMUNITY_REPOS=('pcr' 'pcr-testing' 'pur' '~aurelien' '~brendan' '~coadde' '~dr
PATFORM_REPOS=()
# Remote Repositories
-PKG_ANY_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
+PKG_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${LIBRE_MULTILIB_REPOS[@]}" "${MULTILIB_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="abslibre_${PLATFORM}"
+PKG_POOL="${PKG_POOL_DIR}/abslibre_${PLATFORM}"
# Directories where sources are stored
-SRC_POOL="abslibre_${PLATFORM}"
+SRC_POOL="${SRC_POOL_DIR}/abslibre_${PLATFORM}"
# Build System and Repository scripts
BS_MAIN_NAME="abslibre_${PLATFORM}"
diff --git a/config_abslibre_gnu+linux b/config_abslibre_gnu+linux
index fd02d0c..990fbee 100644
--- a/config_abslibre_gnu+linux
+++ b/config_abslibre_gnu+linux
@@ -32,15 +32,15 @@ COMMUNITY_REPOS=('pcr' 'pcr-testing' 'pur' '~aurelien' '~brendan' '~coadde' '~dr
PATFORM_REPOS=('nonsystemd' 'nonsystemd-testing')
# Remote Repositories
-PKG_ANY_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
+PKG_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${LIBRE_MULTILIB_REPOS[@]}" "${MULTILIB_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="abslibre_${PLATFORM}"
+PKG_POOL="${PKG_POOL_DIR}/abslibre_${PLATFORM}"
# Directories where sources are stored
-SRC_POOL="abslibre_${PLATFORM}"
+SRC_POOL="${SRC_POOL_DIR}/abslibre_${PLATFORM}"
# Build System and Repository scripts
BS_MAIN_NAME="abslibre_${PLATFORM}"
diff --git a/config_abslibre_gnu+linux_arm b/config_abslibre_gnu+linux_arm
index 6cd1eb9..cdd6fb1 100644
--- a/config_abslibre_gnu+linux_arm
+++ b/config_abslibre_gnu+linux_arm
@@ -32,15 +32,15 @@ COMMUNITY_REPOS=('pcr' 'pcr-testing' 'pur' '~aurelien' '~brendan' '~coadde' '~dr
PATFORM_REPOS=('nonsystemd' 'nonsystemd-testing')
# Remote Repositories
-PKG_ANY_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
+PKG_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPOS[@]}" "${MAIN_REPOS[@]}" "${LIBRE_MULTILIB_REPOS[@]}" "${MULTILIB_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="abslibre_${PLATFORM}_arm"
+PKG_POOL="${PKG_POOL_DIR}/abslibre_${PLATFORM}_arm"
# Directories where sources are stored
-SRC_POOL="abslibre_${PLATFORM}_arm"
+SRC_POOL="${SRC_POOL_DIR}/abslibre_${PLATFORM}_arm"
# Build System and Repository scripts
BS_MAIN_NAME="abslibre_${PLATFORM}_arm"
diff --git a/config_gnu+hurd b/config_gnu+hurd
index ad49297..a8c39f1 100644
--- a/config_gnu+hurd
+++ b/config_gnu+hurd
@@ -28,15 +28,15 @@ COMMUNITY_REPOS=('pcr' 'pcr-testing' 'pur' '~aurelien' '~brendan' '~coadde' '~dr
PATFORM_REPOS=()
# Remote Repositories
-PKG_ANY_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
+PKG_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}" "${MULTILIB_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="${PLATFORM}"
+PKG_POOL="${PKG_POOL_DIR}/${PLATFORM}"
# Directories where sources are stored
-SRC_POOL="${PLATFORM}"
+SRC_POOL="${SRC_POOL_DIR}/${PLATFORM}"
# Build System and Repository scripts
BS_MAIN_NAME="pbs_${PLATFORM}"
diff --git a/config_gnu+linux b/config_gnu+linux
index 1507a48..84ff3ba 100644
--- a/config_gnu+linux
+++ b/config_gnu+linux
@@ -28,15 +28,15 @@ COMMUNITY_REPOS=('pcr' 'pcr-testing' 'pur' '~aurelien' '~brendan' '~coadde' '~dr
PATFORM_REPOS=()
# Remote Repositories
-PKG_ANY_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
+PKG_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}" "${MULTILIB_REPOS[@]}" "${COMMUNITY_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="${PLATFORM}"
+PKG_POOL="${PKG_POOL_DIR}/${PLATFORM}"
# Directories where sources are stored
-SRC_POOL="${PLATFORM}"
+SRC_POOL="${SRC_POOL_DIR}/${PLATFORM}"
# Build System and Repository scripts
BS_MAIN_NAME="pbs_${PLATFORM}"
diff --git a/create-repo b/create-repo
index 0c0f2f9..1686894 100755
--- a/create-repo
+++ b/create-repo
@@ -56,3 +56,6 @@ for 'platform' in "${PLATFORMS[@]}"; do
;;
esac
done
+
+# if [ -n "${MULTILIB_ARCHES}" ]; then
+# fi
diff --git a/createrepos b/createrepos
index bee86d2..4416196 100755
--- a/createrepos
+++ b/createrepos
@@ -1,8 +1,36 @@
#!/bin/bash
# Creates the repo structure defined in config
-source "$(dirname "$(readlink -e "$0")")/config"
+source "$(dirname "$(readlink -e "$0")")/config_platforms"
+source "$(dirname "$(readlink -e "$0")")/db-functions"
-mkdir -p -- "${REPO_DIR}"/{"${PKGPOOL}","${SRCPOOL}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
+createrepos-usage() {
+ msg "Usage: %s [platform1 platform2 ... platformX]" "${0##*/}"
+ exit 1
+}
-"$(dirname "$(readlink -e "$0")")/create-repo" "${PKGREPOS[@]}"
+for 'platform' in "${PLATFORMS[@]}"; do
+ if [ -n $1 ]; then
+ for '_platform' in "$@"; do
+ # Rename plataform name ($_platform) to easily script usage
+ _platform_name="${_platform/\//+}" _platform_name="${_platform_name,,}"
+
+ if [ "${_platform_name}" == "${platform}" ]; then
+ source "$(dirname "$(readlink -e "$0")")/config_${_platform}"
+
+ mkdir -p -- "${REPO_DIR}"/{"${PKG_POOL}","${SRC_POOL}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
+
+ "$(dirname "$(readlink -e "$0")")/create-repo" -p "${_platform}" "${PKG_REPOS[@]}"
+ else
+ createrepos-usage
+ fi
+ done
+ else
+ source "$(dirname "$(readlink -e "$0")")/config_${platform}"
+
+ mkdir -p -- "${REPO_DIR}"/{"${PKG_POOL}","${SRC_POOL}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
+
+ "$(dirname "$(readlink -e "$0")")/create-repo" "${PKG_REPOS[@]}"
+ ;;
+ fi
+done