summaryrefslogtreecommitdiffstats
path: root/redhat/applications/settings
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/applications/settings')
-rw-r--r--redhat/applications/settings/tde-guidance/tde-guidance.spec298
1 files changed, 91 insertions, 207 deletions
diff --git a/redhat/applications/settings/tde-guidance/tde-guidance.spec b/redhat/applications/settings/tde-guidance/tde-guidance.spec
index 7775efeb5..3e2932e27 100644
--- a/redhat/applications/settings/tde-guidance/tde-guidance.spec
+++ b/redhat/applications/settings/tde-guidance/tde-guidance.spec
@@ -63,12 +63,13 @@ BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: trinity-tdebase-devel >= %{tde_version}
BuildRequires: desktop-file-utils
+BuildRequires: trinity-tde-cmake >= %{tde_version}
BuildRequires: trinity-pytdeextensions
BuildRequires: trinity-libpythonize0-devel
BuildRequires: trinity-pytde
BuildRequires: chrpath
-BuildRequires: autoconf automake libtool m4
+BuildRequires: libtool
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: fdupes
@@ -92,14 +93,6 @@ BuildRequires: pytqt-devel
BuildRequires: trinity-pytde-devel
BuildRequires: trinity-pytqt-tools
-# LIBXXF86VM support
-%if 0%{?mgaversion} || 0%{?mdkversion}
-BuildRequires: %{_lib}xxf86vm-devel
-%endif
-%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version} >= 1210
-BuildRequires: libXxf86vm-devel
-%endif
-
# XSCREENSAVER support
# RHEL 4: disabled
# RHEL 6: available in EPEL
@@ -191,38 +184,37 @@ or can be run as standalone applications.
%{tde_tdeappdir}/*.desktop
%{tde_datadir}/icons/crystalsvg/*/*/*.png
%if 0%{?pclinuxos} || 0%{?rhel} == 7 || 0%{?suse_version}
-%{python_sitearch}/%{name}/SMBShareSelectDialog.py*
-%{python_sitearch}/%{name}/SimpleCommandRunner.py*
-%{python_sitearch}/%{name}/fuser.py*
-%{python_sitearch}/%{name}/fuser_ui.py*
-%{python_sitearch}/%{name}/mountconfig.py*
-%{python_sitearch}/%{name}/serviceconfig.py*
-%{python_sitearch}/%{name}/sizeview.py*
-%{python_sitearch}/%{name}/unixauthdb.py*
-%{python_sitearch}/%{name}/userconfig.py*
+%{python_sitelib}/tde-guidance/SMBShareSelectDialog.py*
+%{python_sitelib}/tde-guidance/SimpleCommandRunner.py*
+%{python_sitelib}/tde-guidance/fuser.py*
+%{python_sitelib}/tde-guidance/fuser_ui.py*
+%{python_sitelib}/tde-guidance/mountconfig.py*
+%{python_sitelib}/tde-guidance/serviceconfig.py*
+%{python_sitelib}/tde-guidance/sizeview.py*
+%{python_sitelib}/tde-guidance/unixauthdb.py*
+%{python_sitelib}/tde-guidance/userconfig.py*
%if 0%{?rhel} == 7
-%{python_sitearch}/%{name}/__pycache__/SMBShareSelectDialog.*.pyc
-%{python_sitearch}/%{name}/__pycache__/SimpleCommandRunner.*.pyc
-%{python_sitearch}/%{name}/__pycache__/fuser.*.pyc
-%{python_sitearch}/%{name}/__pycache__/fuser_ui.*.pyc
-%{python_sitearch}/%{name}/__pycache__/mountconfig.*.pyc
-%{python_sitearch}/%{name}/__pycache__/serviceconfig.*.pyc
-%{python_sitearch}/%{name}/__pycache__/sizeview.*.pyc
-%{python_sitearch}/%{name}/__pycache__/unixauthdb.*.pyc
-%{python_sitearch}/%{name}/__pycache__/userconfig.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/SMBShareSelectDialog.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/SimpleCommandRunner.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/fuser.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/fuser_ui.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/mountconfig.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/serviceconfig.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/sizeview.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/unixauthdb.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/userconfig.*.pyc
%endif
%else
-%pycached %{python_sitearch}/%{name}/SMBShareSelectDialog.py
-%pycached %{python_sitearch}/%{name}/SimpleCommandRunner.py
-%pycached %{python_sitearch}/%{name}/fuser.py
-%pycached %{python_sitearch}/%{name}/fuser_ui.py
-%pycached %{python_sitearch}/%{name}/mountconfig.py
-%pycached %{python_sitearch}/%{name}/serviceconfig.py
-%pycached %{python_sitearch}/%{name}/sizeview.py
-%pycached %{python_sitearch}/%{name}/unixauthdb.py
-%pycached %{python_sitearch}/%{name}/userconfig.py
+%pycached %{python_sitelib}/tde-guidance/SMBShareSelectDialog.py
+%pycached %{python_sitelib}/tde-guidance/SimpleCommandRunner.py
+%pycached %{python_sitelib}/tde-guidance/fuser.py
+%pycached %{python_sitelib}/tde-guidance/fuser_ui.py
+%pycached %{python_sitelib}/tde-guidance/mountconfig.py
+%pycached %{python_sitelib}/tde-guidance/serviceconfig.py
+%pycached %{python_sitelib}/tde-guidance/sizeview.py
+%pycached %{python_sitelib}/tde-guidance/unixauthdb.py
+%pycached %{python_sitelib}/tde-guidance/userconfig.py
%endif
-%{tde_tdedocdir}/HTML/en/guidance/
# Files from powermanager
%if 0%{?with_powermanager}
@@ -232,6 +224,11 @@ or can be run as standalone applications.
%exclude %{tde_datadir}/apps/guidance/pics/processor.png
%endif
+%{tde_tdedocdir}/HTML/en/tde-guidance/
+%{tde_mandir}/man1/mountconfig-trinity.1*
+%{tde_mandir}/man1/serviceconfig-trinity.1*
+%{tde_mandir}/man1/userconfig-trinity.1*
+
##########
%package backends
@@ -251,20 +248,15 @@ Guidance configuration tools.
%files backends
%defattr(-,root,root,-)
-%dir %{python_sitearch}/%{name}
+%dir %{python_sitelib}/tde-guidance
%if 0%{?pclinuxos} || 0%{?rhel} == 7 || 0%{?suse_version}
-%{python_sitearch}/%{name}/MicroHAL.py*
-%{python_sitearch}/%{name}/xf86misc.py*
+%{python_sitelib}/tde-guidance/MicroHAL.py*
%if 0%{?rhel} == 7
-%{python_sitearch}/%{name}/__pycache__/MicroHAL.*.pyc
-%{python_sitearch}/%{name}/__pycache__/xf86misc.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/MicroHAL.*.pyc
%endif
%else
-%pycached %{python_sitearch}/%{name}/MicroHAL.py
-%pycached %{python_sitearch}/%{name}/xf86misc.py
+%pycached %{python_sitelib}/tde-guidance/MicroHAL.py
%endif
-%{python_sitearch}/ixf86misc*.so
-%{python_sitearch}/xf86misc*.pyc
##########
@@ -292,31 +284,31 @@ suspend using HAL.
%defattr(-,root,root,-)
%{tde_bindir}/guidance-power-manager
%if 0%{?pclinuxos} || 0%{?rhel} == 7 || 0%{?suse_version}
-%{python_sitearch}/%{name}/MicroHAL.py*
-%{python_sitearch}/%{name}/guidance-power-manager.py*
-%{python_sitearch}/%{name}/powermanage.py*
-%{python_sitearch}/%{name}/gpmhelper.py*
-%{python_sitearch}/%{name}/powermanager_ui.py*
-%{python_sitearch}/%{name}/guidance_power_manager_ui.py*
-%{python_sitearch}/%{name}/notify.py*
-%{python_sitearch}/%{name}/tooltip.py*
-%{python_sitearch}/%{name}/__pycache__/MicroHAL.*.pyc
-%{python_sitearch}/%{name}/__pycache__/guidance-power-manager.*.pyc
-%{python_sitearch}/%{name}/__pycache__/powermanage.*.pyc
-%{python_sitearch}/%{name}/__pycache__/gpmhelper.*.pyc
-%{python_sitearch}/%{name}/__pycache__/powermanager_ui.*.pyc
-%{python_sitearch}/%{name}/__pycache__/guidance_power_manager_ui.*.pyc
-%{python_sitearch}/%{name}/__pycache__/notify.*.pyc
-%{python_sitearch}/%{name}/__pycache__/tooltip.*.pyc
+%{python_sitelib}/tde-guidance/MicroHAL.py*
+%{python_sitelib}/tde-guidance/guidance-power-manager.py*
+%{python_sitelib}/tde-guidance/powermanage.py*
+%{python_sitelib}/tde-guidance/gpmhelper.py*
+%{python_sitelib}/tde-guidance/powermanager_ui.py*
+%{python_sitelib}/tde-guidance/guidance_power_manager_ui.py*
+%{python_sitelib}/tde-guidance/notify.py*
+%{python_sitelib}/tde-guidance/tooltip.py*
+%{python_sitelib}/tde-guidance/__pycache__/MicroHAL.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/guidance-power-manager.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/powermanage.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/gpmhelper.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/powermanager_ui.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/guidance_power_manager_ui.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/notify.*.pyc
+%{python_sitelib}/tde-guidance/__pycache__/tooltip.*.pyc
%else
-%pycached %{python_sitearch}/%{name}/MicroHAL.py
-%pycached %{python_sitearch}/%{name}/guidance-power-manager.py
-%pycached %{python_sitearch}/%{name}/powermanage.py
-%pycached %{python_sitearch}/%{name}/gpmhelper.py
-%pycached %{python_sitearch}/%{name}/powermanager_ui.py
-%pycached %{python_sitearch}/%{name}/guidance_power_manager_ui.py
-%pycached %{python_sitearch}/%{name}/notify.py
-%pycached %{python_sitearch}/%{name}/tooltip.py
+%pycached %{python_sitelib}/tde-guidance/MicroHAL.py
+%pycached %{python_sitelib}/tde-guidance/guidance-power-manager.py
+%pycached %{python_sitelib}/tde-guidance/powermanage.py
+%pycached %{python_sitelib}/tde-guidance/gpmhelper.py
+%pycached %{python_sitelib}/tde-guidance/powermanager_ui.py
+%pycached %{python_sitelib}/tde-guidance/guidance_power_manager_ui.py
+%pycached %{python_sitelib}/tde-guidance/notify.py
+%pycached %{python_sitelib}/tde-guidance/tooltip.py
%endif
%{tde_datadir}/icons/hicolor/22x22/apps/power-manager.png
%{tde_datadir}/apps/guidance/pics/ac-adapter.png
@@ -347,151 +339,43 @@ suspend using HAL.
%build
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
-#export PYTHONPATH=%{python_sitearch}/pytqt
-
-# Avoids 'error: byte-compiling is disabled.' on Mandriva/Mageia
-export PYTHONDONTWRITEBYTECODE=
+export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig"
-# FTBFS on PCLOS ...
export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -I%{tde_tdeincludedir} -I%{tde_includedir}"
-# Specific path for RHEL4
-if [ -d /usr/X11R6 ]; then
- export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -I/usr/X11R6/include -L/usr/X11R6/%{_lib}"
- %__sed -i "setup.py" -e "s|/usr/X11R6/lib|/usr/X11R6/%{_lib}|g"
+if ! rpm -E %%cmake|grep -q "cd build"; then
+ %__mkdir_p build
+ cd build
fi
-# FIXME: ordinal not in range in rhel7
-%if 0%{?rhel} == 7
-export LC_ALL=en_US.UTF-8
-%endif
-
-%__python ./setup.py build
+# Warning: GCC visibility causes FTBFS [Bug #1285]
+%cmake \
+ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
+ -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
+ -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
+ -DCMAKE_SKIP_RPATH=OFF \
+ -DCMAKE_SKIP_INSTALL_RPATH=OFF \
+ -DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
+ -DCMAKE_NO_BUILTIN_CHRPATH=ON \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DWITH_GCC_VISIBILITY=OFF \
+ \
+ -DBIN_INSTALL_DIR=%{tde_bindir} \
+ -DCONFIG_INSTALL_DIR="%{tde_confdir}" \
+ -DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \
+ -DLIB_INSTALL_DIR=%{tde_libdir} \
+ -DSHARE_INSTALL_PREFIX=%{tde_datadir} \
+ \
+ -DBUILD_ALL="ON" \
+ -DWITH_ALL_OPTIONS="ON" \
+ ..
+
+%__make %{?_smp_mflags} || %__make
%install
-unset QTDIR QTINC QTLIB
-export PATH="%{tde_bindir}:${PATH}"
-export EXTRA_MODULE_DIR="%{python_sitearch}/%{name}"
-export SIPTQT_DIR="%{python_sitearch}/sip4_tqt"
-export PYTHONPATH="%{python_sitearch}/pytqt"
-
-# Support for 'sip4-tqt'
-export PYTHONPATH="%{python_sitearch}/sip4_tqt:${PYTHONPATH}"
-
-# For Mageia/Mandriva: Avoids 'error: byte-compiling must be disabled.
-export PYTHONDONTWRITEBYTECODE=
-
-# FIXME: ordinal not in range in rhel7
-%if 0%{?rhel} == 7
-export LC_ALL=en_US.UTF-8
-%endif
-
-%__rm -rf %{buildroot}
-%__python ./setup.py install \
- --prefix=%{tde_prefix} \
- --root=%{buildroot}
-
-# Fix temporary build directories remaining inside .py files
-for f in %{buildroot}%{tde_datadir}/apps/guidance/*.py; do
- %__sed -i "${f}" -e "s|%{buildroot}||g"
-done
-
-##### MAIN PACKAGE INSTALLATION (based on Debian/Ubuntu packaging rules)
-# install icons to right place
-%__mkdir_p %{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps
-%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-app-daemons.png \
- %{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/daemons.png
-%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/kcmpartitions.png \
- %{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/disksfilesystems.png
-%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-user.png \
- %{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/userconfig.png
-
-# fix binary-or-shlib-defines-rpath
-chrpath -r %{tde_libdir} %{buildroot}%{tde_tdelibdir}/kcm_*.so
-
-# move python modules in %{python_sitearch} (/usr/lib/pythonXX/site-packages)
-%__mkdir_p %{buildroot}%{python_sitearch}/%{name}
-%__mv -f %{buildroot}%{tde_datadir}/apps/guidance/*.py* %{buildroot}%{python_sitearch}/%{name}
-
-# Generates the startup scripts
-%__rm -f %{buildroot}%{tde_bindir}/*
-%__ln_s -f %{python_sitearch}/%{name}/mountconfig.py %{buildroot}%{tde_bindir}/mountconfig
-%__ln_s -f %{python_sitearch}/%{name}/serviceconfig.py %{buildroot}%{tde_bindir}/serviceconfig
-%__ln_s -f %{python_sitearch}/%{name}/userconfig.py %{buildroot}%{tde_bindir}/userconfig
-
-# fix script-not-executable
-%__chmod 0755 %{buildroot}%{python_sitearch}/%{name}/fuser.py
-
-##### BACKENDS INSTALLATION
-
-# The xf86misc stuff should not go under /opt/trinity bur under /usr !!!
-%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/ixf86misc*.so %{buildroot}%{python_sitearch}/
-%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/__pycache__/xf86misc*.pyc %{buildroot}%{python_sitearch}/
-%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/xf86misc.py* %{buildroot}%{python_sitearch}/%{name}/
-
-%if 0%{?rhel} || 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion}
-%__rm -f %{buildroot}%{tde_datadir}/apps/guidance/MonitorsDB
-%__ln_s -f /usr/share/hwdata/MonitorsDB %{buildroot}%{tde_datadir}/apps/guidance/MonitorsDB
-%endif
-
-%if 0%{?with_powermanager}
-##### POWERMANAGER INSTALLATION
-# install icon to right place
-%__install -D -p -m0644 kde/powermanager/pics/battery-charging-100.png \
- %{buildroot}%{tde_datadir}/icons/hicolor/22x22/apps/power-manager.png
-%__install -D -p -m0644 kde/powermanager/pics/*.png \
- %{buildroot}%{tde_datadir}/apps/guidance/pics/
-
-# install desktop file
-%__install -D -p -m0644 powermanager/guidance-power-manager.desktop \
- %{buildroot}%{tde_datadir}/autostart/guidance-power-manager.desktop
-
-# copy python modules in PYSUPPORT_PATH
-%__cp powermanager/guidance_power_manager_ui.py %{buildroot}%{python_sitearch}/%{name}
-%__cp powermanager/notify.py %{buildroot}%{python_sitearch}/%{name}
-%__cp powermanager/tooltip.py %{buildroot}%{python_sitearch}/%{name}
-
-# generate guidance-power-manager script
-cat <<EOF >%{?buildroot}%{tde_bindir}/guidance-power-manager
-#!/bin/sh
-export PYTHONPATH=%{python_sitearch}/%{name}:%{python_sitearch}/sip4-tqt
-%{python_sitearch}/%{name}/guidance-power-manager.py &
-EOF
-chmod +x %{buildroot}%{tde_bindir}/guidance-power-manager
-
-# fix script-not-executable
-chmod 0755 %{buildroot}%{python_sitearch}/%{name}/powermanage.py
-chmod 0755 %{buildroot}%{python_sitearch}/%{name}/gpmhelper.py
-
-%else
-%__rm -f %{buildroot}%{python_sitearch}/%{name}/gpmhelper.py*
-%__rm -f %{buildroot}%{python_sitearch}/%{name}/guidance-power-manager.py*
-%__rm -f %{buildroot}%{python_sitearch}/%{name}/guidance_power_manager_ui.py*
-%__rm -f %{buildroot}%{python_sitearch}/%{name}/powermanage.py*
-%__rm -f %{buildroot}%{python_sitearch}/%{name}/powermanager_ui.py*
-%__rm -f %{buildroot}%{tde_datadir}/apps/guidance/powermanager_ui.ui
-
-%endif
-
-# Replace all '#!' calls to python with /usr/bin/python
-# and make them executable
-for i in `find %{buildroot} -type f`; do
- sed '1s,#!.*python[^ ]*\(.*\),#!/usr/bin/env %python\1,' \
- $i > $i.temp;
- if cmp --quiet $i $i.temp; then
- rm -f $i.temp;
- else
- mv -f $i.temp $i;
- chmod 755 $i;
- echo "fixed interpreter: $i";
- fi;
-done
-
-# Removes useless files
-find %{buildroot} -name "*.egg-info" -exec rm -f {} \;
-find %{buildroot}%{tde_libdir} -name "*.a" -exec rm -f {} \;
-%__rm -rf %{buildroot}%{tde_libdir}/python*/site-packages/guidance-*.egg-info/
+%__rm -fr $RPM_BUILD_ROOT
+%__make install DESTDIR=$RPM_BUILD_ROOT -C build
%clean