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

Revision 3932, 7.4 KB checked in by kudoh, 13 years ago (diff)
RevLine 
[1161]1#define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
[1156]2
3Summary: A wireless and wired network manager
4Summary(ja): 無線・有線ネットワークマネージャ
5Name: wicd
6Version: 1.7.0
[3932]7Release: 6%{?_dist_release}
[1156]8Source0: %{name}-%{version}.tar.bz2
9# from ATrpms package
10Patch0:  wicd-1.7.0-init-script.patch
[3932]11Patch1:  wicd-desktop.patch
[1156]12
[3932]13# from Debian
[1156]14Patch2:  18-dont_run_unexpected_files_in_scripts.patch
15Patch3:  27-fix_resolv.conf_perms.patch
[3932]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
[1156]21
22License: GPLv2
23Group: System Environment/Base
24BuildRoot: %{_tmppath}/%{name}-%{version}-root
25URL: http://wicd.net
[3932]26BuildArch: noarch
[1156]27
28BuildRequires: gettext
29BuildRequires: desktop-file-utils
30BuildRequires: python >= 2.4 python-devel >= 2.4
31BuildRequires: python-setuptools
32
[3932]33Requires: pm-utils >= 1.2.4
[1156]34
[3932]35#Requires(post):   chkconfig
36#Requires(preun):  chkconfig
37#Requires(preun):  /sbin/service
38#Requires(postun): /sbin/service
[1156]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
[3932]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
[1156]66
[3932]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
[1156]102%prep
103%setup -q
104%patch0 -p1 -b .init
105%patch1 -p1
106%patch2 -p1
107%patch3 -p1
[3932]108%patch4 -p1
109%patch5 -p1
110%patch6 -p1
111%patch7 -p1
112%patch8 -p1
[1156]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} \
[3932]127       --log %{_localstatedir}/log \
[1156]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
[3932]138find %{buildroot} -type f -name ".empty_on_purpose" | xargs rm
[1156]139
[3932]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
[1156]150%find_lang %{name}
151
[3932]152%post common
[1156]153touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
[1178]154/sbin/service %{name} restart >/dev/null 2>&1
[1156]155/sbin/chkconfig --add %{name}
[1178]156/sbin/chkconfig --level 345 %{name} on
[1156]157
[3932]158%preun common
[1156]159if [ $1 = 0 ] ; then
160     /sbin/service %{name} stop >/dev/null 2>&1
161     /sbin/chkconfig --del %{name}
162fi
163
[3932]164%postun common
[1156]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
[3932]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
[1156]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
[3932]189%files
[1156]190%defattr(-,root,root)
191%doc AUTHORS CHANGES INSTALL LICENSE NEWS README other/WHEREAREMYFILES
[3932]192%{_libdir}/pm-utils/sleep.d/91wicd
193
194%files common -f %{name}.lang
195%{_bindir}/wicd-cli
196%{_bindir}/wicd-client
[1156]197%{python_sitelib}/wicd
198%{python_sitelib}/*.egg-info
199%{_datadir}/applications/wicd.desktop
[3932]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*
[1156]206%{_mandir}/nl/man?/%{name}*
[3932]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/*
[1156]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
[3932]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
[1156]244%changelog
[3932]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
[1178]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
[1161]255* Mon Jun 07 2010 Shu KONNO <owa@bg.wakwak.com> - 1.7.0-4
256- fixed %%python_sitelib
257
[1156]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.