RPM packaging: update build scripts

pull/3/head
François Andriot 10 years ago
parent 332ffaead4
commit c04a613301

@ -1,7 +1,7 @@
SHELL := /bin/bash
PACKAGING_DIR := $(shell cd ..; pwd)
PATH := $(PATH):$(shell pwd)/build
TDE_VERSION = 14.0.0
TDE_VERSION := 14.0.0
buildpkg = \
@echo "Now processing '$(1)' [from $(PACKAGING_DIR)]."; \

@ -56,8 +56,8 @@ fi
if [ -r "${TEMPDIR}/one.patch" ]; then
sed -i "${TEMPDIR}/"*.spec \
-e "/^Source0:/ s/$/\nPatch0: one.patch/" \
-e "/%setup/ s/$/\n%patch0 -p1/"
-e "/^Source0:/ s/$/\nPatch389: one.patch/" \
-e "/%setup/ s/$/\n%patch389 -p1/"
fi
[ -d "${BUILDDIR}" ] || mkdir -p "${BUILDDIR}"

@ -6,6 +6,7 @@ TDE_VERSION="${2:-14.0.0}"
[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
SPECDIR="${SPECFILE%/*}"
RPMPKGNAME="$(get_rpm_package_name.sh ${PKGNAME})"
[ ! -r "${SPECFILE}" ] && exit 2
@ -13,7 +14,7 @@ while read var val; do
case "${var}" in
Version:*) VERSION="${val}";;
Source[0-9]*:|Source:|Patch[0-9]*:)
FILE=$(rpm --define "tde_pkg ${PKGNAME}" --define "tde_version ${TDE_VERSION}" --define "name ${PKGNAME}" --define "version ${VERSION}" -E "${SPECDIR}/${val##*/}")
FILE=$(rpm --define "tde_pkg ${PKGNAME}" --define "tde_version ${TDE_VERSION}" --define "name ${RPMPKGNAME}" --define "version ${VERSION}" -E "${SPECDIR}/${val##*/}")
if [ -r "${FILE}" ]; then
echo "${FILE}"
else

@ -3,7 +3,7 @@
# This file can be sourced in your .bashrc
TDE_BASEDIR=~/tde
TDE_VERSION=14.0.0
TDE_VERSION=14.0.1
TDE_GITBASESRC=${TDE_BASEDIR}/tde_r14
TDE_GITBASEPKG=${TDE_BASEDIR}/tde-packaging/redhat
TDE_TARBALLS=${TDE_BASEDIR}/tde-tarballs/${TDE_VERSION}
@ -19,7 +19,7 @@ export DIST="$( "${TDE_GITBASEPKG}/build/rpmdist.sh" --dist )"
alias cdrpm='cd ~/rpmbuild/RPMS/RPMS${DIST}'
# Build a single tarball (execute from GIT directory)
alias tdp4='TARGET=14.0.0 SUFFIX=0 TARBALL_DIR=${TDE_TARBALLS}/main COMPRESS=gzip ${TDE_GITBASESRC}/scripts/create_tarball'
alias tdp4='TARGET=14.0.1 SUFFIX=0 TARBALL_DIR=${TDE_TARBALLS}/main COMPRESS=gzip ${TDE_GITBASESRC}/scripts/create_tarball'
# Rebuild all tarballs
if [ -x /usr/bin/pigz ]; then
@ -38,17 +38,17 @@ grp3() {
}
grp4() {
build_rpm_package.sh "${1}" "14.0.0"
build_rpm_package.sh "${1}" "14.0.1"
}
# Check if tarballs are more recent than installed packages
checknew() {
find ~/tde/tde-tarballs/14.0.0 -name "trinity-*.tar.gz" | while read f; do
find ~/tde/tde-tarballs/14.0.1 -name "trinity-*.tar.gz" | while read f; do
TAR="${f##*/}"
NAME="${TAR%-*}"
if rpm -q "${NAME}" &>/dev/null; then
set $(rpm -q --qf "%{name} 14.0.0 %{release}" ${NAME} )
set $(rpm -q --qf "%{name} 14.0.1 %{release}" ${NAME} )
B="$1-$2~${3#*_}"
A=${TAR%.tar.gz}
B=${B%.opt}

Loading…
Cancel
Save