Branch: master

2d66eb30 2016-10-05 13:06:32 François Andriot
RPM packaging: remove tdebase useless files
R redhat/main/tdebase/file_contexts.el6
R redhat/main/tdebase/file_contexts.fc17
diff --git a/redhat/main/tdebase/file_contexts.el6 b/redhat/main/tdebase/file_contexts.el6
deleted file mode 100644
index 71b45c3..0000000
--- a/redhat/main/tdebase/file_contexts.el6
+++ /dev/null
@@ -1,8 +0,0 @@
-/etc/trinity/kdm/Xreset	--	system_u:object_r:xsession_exec_t:s0
-/etc/trinity/kdm/Xsession	--	system_u:object_r:xsession_exec_t:s0
-/etc/trinity/kdm/Xstartup	--	system_u:object_r:xsession_exec_t:s0
-/etc/trinity/kdm/backgroundrc  system_u:object_r:xdm_var_run_t:s0
-/opt/trinity/bin/kdesu	--	system_u:object_r:su_exec_t:s0
-/opt/trinity/bin/kdm	--	system_u:object_r:xdm_exec_t:s0
-/root/\.trinity(/.*)?	system_u:object_r:config_home_t:s0
-/home/[^/]*/\.trinity(/.*)?  unconfined_u:object_r:config_home_t:s0
diff --git a/redhat/main/tdebase/file_contexts.fc17 b/redhat/main/tdebase/file_contexts.fc17
deleted file mode 100644
index 71b45c3..0000000
--- a/redhat/main/tdebase/file_contexts.fc17
+++ /dev/null
@@ -1,8 +0,0 @@
-/etc/trinity/kdm/Xreset	--	system_u:object_r:xsession_exec_t:s0
-/etc/trinity/kdm/Xsession	--	system_u:object_r:xsession_exec_t:s0
-/etc/trinity/kdm/Xstartup	--	system_u:object_r:xsession_exec_t:s0
-/etc/trinity/kdm/backgroundrc  system_u:object_r:xdm_var_run_t:s0
-/opt/trinity/bin/kdesu	--	system_u:object_r:su_exec_t:s0
-/opt/trinity/bin/kdm	--	system_u:object_r:xdm_exec_t:s0
-/root/\.trinity(/.*)?	system_u:object_r:config_home_t:s0
-/home/[^/]*/\.trinity(/.*)?  unconfined_u:object_r:config_home_t:s0
2150671c 2016-10-05 13:06:56 François Andriot
RPM packaging: update build script
M redhat/build/build_rpm_package.sh
diff --git a/redhat/build/build_rpm_package.sh b/redhat/build/build_rpm_package.sh
index 77a5062..127b3a0 100755
--- a/redhat/build/build_rpm_package.sh
+++ b/redhat/build/build_rpm_package.sh
@@ -4,7 +4,8 @@
 # Example: build_rpm_package.sh tdebase 14.0.0
 
 
-PKGNAME="${1##*/}"
+PKGNAME="${1%/}"
+PKGNAME="${PKGNAME##*/}"
 TDE_VERSION="${2:-14.0.0}"
 
 SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
@@ -23,48 +24,12 @@
 
 ### Check for patches
 
-# 1. Check if there is a big, monolithic patch
-PATCHDIR="${SPECFILE%/*}/patches"
-BIGPATCH="${PATCHDIR}/${PKGNAME}-${TDE_VERSION}.patch"
-if [ -r "${BIGPATCH}" ]; then
-  cp -f "${BIGPATCH}" "${TEMPDIR}/one.patch"
-fi
-
-# 2. Check if there are small, local patches
 PATCHDIR="${SPECFILE%/*}/patches/${TDE_VERSION}"
-PATCHLIST="${PATCHDIR}/patches.list"
-if [ -r "${PATCHLIST}" ]; then
-  while read l; do
-    APPLY=""
-    case "${l}" in
-      ""|"#"*);;
-     *"opensuse"*) [ -r /etc/SuSE-release ] && APPLY=1;;
-     *) APPLY=1;;
-    esac
-    
-    if [ "${APPLY}" ]; then
-      if [ -r "${PATCHDIR}/${l}" ]; then
-        echo "Applying patch '${l}'..."
-        cat "${PATCHDIR}/${l}" >>"${TEMPDIR}/one.patch"
-      else
-        echo "ERROR: invalid patch '${l}' !!"
-        exit 3
-      fi
-    fi
-  done < "${PATCHLIST}"
-fi
-
-if [ -r "${TEMPDIR}/one.patch" ]; then
-  sed -i "${TEMPDIR}/"*.spec \
+if [ -d "${PATCHDIR}" ]; then
+  cat "${PATCHDIR}/"*".patch" >>"${TEMPDIR}/one.patch"
+  sed -i "${TEMPDIR}/"*".spec" \
       -e "/^Source0:/ s/$/\nPatch389: one.patch/" \
       -e "/%setup/ s/$/\n%patch389 -p1/"
-fi
-
-# 3. PCLinuxOS hack ...
-if [ -r "/etc/pclinuxos-release" ]; then
-  sed -i "${TEMPDIR}/${SPECFILE##*/}" \
-      -e "/admin\/Makefile.common/ s|^|touch config.h.in;|" \
-      || exit 1
 fi
 
 [ -d "${BUILDDIR}" ] || mkdir -p "${BUILDDIR}"