summaryrefslogtreecommitdiffstats
path: root/drakwizard.spec
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-06-01 06:40:47 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-06-01 06:40:47 +0000
commit46fbe9cda8301f00556c725a5fdc04a6bad602dd (patch)
tree7b139c39d1979f831f6233a436a1117091974c3e /drakwizard.spec
parent797f7bc991a498d3ce9146712f388bb2c8e261b1 (diff)
downloaddrakwizard-46fbe9cda8301f00556c725a5fdc04a6bad602dd.tar
drakwizard-46fbe9cda8301f00556c725a5fdc04a6bad602dd.tar.gz
drakwizard-46fbe9cda8301f00556c725a5fdc04a6bad602dd.tar.bz2
drakwizard-46fbe9cda8301f00556c725a5fdc04a6bad602dd.tar.xz
drakwizard-46fbe9cda8301f00556c725a5fdc04a6bad602dd.zip
add menu
Diffstat (limited to 'drakwizard.spec')
-rw-r--r--drakwizard.spec60
1 files changed, 58 insertions, 2 deletions
diff --git a/drakwizard.spec b/drakwizard.spec
index f5b06a54..5f357daa 100644
--- a/drakwizard.spec
+++ b/drakwizard.spec
@@ -6,10 +6,11 @@ Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.bz2
+Source1: %name.png
License: GPL
Group: System/Configuration/Other
Requires: perl-base, usermode, perl-Locale-gettext, drakxtools >= 9.1-0.4mdk, perl-Libconf >= 0.39.16-3mdk
-BuildRequires: gettext-base
+BuildRequires: gettext-base, ImageMagick
Buildroot: %{_tmppath}/%{name}
BuildArch: noarch
Prefix: %{_prefix}
@@ -38,6 +39,55 @@ rm -rf $RPM_BUILD_ROOT
%makeinstall
%find_lang %{name}
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
+install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/
+
+mkdir -p $RPM_BUILD_ROOT%{_menudir}
+cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-samba
+?package(%{name}): command="%{_sbindir}/%{name} samba" icon="%_iconsdir/%{name}.png" needs="x11" title="Samba Wizard" longtitle="Samba Wizard" section="Configuration/Wizard/"
+EOF
+cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-sambashare
+?package(%{name}): command="%{_sbindir}/%{name} sambashare" icon="%_iconsdir/%{name}.png" needs="x11" title="Samba share management" longtitle="Samba share management" section="Configuration/Wizard/"
+EOF
+cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-ftp
+?package(%{name}): command="%{_sbindir}/%{name} proftpd" icon="%_iconsdir/%{name}.png" needs="x11" title="Proftpd wizard" longtitle="Proftpd wizard" section="Configuration/Wizard/"
+EOF
+cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-dhcp
+?package(%{name}): command="%{_sbindir}/%{name} dhcp" icon="%_iconsdir/%{name}.png" needs="x11" title="Dhcp wizard" longtitle="Dhcp wizard" section="Configuration/Wizard/"
+EOF
+cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-bind
+?package(%{name}): command="%{_sbindir}/%{name} bind" icon="%_iconsdir/%{name}.png" needs="x11" title="Bind wizard" longtitle="Bind wizard" section="Configuration/Wizard/"
+EOF
+cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-nis
+?package(%{name}): command="%{_sbindir}/%{name} nisautofs" icon="%_iconsdir/%{name}.png" needs="x11" title="NIS autofs wizard" longtitle="NIS autofs wizard" section="Configuration/Wizard/"
+EOF
+cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-nfs
+?package(%{name}): command="%{_sbindir}/%{name} nfs" icon="%_iconsdir/%{name}.png" needs="x11" title="NFS wizard" longtitle="NFS wizard" section="Configuration/Wizard/"
+EOF
+
+(mkdir -p %{buildroot}/%{_menudir}
+cat > %{buildroot}/%{_menudir}/%{name} <<EOF
+?package(%name): \
+command="%{_sbindir}/%{name}" needs="X11" icon="%_iconsdir/%name.png" section="Configuration/Wizard/" title="Drakwizard" longtitle="Drakwizard"
+EOF
+)
+
+
+mkdir -p $RPM_BUILD_ROOT/%_liconsdir
+mkdir -p $RPM_BUILD_ROOT/%_iconsdir
+mkdir -p $RPM_BUILD_ROOT/%_miconsdir
+convert -size 48x48 %{SOURCE1} $RPM_BUILD_ROOT/%_liconsdir/%name.png
+mkdir -p $RPM_BUILD_ROOT/%_iconsdir
+convert -size 32x32 %{SOURCE1} $RPM_BUILD_ROOT/%_iconsdir/%name.png
+mkdir -p $RPM_BUILD_ROOT/%_miconsdir
+convert -size 16x16 %{SOURCE1} $RPM_BUILD_ROOT/%_miconsdir/%name.png
+
+%post
+%{update_menus}
+
+%postun
+%{clean_menus}
+
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME
@@ -46,13 +96,19 @@ rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME
%defattr(-,root,root)
%config(noreplace) %_sysconfdir/gnome-vfs-2.0/vfolders/*
%_sbindir/drakwizard
+%{_datadir}/pixmaps/%name.png
+%{_menudir}/%{name}*
+%{_liconsdir}/%name.png
+%{_iconsdir}/%name.png
+%{_miconsdir}/%name.png
%_datadir/wizards*
%{perl_vendorlib}/MDK/
%changelog
* Wed Jun 1 2005 Antoine Ginies <aginies@n1.mandrakesoft.com> 3.0-4mdk
- add Wizard to Manage Samba share
-- various fix and imrpovement in Samba wizard
+- various fix and improvement in Samba wizard
+- add Wizard menu
* Tue May 31 2005 Antoine Ginies <aginies@n1.mandrakesoft.com> 3.0-3mdk
- add share management