summaryrefslogtreecommitdiffstats
path: root/redhat/build
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2014-10-03 22:17:49 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2014-10-03 22:17:49 +0200
commit7b7982286c26e1d2464e4be9adeb03f27f984238 (patch)
tree5ebefcca93d37967fa384689b6d22c6c664fcfb9 /redhat/build
parente6514292cef38549a22e8bd792663ad5c9b31567 (diff)
downloadtde-packaging-7b7982286c26e1d2464e4be9adeb03f27f984238.tar.gz
tde-packaging-7b7982286c26e1d2464e4be9adeb03f27f984238.zip
RPM Packaging: update tde-i18n
Diffstat (limited to 'redhat/build')
-rwxr-xr-xredhat/build/build_rpm_package.sh27
-rwxr-xr-xredhat/build/get_rpm_package_name.sh1
2 files changed, 27 insertions, 1 deletions
diff --git a/redhat/build/build_rpm_package.sh b/redhat/build/build_rpm_package.sh
index cd8bb1662..b927b8a0f 100755
--- a/redhat/build/build_rpm_package.sh
+++ b/redhat/build/build_rpm_package.sh
@@ -21,6 +21,29 @@ LOGFILE=/tmp/log.${COMP##*/}
TEMPDIR="$(mktemp -d)"
cp -f ${SPECFILE} ${SOURCES} ${TARBALL} "${TEMPDIR}"
+# Check if there are patches
+PATCHDIR="${SPECFILE%/*}/patches/${TDE_VERSION}"
+PATCHLIST="${PATCHDIR}/patches"
+if [ -r "${PATCHLIST}" ]; then
+ while read l; do
+ case "${l}" in
+ ""|"#"*);;
+ *)
+ if [ -r "${PATCHDIR}/${l}" ]; then
+ echo "Applying patch '${l}'..."
+ cat "${PATCHDIR}/${l}" >>"${TEMPDIR}/one.patch"
+ fi
+ ;;
+ esac
+ done < "${PATCHLIST}"
+fi
+
+if [ -r "${TEMPDIR}/one.patch" ]; then
+ sed -i "${TEMPDIR}/"*.spec \
+ -e "/^Source0:/ s/$/\nPatch0: one.patch/" \
+ -e "/%setup/ s/$/\n%patch0 -p1 -b .orig/"
+fi
+
# Determines if we are running an i386 or x86_64 distro
if [ "$(rpm -q --qf '%{arch}\n' kernel | tail -n 1)" = "i686" ]; then
ARGS="${ARGS} --target=i686"
@@ -39,11 +62,13 @@ rpmbuild -ba \
--define "_rpmdir ${RPMDIR}" \
--define "_srcrpmdir ${SRPMDIR}" \
--define '_build_create_debug 1' \
+ --define "vendor Trinity\ Desktop" \
+ --define "packager Francois\ Andriot\ <francois.andriot@free.fr>" \
--define "tde_version ${TDE_VERSION}" \
--define "tde_prefix /opt/trinity" \
--define "preversion ${PREVERSION}" \
${ARGS} \
- "${SPECFILE}"
+ "${TEMPDIR}/${SPECFILE##*/}"
RET=$?
# Removes BUILDDIR if build succeeded
diff --git a/redhat/build/get_rpm_package_name.sh b/redhat/build/get_rpm_package_name.sh
index 2d9309738..0ccdfa036 100755
--- a/redhat/build/get_rpm_package_name.sh
+++ b/redhat/build/get_rpm_package_name.sh
@@ -23,6 +23,7 @@ case "${PKGNAME}" in
"avahi-tqt") PKGNAME="libavahi-tqt";;
"dbus-tqt") PKGNAME="libdbus-tqt-1";;
"dbus-1-tqt") PKGNAME="libdbus-1-tqt";;
+ "libart-lgpl") PKGNAME="libart_lgpl_2-2";;
esac
# Use the Trinity Prefix, or not.