1 |
%define perl_version %(perl -MConfig -e 'print $Config{version}') |
2 |
|
3 |
Summary: The drakxtools (diskdrake, ...) |
4 |
Name: drakxtools |
5 |
Version: 17.71 |
6 |
Release: %mkrel 1 |
7 |
Url: http://mageia.org/ |
8 |
# The source can be found at its Subversion repository on: |
9 |
# * svn://svn.mageia.org/svn/soft/drakx/trunk (read-only, public) |
10 |
# * svn+ssh://svn.mageia.org/svn/soft/drakx/trunk (read-write, restricted). |
11 |
Source0: %name-%version.tar.xz |
12 |
#NO PATCH ALLOWED |
13 |
Patch0: timing.diff |
14 |
License: GPLv2+ |
15 |
Group: System/Configuration |
16 |
Requires: %{name}-curses = %version-%release, perl-Gtk3, perl-Glib >= 1.280.0-3, polkit, perl-Net-DBus, perl-Gtk3-WebKit2 |
17 |
Requires: polkit-agent |
18 |
Requires: mageia-doc-common |
19 |
# needed by drakfont (eg: type1inst): |
20 |
Requires: font-tools |
21 |
Requires: libxxf86misc |
22 |
# needed by any::enable_x_screensaver() |
23 |
Requires: xset |
24 |
Requires: drakx-net |
25 |
Requires: drakconf-icons |
26 |
Conflicts: drakconf <= 13.1-1.mga6 |
27 |
# needed for installing packages through do_pkgs -> urpmi -> gmessage |
28 |
Requires: gurpmi >= 5.7 |
29 |
Requires: ldetect-lst >= 0.1.291 |
30 |
# needed by drakfont: |
31 |
Requires: ttmkfdir |
32 |
BuildRequires: gettext |
33 |
BuildRequires: ldetect-devel >= 0.9.0 |
34 |
BuildRequires: pkgconfig(ncurses) |
35 |
BuildRequires: perl-devel >= 1:5.8.0-20 |
36 |
BuildRequires: perl_checker |
37 |
BuildRequires: pkgconfig(libparted) |
38 |
BuildRequires: drakx-installer-binaries |
39 |
BuildRequires: intltool |
40 |
%global __requires_exclude perl\\((Net::FTP|Time::localtime|URPM|Xconfig.*|[a-z].*)\\) |
41 |
|
42 |
%package curses |
43 |
Summary: The drakxtools (diskdrake, ...) |
44 |
Group: System/Configuration |
45 |
Requires: perl-base >= 2:5.8.6-1, urpmi >= 4.8.23, polkit |
46 |
Requires: polkit-agent |
47 |
Requires: perl-Locale-gettext >= 1.05-4mdv2007 |
48 |
Requires: kmod |
49 |
Requires: %{name}-backend = %version-%release |
50 |
Requires: drakx-net-text |
51 |
%global __requires_exclude perl\\((Gtk3::WebKit|Xconfig::various|[a-z].*)\\) |
52 |
|
53 |
%package backend |
54 |
Summary: Drakxtools libraries and background tools |
55 |
Group: System/Configuration |
56 |
Requires: dmidecode |
57 |
Requires: perl-File-FnMatch |
58 |
# for fileshareset and filesharelist (#17123) |
59 |
#Requires: perl-suid |
60 |
# for common::wrap_command_for_root() |
61 |
Requires: perl-String-ShellQuote |
62 |
# "post" here means %%triggerpostun: |
63 |
Requires(post): perl-MDK-Common >= 1.2.13 |
64 |
# for lsnetdrake (mga#12579) |
65 |
Requires: nmap |
66 |
# require virtual samba(4)-client provide |
67 |
Requires: smb-client |
68 |
Conflicts: drakxtools <= 16.27-1 |
69 |
|
70 |
%package http |
71 |
Summary: The drakxtools via http |
72 |
Group: System/Configuration |
73 |
Requires: %{name}-curses = %version-%release, perl(Net::SSLeay) >= 1.22-1, perl-Authen-PAM >= 0.14-1, perl-CGI >= 2.91-1 |
74 |
Requires(pre): rpm-helper |
75 |
Requires(post): rpm-helper |
76 |
|
77 |
%package gtk2-compat |
78 |
Summary: Gtk2 compatibility modules |
79 |
Group: System/Configuration |
80 |
Requires: %{name} |
81 |
Conflicts: drakxtools <= 17.3-1.mga6 |
82 |
|
83 |
%package -n drakx-finish-install |
84 |
Summary: First boot configuration |
85 |
Group: System/Configuration |
86 |
Requires: %{name} = %version-%release |
87 |
Requires: drakx-installer-matchbox |
88 |
|
89 |
%package -n harddrake |
90 |
Summary: Main Hardware Configuration/Information Tool |
91 |
Group: System/Configuration |
92 |
Requires: %{name}-curses = %version-%release |
93 |
Requires(pre): rpm-helper |
94 |
Requires(post): rpm-helper |
95 |
Requires: libdrakx-net >= 1.24 libdrakx-kbd-mouse-x11 >= 0.107 perl(Xconfig::glx) |
96 |
|
97 |
Requires: meta-task |
98 |
|
99 |
%package -n harddrake-ui |
100 |
Summary: Main Hardware Configuration/Information Tool |
101 |
Group: System/Configuration |
102 |
Requires: %name = %version-%release |
103 |
Requires: sane-backends |
104 |
Requires: libdrakx-net libdrakx-kbd-mouse-x11 >= 0.107 perl(Xconfig::glx) |
105 |
|
106 |
%description |
107 |
Contains many Mageia Linux applications simplifying users and |
108 |
administrators life on a Mageia Linux machine. Nearly all of |
109 |
them work both under X.Org (graphical environment) and in console |
110 |
(text environment), allowing easy distant work. |
111 |
|
112 |
- drakbug: interactive bug report tool |
113 |
- drakbug_report: help find bugs in DrakX |
114 |
- drakclock: date & time configurator |
115 |
- drakfloppy: boot disk creator |
116 |
- drakfont: import fonts in the system |
117 |
- draklog: show extracted information from the system logs |
118 |
- drakperm: msec GUI (permissions configurator) |
119 |
- draksec: security options managment / msec frontend |
120 |
|
121 |
%description backend |
122 |
See package %name |
123 |
|
124 |
%description curses |
125 |
Contains many Mageia Linux applications simplifying users and |
126 |
administrators life on a Mageia Linux machine. Nearly all of |
127 |
them work both under X.Org (graphical environment) and in console |
128 |
(text environment), allowing easy distant work. |
129 |
|
130 |
- adduserdrake: help you adding a user |
131 |
- diskdrake: DiskDrake makes hard disk partitioning easier. It is |
132 |
graphical, simple and powerful. Different skill levels are available |
133 |
(newbie, advanced user, expert). It's written entirely in Perl and |
134 |
Perl/Gtk. It uses resize_fat which is a perl rewrite of the work of |
135 |
Andrew Clausen (libresize). |
136 |
- drakauth: configure authentification (LDAP/NIS/...) |
137 |
- drakautoinst: help you configure an automatic installation replay |
138 |
- drakboot: configures your boot configuration (Lilo/GRUB, |
139 |
Bootsplash, X, autologin) |
140 |
- drakkeyboard: configure your keyboard (both console and X) |
141 |
- draklocale: language configurator, available both for root |
142 |
(system wide) and users (user only) |
143 |
- drakmouse: autodetect and configure your mouse |
144 |
- drakscanner: scanner configurator |
145 |
- draksound: sound card configuration |
146 |
- drakx11: menu-driven program which walks you through setting up |
147 |
your X server; it autodetects both monitor and video card if |
148 |
possible |
149 |
- drakxservices: SysV services and daemons configurator |
150 |
- drakxtv: auto configure tv card for xawtv grabber |
151 |
- lsnetdrake: display available nfs and smb shares |
152 |
- lspcidrake: display your pci information, *and* the corresponding |
153 |
kernel module |
154 |
|
155 |
%description http |
156 |
This package lets you configure your computer through your Web browser: |
157 |
it provides an HTTP interface to the Mageia tools found in the drakxtools |
158 |
package. |
159 |
|
160 |
%description gtk2-compat |
161 |
This package provides Gtk2 compatibility modules for legacy tools. |
162 |
|
163 |
%description -n drakx-finish-install |
164 |
For OEM-like duplications, it allows at first boot: |
165 |
- network configuration |
166 |
- creating users |
167 |
- setting root password |
168 |
- choosing authentication |
169 |
|
170 |
|
171 |
%description -n harddrake |
172 |
The harddrake service is a hardware probing tool run at system boot |
173 |
time to determine what hardware has been added or removed from the |
174 |
system. |
175 |
It then offer to run needed config tool to update the OS |
176 |
configuration. |
177 |
|
178 |
|
179 |
%description -n harddrake-ui |
180 |
This is the main configuration tool for hardware that calls all the |
181 |
other configuration tools. |
182 |
It offers a nice GUI that show the hardware configuration splitted by |
183 |
hardware classes. |
184 |
|
185 |
|
186 |
%prep |
187 |
%autosetup -p1 |
188 |
|
189 |
%build |
190 |
%make_build -C perl-install CFLAGS="$RPM_OPT_FLAGS" |
191 |
|
192 |
%install |
193 |
%make_build -C perl-install PREFIX=$RPM_BUILD_ROOT install |
194 |
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/{X11/xinit.d,X11/wmsession.d,sysconfig/harddrake2} |
195 |
touch $RPM_BUILD_ROOT/etc/sysconfig/harddrake2/previous_hw |
196 |
|
197 |
dirs1="usr/lib/libDrakX usr/share/libDrakX" |
198 |
(cd $RPM_BUILD_ROOT ; find $dirs1 usr/bin usr/sbin usr/libexec usr/share/polkit-1 ! -type d -printf "/%%p\n")|grep -E -v 'bin/.*harddrake' > %{name}.list |
199 |
(cd $RPM_BUILD_ROOT ; find $dirs1 -type d -printf "%%%%dir /%%p\n") >> %{name}.list |
200 |
|
201 |
perl -ni -e '/Xdrakres|clock|display_help|display_release_notes.pl|drak(bug$|clock|dvb|floppy|font|hosts|log|perm|sec|splash)|gtk|icons|logdrake|pixmaps|\.png$/ ? print STDERR $_ : print' %{name}.list 2> %{name}-gtk.list |
202 |
# exclude gtk2 stuff: |
203 |
fgrep gtk2 %{name}-gtk.list >%{name}-gtk2.list |
204 |
perl -pi -e 'undef $_ if /gtk2/' %{name}-gtk.list |
205 |
perl -ni -e '/http/ ? print STDERR $_ : print' %{name}.list 2> %{name}-http.list |
206 |
perl -ni -e 'm!lib/libDrakX|bootloader-config|fileshare|lsnetdrake|drakupdate_fstab|rpcinfo|serial_probe! && !/curses/i ? print STDERR $_ : print' %{name}.list 2> %{name}-backend.list |
207 |
perl -ni -e '/finish-install/ ? print STDERR $_ : print' %{name}.list 2> finish-install.list |
208 |
|
209 |
cat > $RPM_BUILD_ROOT%_sysconfdir/X11/xinit.d/harddrake2 <<EOF |
210 |
#!/bin/sh |
211 |
exec /usr/share/harddrake/service_harddrake X11 |
212 |
EOF |
213 |
|
214 |
cat > $RPM_BUILD_ROOT%_sysconfdir/sysconfig/harddrake2/kernel <<EOF |
215 |
KERNEL=2.6 |
216 |
EOF |
217 |
|
218 |
mv $RPM_BUILD_ROOT%_sbindir/service_harddrake_confirm $RPM_BUILD_ROOT%_datadir/harddrake/confirm |
219 |
|
220 |
chmod +x $RPM_BUILD_ROOT{%_datadir/harddrake/{conf*,service_harddrake},%_sysconfdir/X11/xinit.d/harddrake2} |
221 |
# temporary fix until we reenable this feature |
222 |
rm -f $RPM_BUILD_ROOT%_sysconfdir/X11/xinit.d/harddrake2 |
223 |
|
224 |
perl -I perl-install -mharddrake::data -e 'print "DETECT_$_->{class}=yes\n" foreach @harddrake::data::tree' |sort > $RPM_BUILD_ROOT%_sysconfdir/sysconfig/harddrake2/service.conf |
225 |
echo -e "AUTORECONFIGURE_RIGHT_XORG_DRIVER=yes\n" >> $RPM_BUILD_ROOT%_sysconfdir/sysconfig/harddrake2/service.conf |
226 |
|
227 |
%find_lang libDrakX |
228 |
%find_lang libDrakX-standalone |
229 |
cat libDrakX.lang libDrakX-standalone.lang >> %name.list |
230 |
|
231 |
%check |
232 |
%make_build -C perl-install check |
233 |
|
234 |
%post |
235 |
%make_session |
236 |
rm -f %_sbindir/kbdconfig %_sbindir/mouseconfig |
237 |
: |
238 |
|
239 |
%postun |
240 |
%make_session |
241 |
: |
242 |
|
243 |
%post http |
244 |
%_post_service drakxtools_http |
245 |
|
246 |
%preun http |
247 |
%_preun_service drakxtools_http |
248 |
|
249 |
%postun -n harddrake |
250 |
file /etc/sysconfig/harddrake2/previous_hw | grep -F -q perl && %_datadir/harddrake/convert || : |
251 |
|
252 |
%files backend -f %{name}-backend.list |
253 |
%config(noreplace) /etc/security/fileshare.conf |
254 |
%attr(4755,root,root) %_sbindir/fileshareset |
255 |
|
256 |
%files curses -f %name.list |
257 |
%{_datadir}/applications/localedrake*.desktop |
258 |
#%%doc perl-install/diskdrake/diskdrake.html |
259 |
%_iconsdir/localedrake.png |
260 |
%_iconsdir/large/localedrake.png |
261 |
%_iconsdir/mini/localedrake.png |
262 |
|
263 |
%files -f %{name}-gtk.list |
264 |
|
265 |
%files gtk2-compat -f %{name}-gtk2.list |
266 |
|
267 |
%files -n harddrake |
268 |
%dir /etc/sysconfig/harddrake2/ |
269 |
%config(noreplace) /etc/sysconfig/harddrake2/previous_hw |
270 |
%config(noreplace) /etc/sysconfig/harddrake2/service.conf |
271 |
%config(noreplace) %_sysconfdir/sysconfig/harddrake2/kernel |
272 |
%dir %_datadir/harddrake/ |
273 |
%_datadir/harddrake/* |
274 |
%_sysconfdir/X11/xsetup.d/??notify-x11-free-driver-switch.xsetup |
275 |
#%%_sysconfdir/X11/xinit.d/harddrake2 |
276 |
|
277 |
%files -n harddrake-ui |
278 |
%dir /etc/sysconfig/harddrake2/ |
279 |
%_sbindir/harddrake2 |
280 |
%_datadir/pixmaps/harddrake2 |
281 |
%{_datadir}/applications/harddrake.desktop |
282 |
%_iconsdir/large/harddrake.png |
283 |
%_iconsdir/mini/harddrake.png |
284 |
%_iconsdir/harddrake.png |
285 |
|
286 |
%files -n drakx-finish-install |
287 |
%config(noreplace) %_sysconfdir/sysconfig/finish-install |
288 |
%_sysconfdir/X11/xsetup.d/??finish-install.xsetup |
289 |
%_sbindir/finish-install |
290 |
|
291 |
%files http -f %{name}-http.list |
292 |
%dir %_sysconfdir/drakxtools_http |
293 |
%config(noreplace) %_sysconfdir/pam.d/miniserv |
294 |
%_sysconfdir/init.d/drakxtools_http |
295 |
%config(noreplace) %_sysconfdir/drakxtools_http/conf |
296 |
%config(noreplace) %_sysconfdir/drakxtools_http/authorised_progs |
297 |
%config(noreplace) %_sysconfdir/logrotate.d/drakxtools-http |
298 |
|
299 |
|
300 |
|