]> git.pld-linux.org Git - packages/bash.git/blobdiff - bash.spec
- partial /etc/shells edit with lua
[packages/bash.git] / bash.spec
index 518927f52887c0b166d1733e2fa7b09814ade401..043431d79896c6c5926b3239a0508cf058f39393 100644 (file)
--- a/bash.spec
+++ b/bash.spec
@@ -1,17 +1,31 @@
+#
+# Conditional build:
+%bcond_without static          # don't build static version
+%bcond_with    bash_history    # build with additional history in /var/log/bash_hist ;)
+%bcond_without tests   # do not perform "make test"
+#
+%define                ver             3.2
+%define                patchlevel      39
+%define                rel             1
 Summary:       GNU Bourne Again Shell (bash)
-Summary(fr):   Le shell Bourne Again de GNU
-Summary(pl):   Pow³oka GNU Bourne Again Shell (bash)
+Summary(fr.UTF-8):     Le shell Bourne Again de GNU
+Summary(pl.UTF-8):     Powłoka GNU Bourne Again Shell (bash)
 Name:          bash
-Version:       2.05a
-Release:       2
+Version:       %{ver}.%{patchlevel}
+Release:       %{rel}%{?with_bash_history:inv}
 License:       GPL
 Group:         Applications/Shells
-Source0:       ftp://prep.ai.mit.edu/pub/gnu/bash/%{name}-%{version}.tar.gz
+Source0:       http://ftp.gnu.org/gnu/bash/%{name}-%{ver}.tar.gz
+# Source0-md5: 00bfa16d58e034e3c2aa27f390390d30
 Source1:       %{name}rc
-Source2:       %{name}-skel-.bash_logout
-Source3:       %{name}-skel-.bash_profile
-Source4:       %{name}-skel-.bashrc
+Source2:       %{name}-skel-.%{name}_logout
+Source3:       %{name}-skel-.%{name}_profile
+Source4:       %{name}-skel-.%{name}rc
 Source5:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+# Source5-md5: d2aacf89c4a444c5da648da69afdb01a
+# based on GNU TP; omitted: eo (not supported), rw (empty)
+Source6:       %{name}-translations.tar.bz2
+# Source6-md5: 99701bc1f919cfc527cb95fadbc66c93
 Patch0:                %{name}-paths.patch
 Patch1:                %{name}-security.patch
 Patch2:                %{name}-autoconf.patch
@@ -19,33 +33,36 @@ Patch3:             %{name}-info.patch
 Patch4:                %{name}-profile.patch
 Patch5:                %{name}-requires.patch
 Patch6:                %{name}-compat.patch
-Patch7:                %{name}-shellfunc.patch
-Patch8:                %{name}-DESTDIR.patch
-Patch9:                %{name}-rlimit_locks.patch
-Patch10:       %{name}-sighup.patch
-Patch11:       %{name}-tmpfile.patch
-Patch13:       %{name}-service_completion.patch
-
+Patch8:                %{name}-sighup.patch
+Patch9:                %{name}-backup_history.patch
+Patch10:       %{name}-act_like_sh.patch
+Patch11:       %{name}-elinks_cont.patch
+%patchset_source -f http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-%03g 1 %{patchlevel}
+URL:           http://www.gnu.org/software/bash/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: bison
-BuildRequires: glibc-devel >= 2.2
 BuildRequires: ncurses-devel >= 5.2
-BuildRequires: readline-devel >= 4.2
+BuildRequires: readline-devel >= 5.2
+BuildRequires: rpmbuild(macros) >= 1.429
+BuildRequires: sed >= 4.0
 BuildRequires: texinfo
-%if %{!?_without_static:1}%{?_without_static:0}
+%if %{with static}
 # Require static library only for static build
 BuildRequires: glibc-static >= 2.2
 BuildRequires: ncurses-static >= 5.2
-BuildRequires: readline-static >= 4.2
+BuildRequires: readline-static >= 5.2
 %endif
-Requires(post):        grep
-Requires(preun):       grep
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Requires(post,preun):  grep
+Requires(preun):       fileutils
+Requires:      grep
+Requires:      readline >= 5.2
+Requires:      setup >= 2.4.6-2
 Obsoletes:     bash-doc
 Obsoletes:     bash2
 Obsoletes:     bash2-doc
 Obsoletes:     etcskel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Bash is a GNU project sh-compatible shell or command language
@@ -60,58 +77,91 @@ Shell and Tools standard. Bash is the default shell for Linux
 Mandrake. You should install bash because of its popularity and power.
 You'll probably end up using it.
 
-%description -l de
+%description -l es.UTF-8
+Bash es un interpretador de comandos compatible con sh, que ejecuta
+comandos leídos de la entrada padrón o de un archivo. Bash también
+incorpora características útiles de las shells Korn y C (ksh y csh).
+Bash ha sido desarrollado para ser una adición compatible con la
+especificación IEEE Posix para shells y herramientas (IEEE Working
+Group 1003.2).
+
+%description -l de.UTF-8
 Bash ist eine sh-kompatible Shell und Kommandosprache aus dem
-GNU-Projekt. Bash (Bourne Again Shell) vereinigt die nützlichen
+GNU-Projekt. Bash (Bourne Again Shell) vereinigt die nützlichen
 Features aus der Korn-Shell (ksh) und der C-Shell (csh). Die meisten
-sh-Skripte laufen ohne Änderungen auf bash. Bash hat viele
+sh-Skripte laufen ohne Änderungen auf bash. Bash hat viele
 Erweiterungen im Vergleich zur "normalen" sh, wie z.B.
-Kommandozeilenbearbeitung, unbeschränkte Größe der command-history,
-Job-Kontrolle, Shell-Funktionen und -Aliase, unbegrenzt große
+Kommandozeilenbearbeitung, unbeschränkte Größe der command-history,
+Job-Kontrolle, Shell-Funktionen und -Aliase, unbegrenzt große
 indizierte Arrays und Integer-Arithmetik in einer Basis von 2 bis 64.
 Hauptziel von bash ist es, den IEEE POSIX P1003.2/ISO 9945.2 Shell-
-und Tools-Standard einzuhalten. Bash ist die Standard-Shell für Linux
+und Tools-Standard einzuhalten. Bash ist die Standard-Shell für Linux
 Mandrake.
 
-%description -l fr
-Bash est un shell (interpréteur de commande) du projet GNU, compatible
+%description -l fr.UTF-8
+Bash est un shell (interpréteur de commande) du projet GNU, compatible
 avec le shell historique sh. Bash (Bourne Again SHell) comprend de
-nombreuses fonctionnalités du Korn SHell (ksh) et du C SHell (csh). La
-plupart des scripts sh sont exécutables sans modifications. Bash
-comprend nombre d'améliorations par rapport à sh : édition de la ligne
-de commande, historique illimité, contrôle des processus
-d'arrière-plan, fonctions de shell, alias, tableaux indexés de taille
-illimitée et calcul sur des entiers dans n'importe quelle base de 2 à
+nombreuses fonctionnalités du Korn SHell (ksh) et du C SHell (csh). La
+plupart des scripts sh sont exécutables sans modifications. Bash
+comprend nombre d'améliorations par rapport à sh : édition de la ligne
+de commande, historique illimité, contrôle des processus
+d'arrière-plan, fonctions de shell, alias, tableaux indexés de taille
+illimitée et calcul sur des entiers dans n'importe quelle base de 2 à
 64. Bash est conforme au standard IEEE POSIX P1003.2/ISO 9945.2 Shell
-and Tools. Bash est le shell par défaut de Mandrake. Vous devriez
-l'installer du fait de sa puissance et de sa popularité. Vous finirez
+and Tools. Bash est le shell par défaut de Mandrake. Vous devriez
+l'installer du fait de sa puissance et de sa popularité. Vous finirez
 probablement par l'utiliser.
 
-%description -l pl
-Bash (Bourne Again SHell) jest projektem GNU pow³oki kompatybilnej z
-sh oraz interpretera jêzyka poleceñ. Posiada u¿yteczne w³a¶ciwo¶ci
-pow³ok Korn (ksh) i C (csh). Wiêkszo¶æ skryptów sh mo¿e byæ
-uruchamiana w bashu bez modyfikacji. Oferuje on kilka ulepszeñ w
-stusunku do sh, w³±czaj±c edycjê linii poleceñ, nieograniczony rozmiar
-historii poleceñ, funkcje i aliasy, indeksowane tablice
-nieograniczonych rozmiarów oraz arytmetykê ca³kowitoliczbow± o
-dowolnej podstawie od 2 do 64. W zamierzeniu ostatecznie ma byæ zgodny
+%description -l pl.UTF-8
+Bash (Bourne Again SHell) jest projektem GNU powłoki kompatybilnej z
+sh oraz interpretera języka poleceń. Posiada użyteczne właściwości
+powłok Korn (ksh) i C (csh). Większość skryptów sh może być
+uruchamiana w bashu bez modyfikacji. Oferuje on kilka ulepszeń w
+stosunku do sh, włączając edycję linii poleceń, nieograniczony rozmiar
+historii poleceń, funkcje i aliasy, indeksowane tablice
+nieograniczonych rozmiarów oraz arytmetykę całkowitoliczbową o
+dowolnej podstawie od 2 do 64. W zamierzeniu ostatecznie ma być zgodny
 ze standardem IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools.
 
-%description -l tr
-Bash standart giriþten ya da bir dosyadan komut okuyup çalýþtýran sh
-uyumlu bir komut dili yorumlayýcýsýdýr. Ayný zamanda Korn ve C
-kabuklarýnýn (ksh ve csh) kullanýþlý özelliklerini de kapsar. Bash,
-IEEE Posix Kabuk ve Araç ayrýntýlarýna (IEEE Working Group 1003.2)
-uyumlu bir uygulama olarak tasarlanmýþtýr.
+%description -l pt_BR.UTF-8
+Bash é um interpretador de comandos compatível com sh, que executa
+comandos lidos da entrada padrão ou de um arquivo. Bash também
+incorpora características úteis das shells Korn e C (ksh e csh). Bash
+tem sido desenvolvido para ser uma implementação compatível com a
+especificação IEEE Posix para shells e ferramentas (IEEE Working Group
+1003.2).
+
+%description -l ru.UTF-8
+Bash - это sh-совместимый интерпретатор командного языка (shell),
+исполняющий команды, поступающие со стандартного ввода или из файла.
+Bash включает полезные расширения из интерпретаторов Korn и C shell
+(ksh и csh).
+
+Bash разрабатывается как реализация, отвечающая IEEE Posix Shell and
+Tools specification (IEEE Working Group 1003.2).
+
+%description -l tr.UTF-8
+Bash standart girişten ya da bir dosyadan komut okuyup çalıştıran sh
+uyumlu bir komut dili yorumlayıcısıdır. Aynı zamanda Korn ve C
+kabuklarının (ksh ve csh) kullanışlı özelliklerini de kapsar. Bash,
+IEEE Posix Kabuk ve Araç ayrıntılarına (IEEE Working Group 1003.2)
+uyumlu bir uygulama olarak tasarlanmıştır.
+
+%description -l uk.UTF-8
+Bash - це sh-сумістний інтерпретатор командної мови (shell),
+виконуючий команди зі стандартного вводу або з файла. Bash містить
+користні розширення з інтерпретаторів Korn та C shell (ksh та csh).
+
+Bash розроблявся як реалізація, що відповідає IEEE Posix Shell and
+Tools specification (IEEE Working Group 1003.2).
 
 %package static
 Summary:       Statically linked GNU Bourne Again Shell (bash)
-Summary(pl):   Statycznie zlinkowany GNU Bourne Again Shell (bash)
+Summary(pl.UTF-8):     Statycznie skonsolidowany GNU Bourne Again Shell (bash)
 Group:         Applications/Shells
-Requires:      %{name}
-Requires(post):        grep
-Requires(preun):       grep
+Requires(post,preun):  grep
+Requires(preun):       fileutils
+Requires:      %{name} = %{version}-%{release}
 
 %description static
 Bash is a GNU project sh-compatible shell or command language
@@ -127,15 +177,17 @@ Mandrake. You should install bash because of its popularity and power.
 You'll probably end up using it. This package contains statically
 linked version of bash.
 
-%description static -l pl
-Bash jest zaawansowanym shellem, który wykonuje komendy czytane ze
-standardowego wej¶cia (stdin) lub z pliku. Posiada w³a¶ciwo¶ci pow³ok
-Korn i C (ksh i csh). Bash ma równie¿ zaimplementowany IEEE Posix
-Shell oraz jest zgodny ze specyfikacj± - IEEE Working Group 1003.2. W
-tym pakiecie jest statycznie zlinkowany bash.
+%description static -l pl.UTF-8
+Bash jest zaawansowaną powłoką, która wykonuje komendy czytane ze
+standardowego wejścia (stdin) lub z pliku. Posiada właściwości powłok
+Korn i C (ksh i csh). Bash jest również zaimplementowany IEEE Posix
+Shell oraz jest zgodny ze specyfikacją - IEEE Working Group 1003.2. W
+tym pakiecie jest wersja basha skonsolidowana statycznie.
 
 %prep
-%setup -q -a5
+%setup -q -n %{name}-%{ver} -a5
+# official patches
+%patchset_patch 1 %{patchlevel}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -143,18 +195,17 @@ tym pakiecie jest statycznie zlinkowany bash.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
-%patch7 -p1
 %patch8 -p1
-%patch9 -p1
+%{?with_bash_history:%patch9 -p1}
 %patch10 -p1
-
-echo %{version} > _distribution
-echo %{release} > _patchlevel
+%patch11 -p1
+tar xjf %SOURCE6 -C po
+sed -e 's/boldquot ru/boldquot ru af ca de es et fr hu ja nl pl pt_BR ro tr vi/' -i po/LINGUAS
 
 %build
-autoconf
-cp -f /usr/share/automake/config.* support/
-for mode in %{!?_without_static:static} shared; do
+cp -f /usr/share/automake/config.* support
+%{__autoconf}
+for mode in %{?with_static:static} shared; do
 %configure \
        --enable-alias \
        --enable-help-builtin \
@@ -165,22 +216,29 @@ for mode in %{!?_without_static:static} shared; do
        --with-curses \
        --enable-extended-glob \
        --enable-dparen-arithmetic \
+       --enable-separate-helpfiles \
+       --without-bash-malloc \
        `[ "$mode" = "static" ] && echo "--enable-static-link"` \
        --with-installed-readline
 
-%{__make} DEFS="-DHAVE_CONFIG_H -D_GNU_SOURCE"
+%{__make} \
+       DEFS="-DHAVE_CONFIG_H -D_GNU_SOURCE"
 
 [ "$mode" = "static" ] && mv -f bash bash.static || :
 done
 
+%{?with_tests:%{__make} tests}
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{bin,etc/skel}
+install -d $RPM_BUILD_ROOT{/bin,/etc/skel,%{_datadir}/%{name}}
+%{?with_bash_history:install -d $RPM_BUILD_ROOT/var/log/bash_hist}
 
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 mv -f $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
-%{?_without_static:#}install   bash.static $RPM_BUILD_ROOT/bin
+%{?with_static:install bash.static $RPM_BUILD_ROOT/bin}
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bashrc
 echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/man1/rbash.1
@@ -196,13 +254,15 @@ ln -sf bash $RPM_BUILD_ROOT/bin/rbash
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/.bash_logout
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.bash_profile
 install %{SOURCE4} $RPM_BUILD_ROOT/etc/skel/.bashrc
+rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 
-gzip -9nf NEWS README doc/{FAQ,INTRO}
+%find_lang %{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
+umask 022
 if [ ! -f /etc/shells ]; then
        echo "/bin/bash" > /etc/shells
        echo "/bin/rbash" >> /etc/shells
@@ -215,46 +275,32 @@ else
        fi
 fi
 
+# XXX need this in lua
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
 
-%post static
-if [ ! -f /etc/shells ]; then
-       echo "/bin/bash.static" > /etc/shells
-else
-       if ! grep -q '^/bin/bash.static$' /etc/shells; then
-               echo "/bin/bash.static" >> /etc/shells
-       fi
-fi
-
-%preun
-if [ "$1" = "0" ]; then
-       grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
-       mv -f /etc/shells.new /etc/shells
-fi
+%preun -p %remove_etc_shells -p /bin/bash /bin/rbash
 
-%preun static
-if [ "$1" = "0" ]; then
-       grep -v /bin/bash.static /etc/shells > /etc/shells.new
-       mv -f /etc/shells.new /etc/shells
-fi
+%postun        -p      /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
 
-%postun
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%post static -p %add_etc_shells -p /bin/bash.static
+%preun static -p %remove_etc_shells -p /bin/bash.static
 
-%files
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc {NEWS,README}.gz doc/{FAQ,INTRO}.gz
+%doc CHANGES NEWS README doc/{FAQ,INTRO}
 
-%config %verify(not md5 size mtime) %{_sysconfdir}/bashrc
-%config(noreplace,missingok) %verify(not md5 size mtime) /etc/skel/.bash_logout
-%config(noreplace,missingok) %verify(not md5 size mtime) /etc/skel/.bash_profile
-%config(noreplace,missingok) %verify(not md5 size mtime) /etc/skel/.bashrc
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bashrc
+%config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_logout
+%config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_profile
+%config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bashrc
 
 %attr(755,root,root) /bin/bash
 %attr(755,root,root) /bin/rbash
 %attr(755,root,root) %{_bindir}/bashbug
 
-%{_infodir}/bash.info.gz
+%{?with_bash_history:%attr(1733,root,root) %dir /var/log/bash_hist}
+%{_infodir}/bash.info*
 %{_mandir}/man1/*
 %lang(es) %{_mandir}/es/man1/*
 %lang(fr) %{_mandir}/fr/man1/*
@@ -263,7 +309,10 @@ fi
 %lang(ko) %{_mandir}/ko/man1/*
 %lang(nl) %{_mandir}/nl/man1/*
 %lang(pl) %{_mandir}/pl/man1/*
+%{_datadir}/%{name}
 
-%{?_without_static:#}%files static
-%{?_without_static:#}%defattr(644,root,root,755)
-%{?_without_static:#}%attr(755,root,root) /bin/bash.static
+%if %{with static}
+%files static
+%defattr(644,root,root,755)
+%attr(755,root,root) /bin/bash.static
+%endif
This page took 0.37015 seconds and 4 git commands to generate.