#
# Copyright (c) 2003 2004 Sun Microsystems Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
Name: netapplet
License: GPL
Group: System/GUI/GNOME
Version: 1.0.0
Release: 35
Distribution: Java Desktop System, Release 3
Vendor: Sun Microsystems, Inc.
Summary: The NetApplet allows to monitor and to control network devices.
Source: netapplet-%{version}.tar.bz2
Source1: l10n-configure.sh
Source2: netapplet-docs-0.2linux.tar.bz2
Source3: netapplet-l10n-online-help-ci-linux-1.1.tar.bz2
Source4: netapplet-l10n-po-1.14.tar.bz2
Patch1: netapplet-01-docs.diff
Patch2: netapplet-02-l10n-online-help.diff
Patch3: netapplet-03-accessibility-support.diff
Patch4: netapplet-04-no-gray-in-menu.diff
Patch5: netapplet-05-g11n-configure.diff
Patch6: netapplet-04-help-button.diff
Patch7: netapplet-04-netstatus.diff
URL: http://www.gnome.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Docdir: %{_defaultdocdir}
PreReq: pam-usermode perl
Autoreqprov: on
%define gnome_panel_version 2.0.0
%define gnome_netstatus_version 0.11
BuildRequires: javahelp-convert
Requires: gnome-panel >= %{gnome_panel_version}
Obsoletes: gnome-netstatus <= %{gnome_netstatus_version}
Provides: gnome-netstatus = %{gnome_netstatus_version}
%description
The NetApplet allows to monitor and to control network devices.
%prep
%setup -q
bzcat %SOURCE2 | tar -xf -
%patch1 -p1
bzcat %SOURCE3 | tar -xf -
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
bzcat %SOURCE4 | tar xf -
bash -x %SOURCE1
%build
if [ -x /usr/bin/getconf ]; then
CPUS=`getconf _NPROCESSORS_ONLN`
fi
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
LC_ALL=
LANG=
export LC_ALL LANG
glib-gettextize --force --copy
intltoolize --force --copy --automake
libtoolize --force
aclocal $ACLOCAL_FLAGS -I %{_datadir}/aclocal/gnome2-macros
autoheader
automake -a -c -f
autoconf
CFLAGS="$RPM_OPT_FLAGS" \
./configure \
--prefix=%{_prefix} \
--libexecdir=%{_libexecdir} \
--sysconfdir=%{_sysconfdir}
make -j $CPUS
perl ./netdaemon-build.pl --sysconfdir=%{_sysconfdir} --sbindir=%{_sbindir}
%install
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make install DESTDIR=$RPM_BUILD_ROOT
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
install -D -o root -g root -m 744 netdaemon $RPM_BUILD_ROOT%{_sysconfdir}/init.d/netdaemon
javahelp-convert-install $RPM_BUILD_ROOT %{name} %{name}.xml
# Remove unwanted files.
rm -rf $RPM_BUILD_ROOT%{_prefix}/var
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%config
%{_sysconfdir}/init.d/netdaemon
%{_sbindir}/*
%{_libexecdir}/*
%{_libdir}/bonobo/servers/*.server
%{_datadir}/gnome-2.0/ui/*.xml
%{_datadir}/pixmaps/*
%{_datadir}/icons/hicolor/48x48/apps/*
%{_datadir}/netapplet/*
%{_datadir}/gnome/*
%{_datadir}/omf/*
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%post
# set up permissions mapping for console user
if [ "$1" == "1" ]; then
if [ -z "`grep '/var/run/netdaemon-priv.socket' /etc/security/console.perms`" ]; then
echo -e "<console> 0600 /var/run/netdaemon-priv.socket 0600 root" >> /etc/security/console.perms
fi
/sbin/chkconfig --add netdaemon >/dev/null 2>&1
/sbin/chkconfig --set --force netdaemon 5
fi
%preun
# remove permissions mapping for console user
if [ "$1" == "0" ]; then
/etc/init.d/netdaemon stop >/dev/null 2>&1
/sbin/chkconfig --del netdaemon >/dev/null 2>&1
if [ -e '/etc/security/console.perms' ]; then
if [ -n "`grep '/var/run/netdaemon-priv.socket' /etc/security/console.perms`" ]; then
grep -v '/var/run/netdaemon-priv.socket' /etc/security/console.perms > /tmp/console.perms
mv -f /tmp/console.perms /etc/security/console.perms
fi
fi
fi
%changelog
* Fri Apr 01 2005 - <[email protected]>
- added patch netapplet-04-netstatus.diff to fix bug #6236262
today is right date for this patch ;)
* Tue Mar 15 2005 - <[email protected]>
- Updated netapplet-05-g11n-configure.diff to fix 6230840
* Mon Mar 07 2005 - <[email protected]>
- added patch netapplet-04-help-button.diff which fixes help button
on the Connection Properties dialog (bug #6227222)
* Mon Feb 22 2005 - [email protected]
- Obsoletes fixed. Added Provides entry.
* Mon Feb 21 2005 - [email protected]
- Updated docs (netapplet-docs-0.2linux) from [email protected].
* Fri Feb 18 2005 - <[email protected]>
- Added netapplet-05-g11n-configure.diff to have $ALL_LINGUAS
* Fri Feb 11 2005 - <[email protected]>
- added patch netapplet-04-no-gray-in-menu which removes always inactive
items form right click menu (bug #6227702)
* Mon Feb 07 2005 - <[email protected]>
- added 'force' option to chkconfig set command in the post section
- added stop netdaemon servece command to the preun section
* Mon Feb 07 2005 - <[email protected]>
- Added patch to handle accessibility for netapplet.
- Fixes bug #6174246.
* Thu Feb 03 2005 - <[email protected]>
- Obsolete gnome-netstatus.
* Fri Jan 28 2005 - <[email protected]>
- changed user-visible name of the applet to 'Network Monitor'
- changed netdaemon socket name to 'netdaemon-priv.socket'
- added links to the help document in help dialog
- version is 1.0.0
* Thu Jan 13 2005 - <[email protected]>
- #6217016 - Added javahelp-convert details
* Mon Jan 10 2005 - <[email protected]>
- added changes from the original code version 1.0.0
- added support of rpm install/upgrade/erase to netapplet.spec
- added netdaemon-build.pl which builds /etc/init.d script for netdaemon
- changed 'accesspints' format to support total signal strength on an interface
- added -n option to netdaemon to start it as regular application
- added DEBUG_MODE flag to configure.in
* Thu Dec 16 2004 - [email protected]
- Added l10n help tarball and pathes
* Wed Dec 8 2004 - [email protected]
- Add docs tarball and patch to integrate same.
* Fri Dec 03 2004 - <[email protected]>
- 'pam-usermode' is added to the spec file as a prerequirement
* Tue Nov 23 2004 - <[email protected]>
- NetApplet converted to a GNOME Panel applet
- netdaemon is in sbin directory, netapplet is in libexec directory
- console user helper is used to manage access to the netdaemon socket
* Thu Nov 04 2004 - [email protected]
- Added netapplet-01-potfiles.diff to update POTFILES.in
* Fri Oct 29 2004 - <[email protected]>
- added hardware info to the support tab of the property dialog
- further improvements on the applet icon management
- code clean up
* Fri Oct 22 2004 - <[email protected]>
- support tab added to the property dialog
- icon management is improved
* Mon Oct 18 2004 - <[email protected]>
- the post section was removed.
* Fri Oct 15 2004 - <[email protected]>
- Initial spec file