summaryrefslogtreecommitdiffstats
path: root/redhat/build
diff options
context:
space:
mode:
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.