summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-02-08 14:35:20 +0000
committerdamien <damien@mandriva.com>2001-02-08 14:35:20 +0000
commit3046ac1206698d014a5dd2b1dbda7045acbb98c6 (patch)
tree5153928d2b2f36b7fb2cec13ca469e01b8c3ce56
parentc56fc59bba121fd2aa6e3227a16a8e2476e89176 (diff)
downloadcontrol-center-3046ac1206698d014a5dd2b1dbda7045acbb98c6.tar
control-center-3046ac1206698d014a5dd2b1dbda7045acbb98c6.tar.gz
control-center-3046ac1206698d014a5dd2b1dbda7045acbb98c6.tar.bz2
control-center-3046ac1206698d014a5dd2b1dbda7045acbb98c6.tar.xz
control-center-3046ac1206698d014a5dd2b1dbda7045acbb98c6.zip
built package, ...
-rw-r--r--DrakConf.spec91
-rw-r--r--Makefile31
-rw-r--r--apps.DrakConf4
-rwxr-xr-xcontrol-center345
-rw-r--r--pam.drakconf6
5 files changed, 141 insertions, 36 deletions
diff --git a/DrakConf.spec b/DrakConf.spec
new file mode 100644
index 00000000..021f8903
--- /dev/null
+++ b/DrakConf.spec
@@ -0,0 +1,91 @@
+# Changed by Makefile of cvs.
+%define version 0.60
+%define name DrakConf
+
+Summary: The Mandrake Control Center
+Name: %{name}
+Version: %{version}
+Release: 1mdk
+# get the source from our cvs repository (see
+# http://www.linuxmandrake.com/en/cvs.php3)
+Source0: %{name}-%{version}.tar.bz2
+Source1: drakconf16.xpm.bz2
+Source2: drakconf32.xpm.bz2
+Source3: drakconf48.xpm.bz2
+Copyright: GPL
+Group: System/Configuration/Other
+Requires: drakxtools, gtk+mdk, perl, usermode, drakfloppy, harddrake, DrakeLogo, drakfont
+BuildRoot: %{_tmppath}/%{name}-buildroot
+
+%description
+DrakFont is an interface to multiple utilities from DrakXtools. It
+allows you to launch :
+
+ * KeyboardDrake: configures your keyboard.
+ * MouseDrake: configures and autodetects your mouse
+ * PrinterDrake: detects and configures your printer
+ * Diskdrake: partitions your hard disk.
+ * XfDrake: configure your graphic card easily and change
+ the resolution.
+
+and many other tools in an embedded way .
+
+%prep
+%setup -q
+
+%build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make prefix=$RPM_BUILD_ROOT install
+
+#mkdir -p $RPM_BUILD_ROOT%{_bindir}
+#ln -sf consolehelper ${RPM_BUILD_ROOT}%{_bindir}/DrakConf
+mv ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/DrakConf \
+ ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/DrakConf.real
+ln -sf %{_bindir}/consolehelper ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/DrakConf
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{pam.d,security/console.apps}
+cp pam.drakconf $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/DrakConf
+cp apps.DrakConf $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/DrakConf
+
+
+#install lang
+%{find_lang} %{name}
+
+#install menu
+mkdir -p $RPM_BUILD_ROOT%{_menudir}
+cat > $RPM_BUILD_ROOT%{_menudir}/DrakConf << EOF
+?package(DrakConf): needs="X11" icon="drakconf.xpm" section="Configuration/Other" title="DrakConf" longtitle="System configuration tool" command="/usr/X11R6/bin/DrakConf"
+EOF
+
+#install menu icon
+mkdir -p $RPM_BUILD_ROOT%{_miconsdir}
+mkdir -p $RPM_BUILD_ROOT%{_liconsdir}
+bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{_miconsdir}/drakconf.xpm
+bzcat %{SOURCE2} > $RPM_BUILD_ROOT%{_iconsdir}/drakconf.xpm
+bzcat %{SOURCE3} > $RPM_BUILD_ROOT%{_liconsdir}/drakconf.xpm
+
+%post
+%{update_menus}
+
+%postun
+%{clean_menus}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f %{name}.lang
+%defattr(-,root,root)
+#%doc ChangeLog README.CVS TRANSLATORS
+#%config(noreplace) /etc/mdkcc/*
+%{_prefix}/X11R6/bin/*
+%{_menudir}/DrakConf
+%{_miconsdir}/*.xpm
+%{_iconsdir}/*.xpm
+%{_liconsdir}/*.xpm
+%config(noreplace) %{_sysconfdir}/pam.d/DrakConf
+%config(noreplace) %{_sysconfdir}/security/console.apps/DrakConf
+
+%changelog
+* Thu Feb 8 2001 dam's <damien@mandrakesoft.com> 0.60-1mdk
+- new version. Should crash.
diff --git a/Makefile b/Makefile
index 781c26cb..9bab0b22 100644
--- a/Makefile
+++ b/Makefile
@@ -1,38 +1,25 @@
-VERSION = 0.50
-NAME = DrakControl
-RC_FILES = $(wildcard rc/*.rc)
+VERSION = $(shell awk '/define version/ { print $$3 }' $(NAME).spec)
+NAME = DrakConf
SUBDIRS = po
localedir = $(prefix)/usr/share/locale
override CFLAGS += -DPACKAGE=\"$(NAME)\" -DLOCALEDIR=\"$(localedir)\"
all: DrakConf
- for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
+# for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
-DrakConf.pm: DrakConf.c pics/pixmaplogo.xpm
- gcc $(CFLAGS) -c DrakConf.c -o DrakConf.o -Wall `gtk+mdk-config --cflags`
+DrakConf:
+ cp control-center3 DrakConf
clean:
- rm -f DrakConf DrakConf.o core .#*[0-9]
- for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
+ rm -f DrakConf core .#*[0-9]
+# for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
install: all
install -d $(RPM_BUILD_ROOT)/usr/{X11R6/bin/,share/icons}
- install -d $(RPM_BUILD_ROOT)/etc/DrakConf/
- for c in $(RC_FILES); do \
- f=`echo $$c|sed 's|.*/\(.*\.rc\)|\1|'` ; \
- install -m644 $$c $(RPM_BUILD_ROOT)/etc/DrakConf/$$f ;\
- done
install -s -m755 $(NAME) $(RPM_BUILD_ROOT)/usr/X11R6/bin/
- install -m755 $(NAME).pm $(RPM_BUILD_ROOT)/usr/X11R6/bin/
- install -m644 pics/*.xpm $(RPM_BUILD_ROOT)/usr/share/icons/
- rm -f $(RPM_BUILD_ROOT)/usr/share/icons/pixmaplogo.xpm
- for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
-
-changelog: ../common/username
- cvs2cl -U ../common/username -I ChangeLog
- rm -f ChangeLog.bak
- cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog
+ install -m644 pixmaps/*.xpm $(RPM_BUILD_ROOT)/usr/share/icons/
+# for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
dis: clean
rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
diff --git a/apps.DrakConf b/apps.DrakConf
new file mode 100644
index 00000000..2a32c8c1
--- /dev/null
+++ b/apps.DrakConf
@@ -0,0 +1,4 @@
+USER=root
+PROGRAM=/usr/X11R6/bin/DrakConf.real
+SESSION=true
+FALLBACK=true
diff --git a/control-center3 b/control-center3
index b477f8b3..f7484d68 100755
--- a/control-center3
+++ b/control-center3
@@ -29,10 +29,11 @@ init Gtk;
use Data::Dumper;
my %pixmaps_global;
-my $xpm_path="pixmaps";
+my $xpm_path="/usr/share/icons/";
my $tree_depth_max = 1;
my @treeitem_sub;
+my $nb_pages=0;
my $window_global = new Gtk::Window -toplevel;
$window_global->set_usize(800, 600);
$window_global->signal_connect ( delete_event => sub { Gtk->exit(0); });
@@ -192,6 +193,14 @@ map {
"Drakgw" => "drakgw" , "Menudrake" => "menudrake" , "Drakfont" => "drakfont"
);
+%tree_launched = ("Drakboot" => -1, "Drakfloppy" => -1,
+ "Drakelogo" => -1 , "xfdrake" => -1 ,
+ "Hardrake" => -1 , "Mousedrake" => -1 ,
+ "Printdrake" => -1 , "Kbddrake" => -1 ,
+ "Userdrake" => -1 , "Draknet" => -1 ,
+ "Drakgw" => -1 , "Menudrake" => -1 , "Drakfont" => -1
+ );
+
#exec_treeitem("harddrake-auth",4);
my $rc = "control-center.rc";
Gtk::Rc->parse($rc);
@@ -239,7 +248,7 @@ sub create_tree_item()
$treeitem->add($treebox);
$treebox->show();
if ($tree_depth_max == 0) {
- $treeitem->signal_connect('select', sub { exec_treeitem($tree_exec{$label},1);});
+ $treeitem->signal_connect('select', sub { exec_treeitem($label, $tree_exec{$label});});
}
$parent_tree->append($treeitem);
$treeitem->show();
@@ -288,20 +297,28 @@ sub xpm_label_box
return ( $box );
}
-
sub exec_treeitem {
- my ($exec_string,$num) = @_;
-
+ my ($label, $exec_string) = @_;
+#exec_treeitem($tree_exec{$label},1);});
if ($exec_string) {
- my $socket = new Gtk::Socket;
- $socket->show;
- $notebook_global->append_page($socket, "");
- $socket->realize;
- print ("The XID of the sockets window n° is [" . $socket->window->XWINDOW . "]\nMy PID is [" . $$ . "]\n");
- my $a = $exec_string . " --embedded " . $socket->window->XWINDOW . " " . $$ . "&";
- print "$a\n";
- system ($a);
- $notebook_global->set_page($num);
+ print "SELECTED\n";
+ if ($tree_launched{$label}==-1) {
+ print "yes\n";
+ my $socket = new Gtk::Socket;
+ $socket->show;
+ $notebook_global->append_page($socket, "");
+ $socket->realize;
+ print ("The XID of the sockets window n° is [" . $socket->window->XWINDOW . "]\nMy PID is [" . $$ . "]\n");
+ my $a = $exec_string . " --embedded " . $socket->window->XWINDOW . " " . $$ . "&";
+ print "$a\n";
+ system ($a);
+ $nb_pages++;
+ $tree_launched{$label}=$nb_pages;
+ $notebook_global->set_page($nb_pages);
+ } else {
+ print "no\n";
+ $notebook_global->set_page($tree_launched{$label});
+ }
}
}
diff --git a/pam.drakconf b/pam.drakconf
new file mode 100644
index 00000000..bc9a8d61
--- /dev/null
+++ b/pam.drakconf
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient /lib/security/pam_rootok.so
+auth required /lib/security/pam_stack.so service=system-auth
+account required /lib/security/pam_permit.so
+session optional /lib/security/pam_xauth.so
+