source: projects/specs/trunk/w/wicd/wicd-vl.spec @ 1178

Revision 1178, 4.5 KB checked in by kudoh, 14 years ago (diff)
Line 
1#define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
2
3Summary: A wireless and wired network manager
4Summary(ja): 無線・有線ネットワークマネージャ
5Name: wicd
6Version: 1.7.0
7Release: 5%{?_dist_release}
8Source0: %{name}-%{version}.tar.bz2
9# from ATrpms package
10Patch0:  wicd-1.7.0-init-script.patch
11
12Patch1:  wicd-desktop.patch
13Patch2:  18-dont_run_unexpected_files_in_scripts.patch
14Patch3:  27-fix_resolv.conf_perms.patch
15
16License: GPLv2
17Group: System Environment/Base
18BuildRoot: %{_tmppath}/%{name}-%{version}-root
19URL: http://wicd.net
20
21BuildRequires: gettext
22BuildRequires: desktop-file-utils
23BuildRequires: python >= 2.4 python-devel >= 2.4
24BuildRequires: python-setuptools
25
26Requires: python >= 2.4 ethtool net-tools wpa_supplicant pm-utils wireless-tools
27Requires: dhclient iproute dbus-python
28Requires: pygtk2 >= 2.10
29Requires: python-urwid >= 0.9.8.3
30Requires: gksu
31
32Requires(post):   chkconfig
33Requires(preun):  chkconfig
34Requires(preun):  /sbin/service
35Requires(postun): /sbin/service
36
37Conflicts: NetworkManager
38
39%description
40A complete network connection manager
41Wicd supports wired and wireless networks, and capable of
42creating and tracking profiles for both.  It has a
43template-based wireless encryption system, which allows the user
44to easily add encryption methods used.  It ships with some common
45encryption types, such as WPA and WEP. Wicd will automatically
46connect at startup to any preferred network within range.
47
48
49%prep
50%setup -q
51%patch0 -p1 -b .init
52%patch1 -p1
53%patch2 -p1
54%patch3 -p1
55
56%{__sed} -i 's/\r//' wicd/logfile.py
57
58%build
59%{__python} setup.py configure --share=%{_datadir}/%{name} \
60       --etc=%{_sysconfdir}/%{name} \
61       --bin=%{_bindir} \
62       --sbin=%{_sbindir} \
63       --mandir=%{_mandir} \
64       --varlib=%{_sharedstatedir}/wicd \
65       --pmutils=%{_libdir}/pm-utils/sleep.d \
66       --resume=%{_sysconfdir}/acpi/resume.d \
67       --suspend=%{_sysconfdir}/acpi/suspend.d \
68       --docdir=%{_docdir}/%{name}-%{version} \
69       --no-install-kde \
70       --no-install-docs
71
72python setup.py build
73
74%install
75rm -rf %{buildroot}
76python setup.py install -O1 --skip-build --root=%{buildroot}
77install -D init/redhat/%{name} %{buildroot}%{_initddir}/%{name}
78
79desktop-file-install --vendor "" --dir %{buildroot}%{_datadir}/autostart/ other/wicd-tray.desktop
80
81%find_lang %{name}
82
83%post
84touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
85/sbin/service %{name} restart >/dev/null 2>&1
86/sbin/chkconfig --add %{name}
87/sbin/chkconfig --level 345 %{name} on
88
89%preun
90if [ $1 = 0 ] ; then
91     /sbin/service %{name} stop >/dev/null 2>&1
92     /sbin/chkconfig --del %{name}
93fi
94
95%postun
96if [ "$1" -ge "1" ] ; then
97    /sbin/service %{name} condrestart >/dev/null 2>&1 || :
98fi
99
100if [ $1 -eq 0 ] ; then
101    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
102    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
103fi
104
105%posttrans
106gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
107
108%clean
109[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
110
111%files -f %{name}.lang
112%defattr(-,root,root)
113%doc AUTHORS CHANGES INSTALL LICENSE NEWS README other/WHEREAREMYFILES
114%{_bindir}/wicd-*
115%{python_sitelib}/wicd
116%{python_sitelib}/*.egg-info
117%{_datadir}/wicd
118%{_datadir}/pixmaps/wicd*
119%{_datadir}/icons/hicolor/*/apps/wicd-*.png
120%{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
121%{_datadir}/applications/wicd.desktop
122%{_datadir}/autostart/wicd-tray.desktop
123%docdir %{_datadir}/doc/%{name}/
124%{_mandir}/nl/man?/%{name}*
125%{_mandir}/man?/%{name}*
126%{_sysconfdir}/%{name}
127%{_sysconfdir}/acpi/resume.d/80-wicd-connect.sh
128%{_sysconfdir}/acpi/suspend.d/50-wicd-suspend.sh
129%{_sysconfdir}/dbus-1/system.d/wicd.conf
130%{_sysconfdir}/rc.d/init.d/wicd
131%{_sysconfdir}/xdg/autostart/wicd-tray.desktop
132%{_sbindir}/wicd
133%{_libdir}/pm-utils/sleep.d/91wicd
134%{_localstatedir}/log/wicd/.empty_on_purpose
135%{_localstatedir}/lib/wicd
136
137%changelog
138* Wed Jun 9 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-5
139- improved service start process in %%post section
140- changed daemon start runlevel
141
142* Mon Jun 07 2010 Shu KONNO <owa@bg.wakwak.com> - 1.7.0-4
143- fixed %%python_sitelib
144
145* Sat Jun 5 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-3
146- added Rerquires: gksu
147- added Patch2,3 from Debian
148  - to stop running unexpected files in scripts
149  - to fix resolv.conf permission
150
151* Fri Jun 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-2
152- added chkconfig in %post
153- added Patch1 to add Japanese description for desktop file
154
155* Fri May 28 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-1
156- initial build for VineSeed
Note: See TracBrowser for help on using the repository browser.