source: projects/specs/tags/6_0_REL/w/wicd/wicd-vl.spec @ 3932

Revision 3932, 7.4 KB checked in by kudoh, 13 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: 6%{?_dist_release}
8Source0: %{name}-%{version}.tar.bz2
9# from ATrpms package
10Patch0:  wicd-1.7.0-init-script.patch
11Patch1:  wicd-desktop.patch
12
13# from Debian
14Patch2:  18-dont_run_unexpected_files_in_scripts.patch
15Patch3:  27-fix_resolv.conf_perms.patch
16Patch4:  03-fix_typo_wicd-cli.patch
17Patch5:  08-fix_help_message.patch
18Patch6:  22-fix_deprecation.patch
19Patch7:  23-fix_script_macro_expansion.patch
20Patch8:  32-prefer_gksu.patch
21
22License: GPLv2
23Group: System Environment/Base
24BuildRoot: %{_tmppath}/%{name}-%{version}-root
25URL: http://wicd.net
26BuildArch: noarch
27
28BuildRequires: gettext
29BuildRequires: desktop-file-utils
30BuildRequires: python >= 2.4 python-devel >= 2.4
31BuildRequires: python-setuptools
32
33Requires: pm-utils >= 1.2.4
34
35#Requires(post):   chkconfig
36#Requires(preun):  chkconfig
37#Requires(preun):  /sbin/service
38#Requires(postun): /sbin/service
39
40Conflicts: NetworkManager
41
42%description
43A complete network connection manager
44Wicd supports wired and wireless networks, and capable of
45creating and tracking profiles for both.  It has a
46template-based wireless encryption system, which allows the user
47to easily add encryption methods used.  It ships with some common
48encryption types, such as WPA and WEP. Wicd will automatically
49connect at startup to any preferred network within range.
50
51%package common
52Summary: Wicd common files
53Summary(ja): Wicd の共通ファイル
54Group: System Environment/Base
55BuildArch: noarch
56Requires: dbus
57Requires: dbus-python
58Requires: dhclient
59Requires: ethtool
60Requires: iproute
61Requires: logrotate
62Requires: net-tools
63Requires: pm-utils
64Requires: wireless-tools
65Requires: wpa_supplicant
66
67Requires(post):   chkconfig
68Requires(preun):  chkconfig
69Requires(preun):  /sbin/service
70Requires(postun): /sbin/service
71#Requires(preun):  initscripts
72#Requires(postun): initscripts
73
74%description common
75This package provides the main wicd daemon and the wicd-cli front-end.
76
77%package curses
78Summary: Curses client for Wicd
79Summary(ja): Wicd の Curse クライアント
80Group: Applications/System
81BuildArch: noarch
82Requires: %{name}-common = %{version}-%{release}
83Requires: python-urwid >= 0.9.8.3
84
85%description curses
86Client program for wicd that uses a curses interface.
87
88%package gtk
89Summary: GTK+ client for Wicd
90Summary(ja): Wicd の GTK+ クライアント
91Group: Applications/Internet
92BuildArch: noarch
93Requires: %{name}-common = %{version}-%{release}
94Requires: pygtk2 >= 2.10
95Requires: pygtk2-libglade >= 2.10
96Requires: gksu
97
98%description gtk
99Client program for wicd that uses a GTK+ interface.
100
101
102%prep
103%setup -q
104%patch0 -p1 -b .init
105%patch1 -p1
106%patch2 -p1
107%patch3 -p1
108%patch4 -p1
109%patch5 -p1
110%patch6 -p1
111%patch7 -p1
112%patch8 -p1
113
114%{__sed} -i 's/\r//' wicd/logfile.py
115
116%build
117%{__python} setup.py configure --share=%{_datadir}/%{name} \
118       --etc=%{_sysconfdir}/%{name} \
119       --bin=%{_bindir} \
120       --sbin=%{_sbindir} \
121       --mandir=%{_mandir} \
122       --varlib=%{_sharedstatedir}/wicd \
123       --pmutils=%{_libdir}/pm-utils/sleep.d \
124       --resume=%{_sysconfdir}/acpi/resume.d \
125       --suspend=%{_sysconfdir}/acpi/suspend.d \
126       --docdir=%{_docdir}/%{name}-%{version} \
127       --log %{_localstatedir}/log \
128       --no-install-kde \
129       --no-install-docs
130
131python setup.py build
132
133%install
134rm -rf %{buildroot}
135python setup.py install -O1 --skip-build --root=%{buildroot}
136install -D init/redhat/%{name} %{buildroot}%{_initddir}/%{name}
137
138find %{buildroot} -type f -name ".empty_on_purpose" | xargs rm
139
140desktop-file-install \
141    --remove-category="Application" \
142    --delete-original \
143    --dir=%{buildroot}%{_datadir}/applications \
144    %{buildroot}%{_datadir}/applications/wicd.desktop
145
146desktop-file-install \
147    --dir=%{buildroot}%{_sysconfdir}/xdg/autostart \
148    %{buildroot}%{_sysconfdir}/xdg/autostart/wicd-tray.desktop
149
150%find_lang %{name}
151
152%post common
153touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
154/sbin/service %{name} restart >/dev/null 2>&1
155/sbin/chkconfig --add %{name}
156/sbin/chkconfig --level 345 %{name} on
157
158%preun common
159if [ $1 = 0 ] ; then
160     /sbin/service %{name} stop >/dev/null 2>&1
161     /sbin/chkconfig --del %{name}
162fi
163
164%postun common
165if [ "$1" -ge "1" ] ; then
166    /sbin/service %{name} condrestart >/dev/null 2>&1 || :
167fi
168
169if [ $1 -eq 0 ] ; then
170    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
171    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
172fi
173
174%post gtk
175touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
176
177%postun gtk
178if [ $1 -eq 0 ]; then
179    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
180    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
181fi
182
183%posttrans gtk
184gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
185
186%clean
187[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
188
189%files
190%defattr(-,root,root)
191%doc AUTHORS CHANGES INSTALL LICENSE NEWS README other/WHEREAREMYFILES
192%{_libdir}/pm-utils/sleep.d/91wicd
193
194%files common -f %{name}.lang
195%{_bindir}/wicd-cli
196%{_bindir}/wicd-client
197%{python_sitelib}/wicd
198%{python_sitelib}/*.egg-info
199%{_datadir}/applications/wicd.desktop
200%{_datadir}/man/man1/wicd-client.1*
201%{_datadir}/man/man5/wicd-manager-settings.conf.5*
202%{_datadir}/man/man5/wicd-wired-settings.conf.5*
203%{_datadir}/man/man5/wicd-wireless-settings.conf.5*
204%{_datadir}/man/man8/wicd-cli.8*
205%{_datadir}/man/man8/wicd.8*
206%{_mandir}/nl/man?/%{name}*
207%{_datadir}/pixmaps/wicd*
208%dir %{_datadir}/wicd
209%dir %{_datadir}/wicd/backends
210%dir %{_datadir}/wicd/cli
211%dir %{_datadir}/wicd/daemon
212%{_datadir}/wicd/backends/*
213%{_datadir}/wicd/cli/*
214%{_datadir}/wicd/daemon/*
215%{_sysconfdir}/%{name}
216%{_sysconfdir}/acpi/resume.d/80-wicd-connect.sh
217%{_sysconfdir}/acpi/suspend.d/50-wicd-suspend.sh
218%{_sysconfdir}/dbus-1/system.d/wicd.conf
219%{_sysconfdir}/rc.d/init.d/wicd
220%{_sysconfdir}/xdg/autostart/wicd-tray.desktop
221%{_sbindir}/wicd
222%{_localstatedir}/lib/wicd
223
224%files curses
225%defattr(-,root,root,-)
226%dir %{_datadir}/wicd/curses
227%{_datadir}/wicd/curses/*
228%{_bindir}/wicd-curses
229%{_datadir}/man/man8/wicd-curses.8*
230%lang(nl) %{_datadir}/man/nl/man8/wicd-curses.8*
231
232%files gtk
233%defattr(-,root,root,-)
234%dir %{_datadir}/wicd/gtk
235%dir %{_datadir}/pixmaps/wicd
236%{_sysconfdir}/xdg/autostart/wicd-tray.desktop
237%{_datadir}/wicd/gtk/*
238%{_datadir}/pixmaps/wicd/*
239%{_datadir}/pixmaps/wicd-gtk.xpm
240%{_bindir}/wicd-gtk
241%{_datadir}/icons/hicolor/*/apps/wicd-gtk.png
242%{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
243
244%changelog
245* Sun May 22 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-6
246- changed BuildArch to noarch
247- updated spec
248- splitted -common, -curses, -gtk packages
249- Added Patch4,5,6,7,8 from Debian
250
251* Wed Jun 9 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-5
252- improved service start process in %%post section
253- changed daemon start runlevel
254
255* Mon Jun 07 2010 Shu KONNO <owa@bg.wakwak.com> - 1.7.0-4
256- fixed %%python_sitelib
257
258* Sat Jun 5 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-3
259- added Rerquires: gksu
260- added Patch2,3 from Debian
261  - to stop running unexpected files in scripts
262  - to fix resolv.conf permission
263
264* Fri Jun 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-2
265- added chkconfig in %post
266- added Patch1 to add Japanese description for desktop file
267
268* Fri May 28 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-1
269- initial build for VineSeed
Note: See TracBrowser for help on using the repository browser.