1 | #define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)') |
---|
2 | |
---|
3 | Summary: A wireless and wired network manager |
---|
4 | Summary(ja): 無線・有線ネットワークマネージャ |
---|
5 | Name: wicd |
---|
6 | Version: 1.7.0 |
---|
7 | Release: 6%{?_dist_release} |
---|
8 | Source0: %{name}-%{version}.tar.bz2 |
---|
9 | # from ATrpms package |
---|
10 | Patch0: wicd-1.7.0-init-script.patch |
---|
11 | Patch1: wicd-desktop.patch |
---|
12 | |
---|
13 | # from Debian |
---|
14 | Patch2: 18-dont_run_unexpected_files_in_scripts.patch |
---|
15 | Patch3: 27-fix_resolv.conf_perms.patch |
---|
16 | Patch4: 03-fix_typo_wicd-cli.patch |
---|
17 | Patch5: 08-fix_help_message.patch |
---|
18 | Patch6: 22-fix_deprecation.patch |
---|
19 | Patch7: 23-fix_script_macro_expansion.patch |
---|
20 | Patch8: 32-prefer_gksu.patch |
---|
21 | |
---|
22 | License: GPLv2 |
---|
23 | Group: System Environment/Base |
---|
24 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
25 | URL: http://wicd.net |
---|
26 | BuildArch: noarch |
---|
27 | |
---|
28 | BuildRequires: gettext |
---|
29 | BuildRequires: desktop-file-utils |
---|
30 | BuildRequires: python >= 2.4 python-devel >= 2.4 |
---|
31 | BuildRequires: python-setuptools |
---|
32 | |
---|
33 | Requires: 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 | |
---|
40 | Conflicts: NetworkManager |
---|
41 | |
---|
42 | %description |
---|
43 | A complete network connection manager |
---|
44 | Wicd supports wired and wireless networks, and capable of |
---|
45 | creating and tracking profiles for both. It has a |
---|
46 | template-based wireless encryption system, which allows the user |
---|
47 | to easily add encryption methods used. It ships with some common |
---|
48 | encryption types, such as WPA and WEP. Wicd will automatically |
---|
49 | connect at startup to any preferred network within range. |
---|
50 | |
---|
51 | %package common |
---|
52 | Summary: Wicd common files |
---|
53 | Summary(ja): Wicd の共通ファイル |
---|
54 | Group: System Environment/Base |
---|
55 | BuildArch: noarch |
---|
56 | Requires: dbus |
---|
57 | Requires: dbus-python |
---|
58 | Requires: dhclient |
---|
59 | Requires: ethtool |
---|
60 | Requires: iproute |
---|
61 | Requires: logrotate |
---|
62 | Requires: net-tools |
---|
63 | Requires: pm-utils |
---|
64 | Requires: wireless-tools |
---|
65 | Requires: wpa_supplicant |
---|
66 | |
---|
67 | Requires(post): chkconfig |
---|
68 | Requires(preun): chkconfig |
---|
69 | Requires(preun): /sbin/service |
---|
70 | Requires(postun): /sbin/service |
---|
71 | #Requires(preun): initscripts |
---|
72 | #Requires(postun): initscripts |
---|
73 | |
---|
74 | %description common |
---|
75 | This package provides the main wicd daemon and the wicd-cli front-end. |
---|
76 | |
---|
77 | %package curses |
---|
78 | Summary: Curses client for Wicd |
---|
79 | Summary(ja): Wicd の Curse クライアント |
---|
80 | Group: Applications/System |
---|
81 | BuildArch: noarch |
---|
82 | Requires: %{name}-common = %{version}-%{release} |
---|
83 | Requires: python-urwid >= 0.9.8.3 |
---|
84 | |
---|
85 | %description curses |
---|
86 | Client program for wicd that uses a curses interface. |
---|
87 | |
---|
88 | %package gtk |
---|
89 | Summary: GTK+ client for Wicd |
---|
90 | Summary(ja): Wicd の GTK+ クライアント |
---|
91 | Group: Applications/Internet |
---|
92 | BuildArch: noarch |
---|
93 | Requires: %{name}-common = %{version}-%{release} |
---|
94 | Requires: pygtk2 >= 2.10 |
---|
95 | Requires: pygtk2-libglade >= 2.10 |
---|
96 | Requires: gksu |
---|
97 | |
---|
98 | %description gtk |
---|
99 | Client 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 | |
---|
131 | python setup.py build |
---|
132 | |
---|
133 | %install |
---|
134 | rm -rf %{buildroot} |
---|
135 | python setup.py install -O1 --skip-build --root=%{buildroot} |
---|
136 | install -D init/redhat/%{name} %{buildroot}%{_initddir}/%{name} |
---|
137 | |
---|
138 | find %{buildroot} -type f -name ".empty_on_purpose" | xargs rm |
---|
139 | |
---|
140 | desktop-file-install \ |
---|
141 | --remove-category="Application" \ |
---|
142 | --delete-original \ |
---|
143 | --dir=%{buildroot}%{_datadir}/applications \ |
---|
144 | %{buildroot}%{_datadir}/applications/wicd.desktop |
---|
145 | |
---|
146 | desktop-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 |
---|
153 | touch --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 |
---|
159 | if [ $1 = 0 ] ; then |
---|
160 | /sbin/service %{name} stop >/dev/null 2>&1 |
---|
161 | /sbin/chkconfig --del %{name} |
---|
162 | fi |
---|
163 | |
---|
164 | %postun common |
---|
165 | if [ "$1" -ge "1" ] ; then |
---|
166 | /sbin/service %{name} condrestart >/dev/null 2>&1 || : |
---|
167 | fi |
---|
168 | |
---|
169 | if [ $1 -eq 0 ] ; then |
---|
170 | touch --no-create %{_datadir}/icons/hicolor &>/dev/null |
---|
171 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
---|
172 | fi |
---|
173 | |
---|
174 | %post gtk |
---|
175 | touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
---|
176 | |
---|
177 | %postun gtk |
---|
178 | if [ $1 -eq 0 ]; then |
---|
179 | touch --no-create %{_datadir}/icons/hicolor &>/dev/null |
---|
180 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
---|
181 | fi |
---|
182 | |
---|
183 | %posttrans gtk |
---|
184 | gtk-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 |
---|