All pastes #1436366 Raw Edit

Unnamed

public text v1 · immutable
#1436366 ·published 2009-05-27 15:33 UTC
rendered paste body
%global momorel 2
%global pythonver 2.6.1-1m

%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")

Summary: A wireless and wired network manager
Name: wicd
Version: 1.6.0b2
Release: %{momorel}m%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://wicd.sourceforge.net
Source0: http://dl.sourceforge.net/sourceforge/wicd/%{name}-%{version}.tar.bz2
NoSource: 0
Patch0: %{name}-%{version}-distro-momonga.patch
Patch1: %{name}-%{version}-version.patch
Patch2: %{name}-%{version}-desktop-ja.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel >= %{pythonver}
BuildRequires: desktop-file-utils
PreReq: chkconfig initscripts
Requires: python >= %{pythonver}
Requires: acpid dbus-x11 dhclient ethtool net-tools
Requires: pm-utils wpa_supplicant wireless-tools

%description
A complete network connection manager Wicd supports wired and wireless
networks, and capable of creating and tracking profiles for both.
It has a template-based wireless encryption system, which allows
the user to easily add encryption methods used. It ships with
some common encryption types, such as WPA and WEP.
Wicd will automatically connect at startup to any preferred network
within range.

%prep
%setup -q

%patch0 -p1 -b .momonga
%patch1 -p1 -b .1.6.0b2
%patch2 -p1 -b .desktop-ja

%build
python setup.py configure 

%install
rm -rf %{buildroot}
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

find %{buildroot} -type f | xargs perl -pi -e "s,/etc/rc.d/init.d,/etc/init.d," 

# install desktop files
desktop-file-install --vendor= --delete-original \
  --dir %{buildroot}%{_datadir}/applications \
  --remove-category Application \
  %{buildroot}%{_datadir}/applications/%{name}.desktop

desktop-file-install --vendor= --delete-original \
  --dir %{buildroot}%{_sysconfdir}/xdg/autostart \
  --remove-category Application \
  %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}-tray.desktop

# use %%{_sysconfdir}/xdg/autostart only
rm -f %{buildroot}%{_datadir}/autostart/%{name}-tray.desktop

# clean up doc
rm -rf %{buildroot}%{_docdir}/%{name}

%clean
rm -rf %{buildroot}

%post
/sbin/chkconfig --add %{name}

%preun
if [ $1 = 0 ]; then
    /sbin/service %{name} stop > /dev/null 2>&1
    /sbin/chkconfig --del %{name}
fi

%files
%defattr(-,root,root)
%doc AUTHORS CHANGES INSTALL LICENSE NEWS README
%{_sysconfdir}/acpi/suspend.d
%{_sysconfdir}/acpi/resume.d
%config %{_sysconfdir}/dbus-1/system.d/%{name}.conf
%{_initscriptdir}/%{name}
%{_sysconfdir}/%{name}
%{_sysconfdir}/xdg/autostart/%{name}-tray.desktop
%{_bindir}/%{name}-client
%{_bindir}/%{name}-curses
%{python_sitelib}/%{name}
%{python_sitelib}/*.egg-info
%{_prefix}/lib/%{name}
%{_libdir}/pm-utils/sleep.d/55%{name}
%{_sbindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/wicd*.*
%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
%{_mandir}/man1/%{name}*.1*
%{_mandir}/man5/%{name}*.5*
%{_mandir}/man8/%{name}*.8*
%{_datadir}/pixmaps/%{name}
%{_datadir}/%{name}
%{_localstatedir}/lib/%{name}
%dir %{_localstatedir}/log/%{name}

%changelog
* Mon May 25 2009 Ichiro Nakai <ichiro@n.email.ne.jp>
- (1.6.0b2-2m)
- remove "Application" from Categories of desktop files

* Sun May 24 2009 Ichiro Nakai <ichiro@n.email.ne.jp>
- (1.6.0b2-1m)
- version 1.6.0b2
- TODO: decide enable or disable automatic startup at desktop session

* Tue May 19 2009 Daniel McLellan <raijin@momonga-linux.org>
- (1.6.0b1-1m)  
- First Momonga wicd.spec
- removed multi-spin support 

* Thu May 14 2009 Andrew Psaltis <ampsaltis@gmail.com> 1.6.0b1-2
- Added missing /usr/share/hicolor directory to make OpenSUSE >= 11.1 happy
* Thu May 14 2009 Andrew Psaltis <ampsaltis@gmail.com> 1.6.0b1-2
- Version bump to 1.6.0b1
- Added support for the --distro tag in setup.py
- Cleaned up some of the SUSE directory code
* Wed May 13 2009 Andrew Psaltis <ampsaltis@gmail.com 1.6.0a3-1  
- Switched over to gzipped source tarball  
* Wed May 5 2009 Adam Blackburn <comwpiz18@gmail.com> 1.6.0a3-1
- Version bump to 1.6.0a3
* Thu Apr 23 2009 Andrew Psaltis <ampsaltis@gmail.com> 1.6.0a2-1
- Version bump to 1.6.0a2
* Tue Apr 21 2009 Andrew Psaltis <ampsaltis@gmail.com> 1.6.0a1-1
- Version bump to 1.6.0a1
* Mon Apr 20 2009 Andrew Psaltis <ampsaltis@gmail.com> r357-1
- First really working copy of wicd.spec :)