Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > 9ad88248fa88ac154a304bd2fa55698a > files > 13

menu-2.1.5-42mdk.src.rpm

%define name		menu
%define version		2.1.5
%define subversion	4
%define release 42mdk

Summary:	Menu system
Name:		%{name}
Version:	%version
Release:	%release

Source0:	%{name}-%{version}-%{subversion}.tar.bz2
Source1:	%{name}.txt.bz2
Source2:	%{name}-icons.tar.bz2
Source3:	%{name}.menu
Source4:	%{name}-locales.tar.bz2
Source5:	%{name}.method
Source6:	%{name}.xinit
Source7:	soundwrapper

Patch0:		menu-mdk.patch.bz2
Patch1:		menu-i18n.patch.bz2
Patch2:		menu-rootmenu.patch.bz2
Patch3:		menu-2.1.5-deb2mdk.patch.bz2
Patch5:		menu-2.1.5-chmod.patch.bz2
Patch6:		menu-2.1.5-encodetranslation.patch.bz2
Patch7:		menu-2.1.5-encode.patch.bz2
Copyright:	GPL
Group:		System/Base
BuildRoot:	%{_tmppath}/%{name}-buildroot
Prefix:		%{_prefix}
Requires:	rpm >= 3.0.5-22mdk
BuildRequires:	rpm-devel bzip2 popt-devel zlib-devel
Prereq:		sed

%description
The intent of this package is to streamline the menu's. For this purpose,
menu provides an "update-menus" command, that will read all installed menu
files (as provided by other packages in %{_menudir}), and run the frontents
for various window managers in /etc/menu-methods to create startup files for
the window managers (or pdmenu).

The user and system admin can easily override the menu files on a by-user or
by-system bases.

%prep

%setup -a 4
%patch0 -p0 -b .mdk
%patch1 -p0 -b .i18n
%patch2 -p0 -b .rootmenu
%patch3 -p1 -b deb
%patch5 -p0 -b .chmod
%patch6 -p1 -b .encode
%patch7 -p1 -b .allencode

%build

automake
%configure
# optimization seems to make update-menus core dumps
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT%{_mandir}/{man1,man5}
mkdir -p $RPM_BUILD_ROOT/etc/{menu,menu-methods}
install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/menu-methods/%{name}
mkdir -p $RPM_BUILD_ROOT%{_menudir}/default
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_menudir}/menu
mkdir -p $RPM_BUILD_ROOT%{_iconsdir}/mini
tar yxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_iconsdir}
%makeinstall
mv $RPM_BUILD_ROOT/usr/bin/install-menu $RPM_BUILD_ROOT/usr/sbin
mv $RPM_BUILD_ROOT/usr/bin/install-fvwmgenmenu $RPM_BUILD_ROOT/usr/sbin
#cp `find default/* -prune -type f` $RPM_BUILD_ROOT%{_menudir}/default
cp examples/translate_menus examples/menu.h \
	   examples/menu.config $RPM_BUILD_ROOT/etc/menu-methods
install -m 755 scripts/install-fvwmgenmenu.sh scripts/su-to-root \
	  scripts/wm-menu-config \
	  $RPM_BUILD_ROOT/usr/sbin
install -m 644 doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
bzcat %{SOURCE1} > doc/menu.txt

mkdir -p $RPM_BUILD_ROOT/etc/X11/xinit.d
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/etc/X11/xinit.d/%{name}

mkdir -p $RPM_BUILD_ROOT/var/lib/menu

pushd $RPM_BUILD_ROOT%{_menudir}/default/ && \
for i in `grep -l  Apps/System/Admin *`;do rm -f $i;done \
&& popd
%{find_lang} menu-messages

mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ -r /etc/sysconfig/i18n ]; then
    . /etc/sysconfig/i18n
else
    LANG=C
    RPM_INSTALL_LANG=C
fi

rm -f /etc/menu-methods/lang.h

echo "function lang()=\"$LANG\"" > /etc/menu-methods/lang.h

if [ $RPM_INSTALL_LANG == all ]; then
    RPM_INSTALL_LANG=`echo /usr/share/locale/*/LC_MESSAGES/menu-messages.mo | sed -e 's@/usr/share/locale/@@g' -e 's@/LC_MESSAGES/menu-messages.mo@@g' -e 's@ @:@g'`
fi

echo "function languages()=\"$RPM_INSTALL_LANG\"" >> /etc/menu-methods/lang.h

update-menus

%postun
%{clean_menus}

%files -f menu-messages.lang
%defattr(-,root,root,0755)
%doc doc/{README*,BUGS,menu.txt} AUTHORS debian/changelog examples
%config(noreplace) /etc/menu-methods/*
%config /etc/menu
%config(noreplace) /etc/X11/xinit.d/menu
%dir /var/lib/menu
/usr/bin/update-menus
/usr/lib/menu/*
/usr/sbin/*
/usr/share/icons/*
/usr/share/man/man1/*
/usr/share/man/man5/*
%{_bindir}/soundwrapper

%changelog
* Wed Oct 18 2000 Vincent Saugey <vince@mandrakesoft.com> 2.1.5-42mdk
- Add a fonction for encoding self made menu entry into different charset

* Tue Oct 10 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.5-41mdk
- Recompile for the new libstdc++.

* Tue Oct 10 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.5-40mdk
- use "$@" instead of $@ in soundwrapper

* Tue Oct 10 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-39mdk
- use $@ instead of $* in soundwrapper.
- updated po from CVS.
- removed patch for typo in fr (it must be done in the menu-messages cvs module).

* Mon Oct  9 2000 Montel Laurent <lmontel@mandrakesoft.com> 2.1.5-38mdk
- fix typo in fr.po

* Fri Oct  6 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.5-37mdk
- make soundwrapper esd-aware

* Fri Oct  6 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-36mdk
- added support for RPM_INSTALL_LANG=all

* Thu Oct  5 2000 Vincent Saugey <vince@mandrakesoft.com> 2.1.5-35mdk
- Fix in encode menu fail is no po found

* Wed Oct  4 2000 Vincent Saugey <vince@mandrakesoft.com> 2.1.5-34mdk
- encode_translate get po charset to make conversion.

* Wed Oct  4 2000 Vincent Saugey <vince@mandrakesoft.com> 2.1.5-33mdk
- Add encode_tranlate() function to language.

* Tue Oct  3 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-32mdk
- corrected prefix of locales.

* Tue Oct  3 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-31mdk
- updated po from CVS.
- merged patches.
- fork in background must be better handled.

* Fri Sep 29 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.5-30mdk
- add "soundwrapper" shell script to launch apps that require sound
  through the good wrapper

* Fri Sep 29 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-29mdk
- really include mo (buggy %%find_lang call).
- updated po from CVS.
- fork to background if -n is not used.

* Tue Sep 26 2000 Daouda Lo <daouda@mandrakesoft.com> 2.1.5-28mdk
- replace ICQ section by Instant Messaging.

* Fri Sep 22 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-27mdk
- updated locales from CVS.

* Mon Sep 18 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-26mdk
- updated the translations.
- added logic to automatically run update-menus as user when a system menu has changed.

* Thu Aug 31 2000 Vincent Saugey <vince@mandrakesoft.com> 2.1.5-25mdk
- Reinsert /etc/menu directory for system menu (who's suck ????)

* Mon Aug 28 2000 David BAUDENS <baudens@mandrakesoft.com> 2.1.5-24mdk
- Fix few bugs in menu entries

* Tue Aug 08 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-23mdk
- automatically added BuildRequires

* Mon Aug 07 2000 David BAUDENS <baudens@mandrasoft.com> 2.1.5-22mdk
- Fix macros & BM disaster (please be carreful that ALL FILES are included
  in the new package when you use macros and make BM)
- Add missing documentation

* Wed Jul 26 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.5-21mdk
- BM

* Tue Jul 11 2000 Thierry Vignaud <tvignaud@mandrakesoft.com>  2.1.5-20mdk
- added postun scripts
- more macros
- Stefan van der Eijk <s.vandereijk@chello.nl> :
	* makeinstall macro
	* macroszifications

* Wed May 10 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-19mdk
- po updates for fr, lt, ro and sk.

* Tue May  9 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-18mdk
- new po.

* Sat May  6 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-17mdk
- new po.

* Thu May  4 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-16mdk
- fix bad chmod on dir.

* Thu May  4 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-15mdk
- pass environment to menu methods.
- catch endofline error to try to continue.

* Thu May  4 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-14mdk
- new po.
- do a chmod 644 on new file to allow menu to work on security level 5.

* Fri Apr 28 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-13mdk
- added icons for 16, 32 and 48.

* Wed Apr 26 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-12mdk
- updated po.
- corrected typos in menu entries.

* Wed Apr 19 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-11mdk
- new po.

* Tue Apr 18 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-10mdk
- added locales.

* Tue Apr 18 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-9mdk
- exit if DURING_INSTALL is set.

* Thu Apr 13 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-8mdk
- added new icons.
- removed default menus in Apps.

* Mon Apr 10 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-7mdk
- added icons for menu sections.
- added order in sections.

* Wed Apr  5 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.5-6mdk
- By default rootmenu are /Mandrake not Debian.

* Mon Apr  3 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-5mdk
- 2.1.5-4 author release: added also_run feature.
- doc update.
- fix for toplevel entry.
- tanslate debian menu sections to mandrake ones.

* Fri Mar 31 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.5-4mdk
- Fix default structure.

* Wed Feb 23 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.1.5-3mdk
- More mandrake adpatation in default config.

* Wed Feb 23 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-2mdk
- added documentation.

* Mon Feb 21 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.1.5-1mdk
- mandrake adaptation

# end of file