Репозиторий Sisyphus
Последнее обновление: 12 июля 2020 | Пакетов: 17700 | Посещений: 18876730
en ru br
Репозитории ALT
S:2.1.41-alt22.qa1
5.1: 2.1.41-alt9
4.1: 2.1.41-alt3.M41.1
4.0: 2.1.35-alt5
3.0: 2.1.25-alt3
+backports:2.1.29-alt4.0.M30
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: menu

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define subversion %nil
%define _optlevel 2

Name: menu
Version: 2.1.25
Release: alt3

Group: System/Base
Summary: Menu system
License: GPL
URL: http://www.debian.org

Autoreq: yes, noshell
PreReq: sed, coreutils, grep
PreReq: menu-messages
Requires: sound_handler
Conflicts: menu-icons-crystalmdk

Source0: %{name}_%version%subversion.tar.bz2
#
Source4: %name.menu
Source5: %name.method
Source6: %name.xinit
#
Source11: menu-firsttime
#
Source15: menu-prepare-menus
Source16: menu-translate_menus
#
Source21: xdg-menu-spec
Source22: xdg-desktop-entry-spec-dirs
Source23: xdg-desktop-entry-spec-apps
Source24: xdg-desktop-entry-spec-apps-postrun

# temporary need

Source100: menu-file2pot

# MDK

Patch1: menu-2.1.14-escaping-ALT.patch

# ALT

Patch11: menu-2.1.15-ALT.patch
Patch12: menu-2.1.14-xvt.patch
Patch13: menu-2.1.14-translate.patch
Patch14: menu-2.1.14-substr-function.patch
Patch15: menu-2.1.14-rpm.patch
Patch16: menu-2.1.14-old-replacewith.patch
Patch17: menu-2.4.20-fix-compile.patch
Patch18: menu-2.1.23-norpm.patch
Patch19: menu-2.1.25-menumethod-arg-nopath-avail.patch
Patch20: menu-2.1.25-xdginput.patch
Patch21: menu-2.1.25-freedesktop.patch

# Automatically added by buildreq on Mon Oct 29 2001

BuildRequires: gcc-c++ libpopt-devel libstdc++-devel zlib-devel

%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 %_sysconfdir/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 -q -n %name-%version
%patch1 -p1
#
%patch11 -p1 -b .ALT
%patch12 -p1
%patch13 -p1 -b .translate
%patch14 -p1
%patch15 -p1 -b .rpm
# old-replacewith
#%patch16 -p1
%patch17 -p1
#%patch18 -p1 -b .norpm
%patch19 -p1
%patch20 -p1 -b .xdg
%patch21 -p1


%build
export CFLAGS="%optflags" CXXFLAGS="%optflags"
%configure
%make_build CFLAGS="%optflags" CXXFLAGS="%optflags"
%make_build -C po


%install
mkdir -p %buildroot/%_bindir
mkdir -p %buildroot/%_sbindir
mkdir -p %buildroot/%_mandir/{man1,man5}
mkdir -p %buildroot/%_sysconfdir/{menu,menu-methods,firsttime.d}
mkdir -p %buildroot/%_menudir/default
mkdir -p %buildroot/%_iconsdir/mini
mkdir -p %buildroot/%_sysconfdir/X11/xinit.d
mkdir -p %buildroot/var/lib/menu

install -p -m755 %SOURCE11 %buildroot/%_sysconfdir/firsttime.d/menu
#install -p -m755 %SOURCE15 %buildroot/%_sbindir/prepare-menus
install -p -m755 %SOURCE5 %buildroot/%_sysconfdir/menu-methods/%name
install -p -m644 %SOURCE4 %buildroot/%_menudir/menu

%makeinstall
%makeinstall -C po

# install default menus

rm -rf %buildroot/%_menudir/default/*


install -p -m644 examples/{menu.h,menu.config} %buildroot/%_sysconfdir/menu-methods
install -p -m644 %SOURCE16 %buildroot/%_sysconfdir/menu-methods/translate_menus
install -p -m755 scripts/{su-to-root,wm-menu-config} %buildroot/%_sbindir
install -p -m644 doc/*.1 %buildroot/%_mandir/man1
install -p -m644 doc/*.5 %buildroot/%_mandir/man5

install -p -m755 %SOURCE6 %buildroot/%_sysconfdir/X11/xinit.d/%name

ln -s sound_wrapper.sh %buildroot/%_bindir/soundwrapper

mkdir -p %buildroot/%_sysconfdir/menu-methods
install -m 0755 %SOURCE21 %buildroot/%_sysconfdir/menu-methods
install -m 0755 %SOURCE22 %buildroot/%_sysconfdir/menu-methods
install -m 0755 %SOURCE23 %buildroot/%_sysconfdir/menu-methods
install -m 0755 %SOURCE24 %buildroot/%_bindir

mkdir -p \
   %buildroot/%_sysconfdir/xdg/menus-alt \
   %buildroot/%_datadir/applications-alt \
   %buildroot/%_datadir/desktop-directories-alt

%find_lang %name

%post
if [ -r %_sysconfdir/sysconfig/i18n ]; then
   . %_sysconfdir/sysconfig/i18n
fi

PREFERRED_LOCALE=$LANG
[ -n "$PREFERRED_LOCALE" ] || PREFERRED_LOCALE=C

LANGUAGES_LIST=$SUPPORTED
[ -n "$LANGUAGES_LIST" ] || LANGUAGES_LIST=$PREFERRED_LOCALE
[ -n "$LANGUAGES_LIST" ] || LANGUAGES_LIST=C

if [ "$LANGUAGE" == "all" ]
then
   LANGUAGES_LIST=`echo %_datadir/locale/*/LC_MESSAGES/menu-messages.mo | sed -e 's at %_datadir/locale/ at  at g' -e 's at /LC_MESSAGES/menu-messages.mo at  at g' -e 's at   at : at g'`
fi

>%_sysconfdir/menu-methods/lang.h
echo "function lang()=\"$PREFERRED_LOCALE\"" > %_sysconfdir/menu-methods/lang.h
echo "function languages()=\"$LANGUAGES_LIST\"" >> %_sysconfdir/menu-methods/lang.h

%update_menus

%postun
%clean_menus


%files -f %name.lang
%config(noreplace) %_sysconfdir/menu-methods/*
%config %_sysconfdir/menu
%config(noreplace) %_sysconfdir/X11/xinit.d/menu
%_sysconfdir/firsttime.d/*
#
%dir %_sysconfdir/xdg/menus-alt
%dir %_datadir/applications-alt
%dir %_datadir/desktop-directories-alt
#
%_bindir/*
%_sbindir/*
%dir %_localstatedir/menu
%_menudir/*
%_man1dir/*
%_man5dir/*
%doc doc/{*html,README*,BUGS,menu.txt*} AUTHORS debian/changelog debian/copyright examples

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin