summaryrefslogtreecommitdiffstats
path: root/redhat/tdebase
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2013-12-27 15:51:58 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2013-12-27 15:51:58 +0100
commit43ed3b6077952745b04a8c749726871f7cd76142 (patch)
treeafc5f714f5bdb7754ed6a7eeb16b0a2e24e7a747 /redhat/tdebase
parent5ffeb7a6799ee097cb794803e60116821102f305 (diff)
downloadtde-packaging-43ed3b6077952745b04a8c749726871f7cd76142.tar.gz
tde-packaging-43ed3b6077952745b04a8c749726871f7cd76142.zip
RPM Packaging: fix alternatives commands
Diffstat (limited to 'redhat/tdebase')
-rw-r--r--redhat/tdebase/tdebase-14.0.0.spec23
-rw-r--r--redhat/tdebase/tdebase-3.5.13.2.spec34
2 files changed, 42 insertions, 15 deletions
diff --git a/redhat/tdebase/tdebase-14.0.0.spec b/redhat/tdebase/tdebase-14.0.0.spec
index 2cb0e5e30..57433ec89 100644
--- a/redhat/tdebase/tdebase-14.0.0.spec
+++ b/redhat/tdebase/tdebase-14.0.0.spec
@@ -2047,14 +2047,17 @@ already. Most users won't need this.
%config(noreplace) %{_sysconfdir}/pam.d/tdm-trinity
%config(noreplace) %{_sysconfdir}/pam.d/tdm-trinity-np
%endif
-%if 0%{?suse_version}
+
+# Distribution specific stuff
+%if 0%{?suse_version} == 1140
+%{_sysconfdir}/init.d/xdm.tde
+%endif
+%if 0%{?suse_version} >= 1210
/usr/lib/X11/displaymanagers/tdm
%endif
%if 0%{?fedora} >= 18
/usr/lib/systemd/system/tdm.service
%endif
-
-# Distribution specific stuff
%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
%{_datadir}/xsessions/tde.desktop
%endif
@@ -2105,6 +2108,11 @@ if [ "$1" = "1" ]; then
%__sed -i "%{_sysconfdir}/trinity/tdm/tdmrc" -e "s|^#*Language=.*|Language=${LANG}|"
fi
fi
+# openSUSE 11.4 tdm's startup script
+if [ -r "%{_sysconfdir}/init.d/xdm.tde" ]; then
+ cat "%{_sysconfdir}/init.d/xdm.tde" >"%{_sysconfdir}/init.d/xdm"
+fi
+
%posttrans -n trinity-tdm
# Make sure that TDM configuration files are now under '/etc/trinity/tdm'
@@ -2589,7 +2597,6 @@ ever launching another application.
%exclude %{tde_datadir}/apps/konqueror/servicemenus/installfont.desktop
%{tde_datadir}/apps/konqueror/servicemenus/*.desktop
%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_tdebase
-%{_sysconfdir}/alternatives/media_safelyremove.desktop_tdebase
%{tde_datadir}/apps/konqueror/tiles/*.png
%{tde_datadir}/autostart/konqy_preload.desktop
%{tde_datadir}/config.kcfg/keditbookmarks.kcfg
@@ -3481,9 +3488,6 @@ EOF
# Makes 'media_safelyremove.desktop' an alternative
%__mv -f "%{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop" "%{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_tdebase"
-%__ln_s "%{_sysconfdir}/alternatives/media_safelyremove.desktop_tdebase" "%{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop"
-%__mkdir_p "%{?buildroot}%{_sysconfdir}/alternatives"
-%__ln_s "%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_tdebase" "%{?buildroot}%{_sysconfdir}/alternatives/media_safelyremove.desktop_tdebase"
# SUSE >= 12 : creates DM config file, used by '/etc/init.d/xdm'
# You must set 'DISPLAYMANAGER=tdm' in '/etc/sysconfig/displaymanager'
@@ -3512,6 +3516,11 @@ EOF
%__install -D -m 644 "%{SOURCE9}" "%{?buildroot}%{tde_datadir}/oxygen/scalable/mgabutton.svg"
%endif
+# openSUSE 11.4: tdm startup script
+%if 0%{?suse_version} == 1140
+%__install -D -m 755 "%{SOURCE7}" "%{?buildroot}%{?_sysconfdir}/init.d/xdm.tde"
+%endif
+
%clean
%__rm -rf %{?buildroot}
diff --git a/redhat/tdebase/tdebase-3.5.13.2.spec b/redhat/tdebase/tdebase-3.5.13.2.spec
index b8f3cc267..7ed043177 100644
--- a/redhat/tdebase/tdebase-3.5.13.2.spec
+++ b/redhat/tdebase/tdebase-3.5.13.2.spec
@@ -75,7 +75,7 @@ Source7: xdm.oss114
%endif
# Fedora 17: special selinux policy required
-%if 0%{?fedora} == 17 ||0%{?fedora} == 19 || 0%{?rhel} == 6
+%if 0%{?fedora} >= 17 || 0%{?rhel} == 6
%define with_selinux_policy 1
Source8: tdm%{?dist}.pp
%endif
@@ -349,7 +349,12 @@ BuildRequires: glib2-devel
BuildRequires: pcre-devel
# SASL support
+%if 0%{?mageia} || 0%{?mandriva} || 0%{?pclinuxos}
+BuildRequires: %{_lib}sasl2-devel
+%endif
+%if 0%{?suse_version}
BuildRequires: cyrus-sasl-devel
+%endif
# LIBUSB support
BuildRequires: pam-devel
@@ -2035,6 +2040,7 @@ Provides: service(graphical-login)
# Required for Mandriva's installer
%if 0%{?mgaversion} || 0%{?mdkversion}
Provides: dm
+Provides: tdm
%endif
%description -n trinity-tdm
@@ -2630,7 +2636,6 @@ ever launching another application.
%exclude %{tde_datadir}/apps/konqueror/servicemenus/installfont.desktop
%{tde_datadir}/apps/konqueror/servicemenus/*.desktop
%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_tdebase
-%{_sysconfdir}/alternatives/media_safelyremove.desktop_tdebase
%{tde_datadir}/apps/konqueror/tiles/*.png
%{tde_datadir}/autostart/konqy_preload.desktop
%{tde_datadir}/config.kcfg/keditbookmarks.kcfg
@@ -2894,7 +2899,7 @@ TDE will start, but many good defaults will not be set.
%{tde_datadir}/apps/kconf_update/move_session_config.sh
%{tde_datadir}/apps/ksmserver/pics/shutdownkonq.png
-# Remove conflicts with redhat-menus
+# Remove conflicts with KDE4
%if "%{?tde_prefix}" != "/usr"
%{tde_bindir}/plasma-desktop
%endif
@@ -3372,6 +3377,21 @@ Windows and Samba shares.
%__sed -i "kdm/kfrontend/genkdmconf.c" -e "s|/etc/X11/Xsession|/etc/X11/xdm/Xsession|"
%endif
+# Reboot command location may vary on some distributions
+if [ -x "/usr/bin/reboot" ]; then
+ POWEROFF="/usr/bin/poweroff"
+ REBOOT="/usr/bin/reboot"
+fi
+if [ -n "${REBOOT}" ]; then
+ %__sed -i \
+ "doc/tdm/index.docbook" \
+ "doc/kcontrol/tdm/index.docbook" \
+ "kcontrol/tdm/tdm-shut.cpp" \
+ "tdm/config.def" \
+ -e "s|/sbin/poweroff|${POWEROFF}|g" \
+ -e "s|/sbin/reboot|${REBOOT}|g"
+fi
+
%build
unset QTDIR QTINC QTLIB
@@ -3414,6 +3434,7 @@ fi
-DSYSCONF_INSTALL_DIR="%{_sysconfdir}/trinity" \
-DXDG_MENU_INSTALL_DIR="%{_sysconfdir}/xdg/menus" \
\
+ -DWITH_ALL_OPTIONS=ON \
-DWITH_SASL=ON \
-DWITH_LDAP=ON \
-DWITH_SAMBA=ON \
@@ -3514,7 +3535,7 @@ EOF
# TDM configuration
%__sed -i "%{?buildroot}%{_sysconfdir}/trinity/kdm/kdmrc" \
-%if 0%{?fedora} >= 16 || 0%{?suse_version} >= 1220
+%if 0%{?fedora} >= 16 || 0%{?suse_version} >= 1210
-e "s/^#*MinShowUID=.*/MinShowUID=1000/"
%else
-e "s/^#*MinShowUID=.*/MinShowUID=500/"
@@ -3530,11 +3551,8 @@ EOF
# Makes 'media_safelyremove.desktop' an alternative
%__mv -f "%{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop" "%{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_tdebase"
-%__ln_s "%{_sysconfdir}/alternatives/media_safelyremove.desktop_tdebase" "%{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop"
-%__mkdir_p "%{?buildroot}%{_sysconfdir}/alternatives"
-%__ln_s "%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_tdebase" "%{?buildroot}%{_sysconfdir}/alternatives/media_safelyremove.desktop_tdebase"
-# SUSE: creates DM config file, used by '/etc/init.d/xdm'
+# SUSE >= 12 : creates DM config file, used by '/etc/init.d/xdm'
# You must set 'DISPLAYMANAGER=tdm' in '/etc/sysconfig/displaymanager'
%if 0%{?suse_version} >= 1210
%__install -D -m 644 "%{SOURCE6}" "%{?buildroot}/usr/lib/X11/displaymanagers/tdm"