Solaris/SUNWgnome-sys-suspend.spec
author dcarbery
Fri, 24 Nov 2006 16:37:59 +0000
branch217update
changeset 19096 d542fc2c823e
parent 8565 b102e7809c6e
child 8728 fba49a253cf0
child 19065 e0693edbfee0
permissions -rw-r--r--
Merged trunk changes r9797:9829 into 217update branch.

#
# spec file for package SUNWgnome-sys-suspend
#
# includes module(s): gnome-sys-suspend
#
# Copyright (c) 2004 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: yippi
#
%include Solaris.inc
Name:                    SUNWgnome-sys-suspend
Summary:                 GNOME system suspend application
Version:                 %{default_pkg_version}
%define tarball_version  0.3
Release:                 3
Source:                  gnome-sys-suspend-%{tarball_version}.tar.gz
Source1:                 %{name}-manpages-0.1.tar.gz
Source2:                 l10n-configure.sh 
Patch1:                  gnome-sys-suspend-01-security-check.diff
Patch2:                  gnome-sys-suspend-02-cmd-options.diff
Patch3:                  gnome-sys-suspend-03-check-a11y.diff
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-libs
Requires: SUNWgnome-config
Requires: SUNWxwrtl
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-libs-devel

%description
gnome-sys-suspend is an application in Solaris, which provides options
to suspend or shutdown the whole system. This application ensures that
the system is EnergyStar compliant. It can be invoked by pressing
SunPowerSwitch key. sys-suspend involves some code which requires SUID
root privileges. But it is not advisable to write SUID programs using
GTK+ toolkit because of security issues. So, in GNOME environment,
suspend functionality will be handled using two separate applications.
First one, gnome-sys-suspend, is the GUI part which takes care of
showing the suspend window and other dialogs, for interacting with the
user. The second one, gnome-suspend, is a self contained application
and contains the code parts which truly require SUID root privileges.

%if %build_l10n
%package l10n
Summary:                 %{summary} - l10n files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}
%endif

%prep
%setup -c -n %name-%tarball_version
cd gnome-sys-suspend-%{tarball_version}
gzcat %SOURCE1 | tar xf -
%patch1 -p1
%patch2 -p1
%patch3 -p1

bash -x %SOURCE2

%build
cd gnome-sys-suspend-%{tarball_version}
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig:/usr/lib/pkgconfig
export CFLAGS="%optflags"
export RPM_OPT_FLAGS="$CFLAGS"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export LDFLAGS="%_ldflags"

glib-gettextize --force --copy
intltoolize --force --automake
libtoolize --force
aclocal $ACLOCAL_FLAGS
autoheader
automake -a -c -f
autoconf

# FIXME: Hack to create missing po files.
touch po/pl.po po/ru.po

./configure --prefix=%{_prefix}	\
	    --libexecdir=%{_libexecdir}

%install
cd gnome-sys-suspend-%{tarball_version}
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{_mandir}
cd sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%attr (4711, root, bin) %{_libexecdir}/gnome-suspend
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif

%changelog
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Wed May 10 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Mon Feb 20 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Mon Jan 13 2006 - [email protected]
- Add hack to create missing po files.
* Thu Dec 08 2005 - [email protected]
- Remove l10n tarball. Not maintained in OpenSolaris releases.
* Wed Nov 25 2004 - [email protected]
- Added gnome-sys-suspend-03-check-a11y.diff to check for a11y before 
  doing a pointer grab. Fixes stopper bug #6196573.
* Wed Nov 24 2004 - [email protected]
- updating l10n tarballs to fix 5094817
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Sat Sep 25 2004 - <[email protected]>
- Added patch gnome-sys-suspend-02-cmd-options.diff to (a) Provide standard
  GTK commandline options and (b) Change the path of SUID gnome-suspend
  program from /usr/sbin/ to /usr/lib/.
* Tue Aug 31 2004 - [email protected]
- enable nls for fixing #5094817, bump tarball version to 0.3
* Mon Aug 23 2004 - [email protected]
- s/SUNWpl5u/SUNWperl584usr/
* Wed Jul 21 2004 - <[email protected]>
- Added patch gnome-sys-suspend-01-security-check.diff to add an extra 
  check to make sure that only authorised users can suspend, shutdown, 
  lowpower the system. This will avoid system from misuse.
* Wed Jul 14 2004 - <[email protected]>
- add %defattr to %files share (fixes 5073629)
* Mon Jul 05 2004 - <[email protected]>
- Add BuildRequires: SUNWgnome-base-libs-devel
* Sun Jun 27 2004 - <[email protected]>
- Changed install location to /usr/...
* Thu Jun 10 2004 - <[email protected]>
- Added %file entries for _prefix and _datadir for share package
* Wed Jun 09 2004 - <[email protected]>
- Provide man page for gnome-sys-suspend. Added SGML man page integration.
* Fri May 14 2004 - <[email protected]>
- Bump the tarball version to 0.2. Also fixed one build issue and provided 
  accessibility support to the component.
* Tue May 04 2004 - <[email protected]>
- change to package version to 2.6.0
* Mon Apr 26 2004 - <[email protected]>
- initial version of spec file