source: projects/specs/branches/6/w/wicd/wicd-vl.spec @ 5677

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