diff options
-rwxr-xr-x | bin/build-rpm-package | 26 | ||||
-rw-r--r-- | home/.buildscripts/x2go.conf | 2 |
2 files changed, 19 insertions, 9 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package index ca5ee52..39e74e6 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -25,10 +25,11 @@ GIT_HOSTNAME="git.mydomain.org" RPMEMAIL="firstname.lastname@mydomain.org" RPMFULLNAME="Firstname Lastname" GPG_KEY= -RPM_DISTS_SUPPORTED="fedora epel opensuse" +RPM_DISTS_SUPPORTED="fedora epel opensuse sles" FEDORA_DISTROS="18,19,20,21,rawhide" EPEL_DISTROS="6,7" OPENSUSE_DISTROS="12.2,12.3,13.1,13.2" +SLES_DISTROS="11.2,11.3,12.0" RPM_REPOS_BASE=/var/www/ COMPONENT_MAIN="main" @@ -39,6 +40,7 @@ PACKAGES_WITHOUT_OTHERMIRROR="keyring" GNUPGHOME=$HOME/.gnupg OPENSUSE_DOWNLOAD_URL="http://download.opensuse.org/distribution/#VERSION#/repo/oss/suse/" +SLES_DOWNLOAD_URL="file:///srv/mirrors/non-public/#VERSION#/repo/oss/suse/" test -z $1 && { echo "usage: $(basename $0) [<subpath>/]<git-project> {main,main/<codename>,nightly,nightly/<codename>} [<git-checkout>]"; exit -1; } @@ -47,7 +49,7 @@ test -f ~/.buildscripts/$PREFIX.conf && . ~/.buildscripts/$PREFIX.conf || { echo NO_DELAY=${NO_DELAY:-"no"} FORCE_BUILD=${FORCE_BUILD:-"no"} -RPM_BUILD_FOR=${RPM_BUILD_FOR:-"fedora:$FEDORA_DISTROS epel:$EPEL_DISTROSi opensuse:$OPENSUSE_DISTROS"} +RPM_BUILD_FOR=${RPM_BUILD_FOR:-"fedora:$FEDORA_DISTROS epel:$EPEL_DISTROSi opensuse:$OPENSUSE_DISTROS" sles:$SLES_DISTROS} set -ex @@ -248,8 +250,12 @@ build_packages() { #fi if [ "x$SKIP_ARCH" != "xx86_64" ] || [ "$IS_NOARCH" = "yes" ]; then - if [ "x$l_DIST" = "xopensuse" ]; then - OPENSUSE_DOWNLOAD_URL=$(echo "$OPENSUSE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + if [ "x$l_DIST" = "xopensuse" ] || [ "x$l_DIST" = "xsles" ]; then + if [ "x$l_DIST" = "xopensuse" ]; then + DOWNLOAD_URL=$(echo "$OPENSUSE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + elif [ "x$l_DIST" = "xsles" ]; then + DOWNLOAD_URL=$(echo "$SLES_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + fi while mount | grep /var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/proc 1>/dev/null; do echo "Waiting for some other build to finish..." sleep 30 @@ -257,7 +263,7 @@ build_packages() { if sudo obs-build \ --nosignature \ --repo "http://packages.x2go.org/opensuse/$l_CODENAME/extras" \ - --repo "$OPENSUSE_DOWNLOAD_URL" \ + --repo "$DOWNLOAD_URL" \ --root "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/" \ --clean \ $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT.spec; then @@ -289,12 +295,16 @@ build_packages() { fi fi if [ "x$SKIP_ARCH" != "xi386" ] && [ "$IS_NOARCH" != "yes" ]; then - if [ "x$l_DIST" = "xopensuse" ]; then - OPENSUSE_DOWNLOAD_URL=$(echo "$OPENSUSE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + if [ "x$l_DIST" = "xopensuse" ] || [ "x$l_DIST" = "xsles" ]; then + if [ "x$l_DIST" = "xopensuse" ]; then + DOWNLOAD_URL=$(echo "$OPENSUSE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + elif [ "x$l_DIST" = "xsles" ]; then + DOWNLOAD_URL=$(echo "$SLES_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + fi if linux32 sudo obs-build \ --nosignature \ --repo "http://packages.x2go.org/opensuse/$l_CODENAME/extras" \ - --repo "$OPENSUSE_DOWNLOAD_URL" \ + --repo "$DOWNLOAD_URL" \ --root "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/" \ --clean \ $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT.spec; then diff --git a/home/.buildscripts/x2go.conf b/home/.buildscripts/x2go.conf index e99c203..4823456 100644 --- a/home/.buildscripts/x2go.conf +++ b/home/.buildscripts/x2go.conf @@ -14,7 +14,7 @@ RPMEMAIL=git-admin@x2go.org RPMFULLNAME="X2Go Git Administrator" GPG_KEY="F4A7678C9C6B0B2B" RPM_DISTS_SUPPORTED="fedora epel opensuse sles" -RPM_BUILD_FOR=${RPM_BUILD_FOR:-"fedora:18,19,20,21,rawhide epel:6 sles:11 opensuse:12.2,12.3,13.1,13.2"} +RPM_BUILD_FOR=${RPM_BUILD_FOR:-"fedora:18,19,20,21,rawhide epel:6 sles:11 opensuse:12.2,12.3,13.1,13.2 sles:11.2,11.3,12.0"} RPM_REPOS_BASE=/srv/sites/x2go.org/packages/ COMPONENT_MAIN="main" |