summaryrefslogtreecommitdiffstats
path: root/redhat/extras
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2014-11-08 17:15:22 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2014-11-08 17:15:22 +0100
commitd2b032d3569b948e381ba46e7c7bec915c3c76f1 (patch)
treed7de878f30e47d4e6d3222498a89c4fa479c5f53 /redhat/extras
parentb6c0395a4d0b2ff4b4489c6462ff915922ddab0e (diff)
downloadtde-packaging-d2b032d3569b948e381ba46e7c7bec915c3c76f1.tar.gz
tde-packaging-d2b032d3569b948e381ba46e7c7bec915c3c76f1.zip
RPM packaging: update brp-check-trinity
Diffstat (limited to 'redhat/extras')
-rw-r--r--redhat/extras/brp-check-trinity/brp-check-trinity.spec54
1 files changed, 32 insertions, 22 deletions
diff --git a/redhat/extras/brp-check-trinity/brp-check-trinity.spec b/redhat/extras/brp-check-trinity/brp-check-trinity.spec
index 4cabb5782..5f2d31ea5 100644
--- a/redhat/extras/brp-check-trinity/brp-check-trinity.spec
+++ b/redhat/extras/brp-check-trinity/brp-check-trinity.spec
@@ -58,31 +58,41 @@ It should not be installed on runtime computer.
%files
%post
-echo "Patching openSUSE brp scripts ..."
-sed -i.orig \
- /usr/lib/rpm/brp-desktop.data/applications.menu \
- /usr/lib/rpm/brp-desktop.data/kde-settings.menu \
- /usr/lib/rpm/brp-desktop.data/xdg_menu \
- /usr/lib/rpm/brp-suse.d/brp-25-symlink \
- /usr/lib/rpm/brp-suse.d/brp-72-extract-appdata \
- /usr/lib/rpm/suse_update_desktop_file.sh \
- -e "s|opt/kde3|opt/trinity|g" \
- -e "s|kde-config|tde-config|g" \
- -e "s|kdesu|tdesu|g" \
- -e "s|kde-settings-|tde-settings-|g" \
- -e "s|doc/kde|doc/tde|g" \
- -e "s|kde_xdgdata|tde_xdgdata|g" \
- -e "s|applications/kde|applications/tde|g" \
- -e "s|KDE|TDE|g"
+for i in \
+ brp-desktop.data/applications.menu \
+ brp-desktop.data/kde-settings.menu \
+ brp-desktop.data/xdg_menu \
+ brp-suse.d/brp-25-symlink \
+ brp-suse.d/brp-72-extract-appdata \
+ suse_update_desktop_file.sh \
+; do
+ echo "Patching file '/usr/lib/rpm/${i}' ..."
+ install -D "/usr/lib/rpm/${i}" "/usr/lib/rpm.orig/${i}"
+ sed -i "/usr/lib/rpm/${i}" \
+ -e "s|opt/kde3|opt/trinity|g" \
+ -e "s|kde-config|tde-config|g" \
+ -e "s|kdesu|tdesu|g" \
+ -e "s|kde-settings-|tde-settings-|g" \
+ -e "s|doc/kde|doc/tde|g" \
+ -e "s|kde_xdgdata|tde_xdgdata|g" \
+ -e "s|applications/kde|applications/tde|g" \
+ -e "s|KDE|TDE|g"
+done
%postun
-find /usr/lib/rpm -name "*.orig" | while read f; do
- echo "Restoring original file: '${f%.orig}'"
- mv -f "${f}" "${f%.orig}"
-done
-
-
+for i in \
+ brp-desktop.data/applications.menu \
+ brp-desktop.data/kde-settings.menu \
+ brp-desktop.data/xdg_menu \
+ brp-suse.d/brp-25-symlink \
+ brp-suse.d/brp-72-extract-appdata \
+ suse_update_desktop_file.sh \
+; do
+ echo "Restoring file '/usr/lib/rpm/${i}' ..."
+ install "/usr/lib/rpm.orig/${i}" "/usr/lib/rpm/${i}"
+done
+rm -rf "/usr/lib/rpm.orig"
##########