]> git.pld-linux.org Git - packages/wicd.git/blob - wicd.spec
26124cc8e79ddcf235070ec5a5234ab5c4f97620
[packages/wicd.git] / wicd.spec
1 # TODO
2 # - fix pm-utils to store addons in non-arch dependant path so we could make this pkg noarch
3 # - package (acpid-XXX):
4 #   /etc/acpi/resume.d/80-wicd-connect.sh
5 #   /etc/acpi/suspend.d/50-wicd-suspend.sh
6 # - notes about translations:
7 #   - duplicate fr and fr_FR exist, we prefer fr_FR
8 #   - ar_PS (Palestine) isn't in glibc yet.
9 #   - ar_EG (Egypt) isn't in glibc yet. using ar instead
10 Summary:        wired and wireless network manager
11 Summary(hu.UTF-8):      Vezeték és vezeték néklküli hálózati menedzser
12 Summary(pl.UTF-8):      Zarządca sieci przewodowych i bezprzewodowych
13 Name:           wicd
14 Version:        1.7.0
15 Release:        8
16 License:        GPL v2+
17 Group:          X11/Applications/Networking
18 Source0:        http://downloads.sourceforge.net/wicd/%{name}-%{version}.tar.gz
19 # Source0-md5:  003d2e67240989db55934553437ba32a
20 Source1:        %{name}.init
21 Source2:        %{name}.service
22 Source3:        org.%{name}.daemon.service
23 Patch0:         %{name}-init_status.patch
24 Patch1:         bashism.patch
25 Patch2:         %{name}-desktop.patch
26 Patch3:         no-deepcopy.patch
27 URL:            http://www.wicd.net/
28 # /etc/pld-release used to detect platform
29 BuildRequires:  issue
30 BuildRequires:  python-devel
31 BuildRequires:  python-modules
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.623
34 BuildRequires:  sed >= 4.0
35 Requires(post,preun):   /sbin/chkconfig
36 Requires:       dbus(org.freedesktop.Notifications)
37 Requires:       python-dbus
38 Requires:       python-iwscan
39 Requires:       python-pygobject
40 Requires:       python-pygtk-glade >= 2:2.0
41 Requires:       python-pygtk-gtk >= 2:2.0
42 Requires:       python-wpactrl
43 Requires:       systemd-units >= 0.38
44 Suggests:       wireless-tools
45 # not noarch due pm-utils packaging stupidity
46 #BuildArch:     noarch
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 Wicd is an open source wired and wireless network manager for Linux
51 which aims to provide a simple interface to connect to networks with a
52 wide variety of settings.
53
54 %description  -l hu.UTF-8
55 Wicd egy nyílt forráskódú vezeték és vezeték nélküli menedzser
56 Linuxhoz, maely egy egyszerű felületet biztosít hálózatokhoz való
57 csatlakozásokhoz a beállítások széles tárházával.
58
59 %description -l pl.UTF-8
60 Wicd jest zarządcą sieci przewodowych i bezprzewodowych dla Linuksa,
61 mającym zapewnić prosty interfejs do podłączania do sieci z
62 różnorakimi opcjami.
63
64 %package client-cli
65 Summary:        wicd CLI client
66 Summary(hu.UTF-8):      wicd CLI kliens
67 Summary(pl.UTF-8):      Klient wicd CLI
68 Group:          Applications/System
69 Requires:       %{name} = %{version}-%{release}
70 Requires:       python-urwid
71
72 %description client-cli
73 Wicd command line interface (ncurses) client.
74
75 %description client-cli -l hu.UTF-8
76 Wicd parancssoros (ncurses) kliens.
77
78 %description client-cli -l pl.UTF-8
79 Klient Wicd z międzymordziem wiersza poleceń (ncurses).
80
81 %package client-curses
82 Summary:        wicd TUI client
83 Summary(hu.UTF-8):      wicd TUI kliens
84 Summary(pl.UTF-8):      Klient wicd z TUI
85 Group:          Applications/System
86 Requires:       %{name} = %{version}-%{release}
87 Requires:       python-urwid
88
89 %description client-curses
90 Wicd text user interface (ncurses) client.
91
92 %description client-curses -l hu.UTF-8
93 Wicd szöveges (ncurses) kliens.
94
95 %description client-curses -l pl.UTF-8
96 Klient Wicd z tesktowym międzymordziem uzytkownika (ncurses).
97
98 %package client-gtk
99 Summary:        wicd GUI client
100 Summary(hu.UTF-8):      wicd GUI kliens
101 Summary(pl.UTF-8):      Klient wicd z GUI
102 Group:          Applications/System
103 Requires:       %{name} = %{version}-%{release}
104
105 %description client-gtk
106 Wicd graphical user interface (GTK+2) client.
107
108 %description client-gtk -l hu.UTF-8
109 Wicd grafikus (GTK+2) kliens.
110
111 %description client-gtk -l pl.UTF-8
112 Klient Wicd z graficznym międzymordziem użytkownika (GTK+2).
113
114 %package -n pm-utils-wicd
115 Summary:        wicd script for pm-utils
116 Summary(hu.UTF-8):      wicd szkript pm-utils-hoz
117 Summary(pl.UTF-8):      Skrypt wicd dla pm-utils
118 Group:          Applications/System
119 Requires:       %{name} = %{version}-%{release}
120 Requires:       pm-utils
121
122 %description -n pm-utils-wicd
123 Wicd script for pm-utils.
124
125 %description -n pm-utils-wicd -l hu.UTF-8
126 Wicd szkript pm-utils-hoz.
127
128 %description -n pm-utils-wicd -l pl.UTF-8
129 Skrypt wicd dla pm-utils.
130
131 %prep
132 %setup -q
133 %patch0 -p1
134 %patch1 -p1
135 %patch2 -p1
136 %patch3 -p1
137
138 mv translations/{ar_EG,ar}
139 %{__rm} -r translations/ar_PS
140 mv translations/{de_DE,de}
141 mv translations/{es_ES,es}
142 %{__rm} -r translations/fr
143 mv translations/{fr_FR,fr}
144 mv translations/{hr_HR,hr}
145 mv translations/{it_IT,it}
146 mv translations/{nl_NL,nl}
147 mv translations/{no,nb}
148 mv translations/{ru_RU,ru}
149
150 grep -r bin/env.*python -l . | xargs %{__sed} -i -e '1s,^#!.*env python,#!%{__python},'
151
152 %build
153 %{__python} setup.py configure \
154         --pidfile /var/run/wicd.pid \
155         --pmutils %{_libdir}/pm-utils/sleep.d
156
157 %{__python} setup.py build
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161 %{__python} setup.py install \
162         --optimize=2 \
163         --root=$RPM_BUILD_ROOT
164
165 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wicd
166
167 # systemd
168 install -d $RPM_BUILD_ROOT%{systemdunitdir}
169 install -d $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services
170 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
171 cp -p %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/dbus-1/system-services
172
173 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
174 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
175 %py_postclean
176
177 %find_lang %{name}
178
179 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
180 %{__rm} $RPM_BUILD_ROOT/var/lib/%{name}/configurations/.empty_on_purpose
181 %{__rm} $RPM_BUILD_ROOT/var/log/%{name}/.empty_on_purpose
182
183 %clean
184 rm -rf $RPM_BUILD_ROOT
185
186 %post
187 /sbin/chkconfig --add %{name}
188 %service %{name} restart
189 %systemd_post wicd.service
190
191 %preun
192 if [ "$1" = "0" ]; then
193         %service -q %{name} stop
194         /sbin/chkconfig --del %{name}
195 fi
196 %systemd_preun wicd.service
197
198 %postun
199 %systemd_reload
200
201 %triggerpostun -- %{name} < 1.7.0-8
202 %systemd_trigger wicd.service
203
204 %files -f %{name}.lang
205 %defattr(644,root,root,755)
206 %doc AUTHORS CHANGES INSTALL README
207 %attr(755,root,root) %{_bindir}/wicd-client
208 %attr(755,root,root) %{_sbindir}/wicd
209 %attr(754,root,root) /etc/rc.d/init.d/%{name}
210 %{_mandir}/man5/wicd-manager-settings.conf.5*
211 %lang(nl) %{_mandir}/nl/man5/wicd-manager-settings.conf.5*
212 %{_mandir}/man5/wicd-wired-settings.conf.5*
213 %lang(nl) %{_mandir}/nl/man5/wicd-wired-settings.conf.5*
214 %{_mandir}/man5/wicd-wireless-settings.conf.5*
215 %lang(nl) %{_mandir}/nl/man5/wicd-wireless-settings.conf.5*
216 %{_mandir}/man8/wicd.8*
217 %lang(nl) %{_mandir}/nl/man8/wicd.8*
218 %{systemdunitdir}/wicd.service
219 %{_datadir}/dbus-1/system-services/org.wicd.daemon.service
220 /etc/dbus-1/system.d/wicd.conf
221 %{_sysconfdir}/wicd
222 %dir %{_datadir}/%{name}
223 %dir %{_datadir}/%{name}/backends
224 %attr(755,root,root) %{_datadir}/%{name}/backends/*.py
225 %dir %{_datadir}/%{name}/daemon
226 %attr(755,root,root) %{_datadir}/%{name}/daemon/*.py
227 %dir %{py_sitescriptdir}/wicd
228 %{py_sitescriptdir}/wicd/*.py[co]
229 %{py_sitescriptdir}/Wicd-*.egg-info
230 %dir /var/lib/%{name}
231 %dir /var/lib/%{name}/configurations
232 /var/lib/%{name}/WHEREAREMYFILES
233 %dir /var/log/%{name}
234
235 %files client-cli
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_bindir}/wicd-cli
238 %dir %{_datadir}/%{name}/cli
239 %attr(755,root,root) %{_datadir}/%{name}/cli/*.py
240 %{_mandir}/man8/wicd-cli.8*
241
242 %files client-curses
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_bindir}/wicd-curses
245 %dir %{_datadir}/%{name}/curses
246 %attr(755,root,root) %{_datadir}/%{name}/curses/*.py
247 %{_mandir}/man8/wicd-curses.8*
248 %lang(nl) %{_mandir}/nl/man8/wicd-curses.8*
249
250 %files client-gtk
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/wicd-gtk
253 %{_sysconfdir}/xdg/autostart/wicd-tray.desktop
254 %dir %{_datadir}/%{name}/gtk
255 %{_datadir}/%{name}/gtk/%{name}.glade
256 %attr(755,root,root) %{_datadir}/%{name}/gtk/*.py
257 %{_datadir}/autostart/wicd-tray.desktop
258 %{_desktopdir}/wicd.desktop
259 %{_iconsdir}/hicolor/*/apps/wicd-gtk.*
260 %{_pixmapsdir}/%{name}
261 %{_pixmapsdir}/wicd-gtk.xpm
262 %{_mandir}/man1/wicd-client.1*
263 %lang(nl) %{_mandir}/nl/man1/wicd-client.1*
264
265 %files -n pm-utils-wicd
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/pm-utils/sleep.d/*wicd
This page took 0.07 seconds and 2 git commands to generate.